/* iChart Dashboard Builder CSS */

.qcld-dashboard-builder-wrap, .qcld-frontend-dashboard-wrap {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0px;
    background: #fff;
    padding-bottom: 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 5px;
    padding-bottom: 30px;
}

.qcld-db-frontend-view-wrap .qcld-frontend-dashboard-wrap {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    background: transparent !important;
}

.qcld-db-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 15px;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.qcld-db-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qcld-db-header-title {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.qcld-db-header-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: text-bottom;
}

.qcld-db-header-subtitle {
    margin: 0;
    color: #94a3b8;
    font-size: 15px;
    max-width: 600px;
    line-height: 1.5;
}

.qcld-db-save-btn {
    background: #3b82f6 !important;
    border: none !important;
    padding: 6px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5) !important;
    transition: all 0.2s !important;
    height: 36px !important;
    line-height: 1.5 !important;
    color: #fff !important;
}

.qcld-db-save-btn:hover {
    background: #2563eb !important;
}

.qcld-db-header-inner .dashicons,
.qcld-db-save-btn .dashicons {
    line-height: 1 !important;
}

.qcld-db-save-status {
    margin-top: 5px;
    font-size: 13px;
    color: #10b981;
    font-weight: bold;
}

.qcld-db-grid-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    transition: grid-template-columns 0.3s ease, gap 0.3s ease;
}

.qcld-db-grid-container.sidebar-collapsed {
    grid-template-columns: 0px 1fr;
    gap: 0px;
}

.qcld-db-grid-container .qcld-db-sidebar {
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.qcld-db-grid-container.sidebar-collapsed .qcld-db-sidebar {
    opacity: 0;
    pointer-events: none;
}

.qcld-db-sidebar-toggle-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
    margin-right: 15px;
}
.qcld-db-sidebar-toggle-btn:hover {
    color: #3b82f6;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.qcld-db-sidebar-panel {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.qcld-db-sidebar-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.qcld-db-input-group {
    margin-bottom: 20px;
}

.qcld-db-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.qcld-db-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.qcld-db-input-help {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

.qcld-db-notice-highlight {
    margin: 15px 0 25px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 5px solid #10b981;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #065f46;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qcld-db-notice-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.qcld-db-notice-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    animation: qcld-shimmer 3s infinite;
}
@keyframes qcld-shimmer {
    100% { transform: translateX(100%); }
}
.qcld-db-notice-highlight span.qcld-db-notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    font-size: 18px;
    flex-shrink: 0;
    z-index: 1;
}
.qcld-db-notice-highlight div.qcld-db-notice-text {
    flex-grow: 1;
    z-index: 1;
}

.qcld-db-fetch-btn {
    width: 100%;
    background: #10b981 !important;
    border: none !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4) !important;
    text-align: center !important;
    height: 42px !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 20px !important;
    line-height: 1 !important;
}

.qcld-db-fetch-btn:hover {
    background: #059669 !important;
}

.qcld-db-fetch-btn .dashicons {
    line-height: 1 !important;
}

.qcld-db-fetch-status {
    margin-top: 15px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.qcld-db-preview-panel-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 600px;
    position: relative;
}

.qcld-db-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.qcld-db-preview-title {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
    font-weight: 700;
}

.qcld-db-preview-badge {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.qcld-db-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qcld-db-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.qcld-db-chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.db-chart-widget {
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}
.db-chart-widget-admin {
    cursor: pointer;
}

.db-chart-widget-admin:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.db-widget-active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.db-chart-title {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #334155;
}

.qcld-db-empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #94a3b8;
}

.qcld-db-empty-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.qcld-db-empty-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #64748b;
}

.qcld-db-empty-desc {
    margin: 0;
    font-size: 15px;
}

.db-kpi-widget {
    color: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.db-kpi-widget-admin {
    cursor: pointer;
    transition: transform 0.2s;
}

.db-kpi-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.db-kpi-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.db-kpi-sub {
    font-size: 12px;
    opacity: 0.9;
    min-height: 14px;
}


/* Extracted Frontend Shortcode Styles */
.qcld-db-front-loading {
    text-align: center;
    padding: 50px;
    color: #64748b;
}

.qcld-db-front-loading-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
}

.qcld-spinner-icon .opacity-25 {
    opacity: 0.25;
}

.qcld-db-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.qcld-db-front-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.db-front-filter {
    flex: 1;
    min-width: 200px;
}

.qcld-db-front-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
}

.qcld-db-front-filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
}

.db-chart-widget {
    width: calc(50% - 10px);
}



                @keyframes qcld-spin { 100% { transform: rotate(360deg); } }
                .qcld-spinner-icon { animation: qcld-spin 1s linear infinite; display: inline-block; width: 24px; height: 24px; vertical-align: middle; margin-right: 8px; color: #3b82f6; }
                .qcld-db-loading-icon { animation: qcld-spin 1.5s linear infinite; display: inline-block; transform-origin: center center; }

/* Extracted Frontend Shortcode Inline Styles */
.qcld-ichart-login-wrap {
    max-width: 420px;
    margin: 60px auto;
    padding: 40px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}
.qcld-ichart-login-wrap h3 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 25px;
}
.qcld-ichart-login-wrap form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.qcld-ichart-login-wrap p {
    margin: 0;
}
.qcld-ichart-login-wrap label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}
.qcld-ichart-login-wrap input[type="text"],
.qcld-ichart-login-wrap input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s;
    box-sizing: border-box;
}
.qcld-ichart-login-wrap input[type="text"]:focus,
.qcld-ichart-login-wrap input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.qcld-ichart-login-wrap .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.qcld-ichart-login-wrap .login-remember label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}
.qcld-ichart-login-wrap .login-submit input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    margin-top: 10px;
}
.qcld-ichart-login-wrap .login-submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.qcld-ichart-permission-wrap {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    text-align: center;
}
.qcld-ichart-permission-wrap .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 20px;
}
.qcld-ichart-permission-wrap h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 15px;
}
.qcld-ichart-permission-wrap p {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0;
}
.qcld-ichart-permission-wrap .qcld-request-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    margin-top: 25px;
    text-decoration: none;
}
.qcld-ichart-permission-wrap .qcld-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}
.qcld-ichart-permission-wrap .qcld-request-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qcld-db-frontend-save-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    margin: 0;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 0 10px;
    cursor: pointer;
}

.qcld-db-frontend-fetch-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 5px 15px;
    cursor: pointer;
}

.qcld-db-tabs-container {
    padding: 15px 25px;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    align-items: center;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.02);
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Custom scrollbar for the tabs container to make it look sleek */
.qcld-db-tabs-container::-webkit-scrollbar {
    height: 6px;
}
.qcld-db-tabs-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.qcld-db-tabs-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.qcld-db-tabs-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.qcld-db-tab-btn-base {
    padding: 10px 20px;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qcld-db-tab-btn-base:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.qcld-db-tab-active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    border: 1px solid transparent !important;
}

.qcld-db-tab-inactive {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.qcld-db-tab-inactive:hover {
    color: #1e293b;
    border-color: #cbd5e1;
}

.qcld-db-tab-add-new-style {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid transparent;
    padding-left: 16px;
}
.qcld-db-tab-add-new-style:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.qcld-db-tab-add-new-style .dashicons {
    line-height: 1 !important;
    vertical-align: middle !important;
}

 . q c l d - d b - t a b s - c o n t a i n e r   { 
         d i s p l a y :   f l e x ; 
         g a p :   1 0 p x ; 
         m a r g i n - b o t t o m :   2 0 p x ; 
         b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
         p a d d i n g - b o t t o m :   0 p x ; 
 } 
 . q c l d - d b - t a b - b t n   { 
         b a c k g r o u n d :   t r a n s p a r e n t ; 
         b o r d e r :   n o n e ; 
         p a d d i n g :   1 2 p x   2 0 p x ; 
         f o n t - s i z e :   1 5 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         c u r s o r :   p o i n t e r ; 
         b o r d e r - b o t t o m :   3 p x   s o l i d   t r a n s p a r e n t ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
         m a r g i n - b o t t o m :   - 2 p x ; 
 } 
 . q c l d - d b - t a b - b t n : h o v e r   { 
         c o l o r :   # 3 b 8 2 f 6 ; 
 } 
 . q c l d - d b - t a b - b t n . a c t i v e   { 
         c o l o r :   # 3 b 8 2 f 6 ; 
         b o r d e r - b o t t o m - c o l o r :   # 3 b 8 2 f 6 ; 
 } 
 . q c l d - d b - t a b - c o n t e n t   { 
         a n i m a t i o n :   q c l d F a d e I n   0 . 3 s   e a s e ; 
 } 
 @ k e y f r a m e s   q c l d F a d e I n   { 
         f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( 5 p x ) ;   } 
         t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 } 
  
 