:root{
    --srf-primary:#0B2F6B;
    --srf-secondary:#267A84;
    --srf-text:#4A4A4A;
    --srf-accent:#61CE70;
    --srf-gold:#D6B46A;
    --srf-pro:#0D9C9A;
}

body{
    color:var(--srf-text);
}

a{
    color:var(--srf-secondary);
}

.btn-primary{
    --bs-btn-bg:var(--srf-primary);
    --bs-btn-border-color:var(--srf-primary);
    --bs-btn-hover-bg:#082756;
    --bs-btn-hover-border-color:#082756;
}

.text-primary{
    color:var(--srf-primary)!important;
}

.progress{
    height:8px;
    background:#e9eef3;
}

.progress-bar{
    background:linear-gradient(90deg,var(--srf-primary),var(--srf-secondary));
}

.app-sidebar{
    --lte-sidebar-width:260px;
}

.sidebar-brand{
    min-height:64px;
    display:flex;
    align-items:center;
    padding:0 18px;
}

.brand-link{
    display:flex;
    align-items:center;
    gap:10px;
    color:#fff;
    font-size:20px;
}

.nav.sidebar-menu .nav-link.active{
    background:rgba(13,156,154,.18);
    color:#fff;
}

.nav.sidebar-menu .nav-link.active .nav-icon{
    color:#6ee7e4;
}

.nav-header{
    margin-top:10px;
    color:#87909a!important;
    font-size:11px!important;
    letter-spacing:.08em;
}

.app-content-header h1{
    color:#1f2933;
    font-weight:700;
}

.card{
    border:1px solid #e0e5ea;
    border-radius:14px;
    box-shadow:0 4px 16px rgba(11,47,107,.04);
}

.card-header{
    background:transparent;
}

.srf-stat-card .card-body{
    position:relative;
    min-height:145px;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
}

.srf-stat-card span,
.srf-stat-card strong,
.srf-stat-card small{
    display:block;
}

.srf-stat-card span{
    color:#6b7280;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.srf-stat-card strong{
    margin:8px 0 3px;
    color:var(--srf-primary);
    font-size:34px;
    line-height:1;
}

.srf-stat-card small{
    color:#8a929a;
}

.srf-stat-icon{
    position:absolute;
    top:16px;
    right:16px;
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#eef7f7;
    color:var(--srf-secondary);
    font-size:20px;
}

.srf-license-icon{
    width:56px;
    height:56px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#ecfdf3;
    color:#067647;
    font-size:28px;
}

.table>thead th{
    color:#6b7280;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.03em;
    background:#f8fafb;
    border-bottom-color:#e0e5ea;
}

.table>:not(caption)>*>*{
    padding:.9rem 1rem;
}

code{
    color:var(--srf-primary);
    background:#f4f7fa;
    border-radius:5px;
    padding:.12rem .3rem;
}

.srf-login-body{
    min-height:100vh;
    margin:0;
    background:
        radial-gradient(circle at 15% 15%,rgba(13,156,154,.18),transparent 32%),
        radial-gradient(circle at 85% 80%,rgba(11,47,107,.18),transparent 34%),
        #f5f7f9;
}

.srf-login-shell{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
}

.srf-login-card{
    width:min(460px,100%);
    padding:36px;
    border:1px solid #e0e5ea;
    border-radius:22px;
    background:#fff;
    box-shadow:0 30px 80px rgba(11,47,107,.12);
}

.srf-login-card h1{
    margin:14px 0 5px;
    color:var(--srf-primary);
    font-size:30px;
    font-weight:800;
}

.srf-login-card p{
    margin:0;
    color:#6b7280;
}

.srf-logo-mark{
    width:56px;
    height:56px;
    display:grid;
    place-items:center;
    border-radius:16px;
    color:#fff;
    background:linear-gradient(135deg,var(--srf-secondary),var(--srf-primary));
    font-size:15px;
    font-weight:800;
    letter-spacing:.06em;
}

.srf-login-security{
    margin-top:22px;
    text-align:center;
    color:#7c858e;
    font-size:12px;
}

.app-footer{
    color:#7c858e;
    font-size:12px;
}

@media(max-width:991.98px){
    .app-sidebar{
        transform:translateX(-100%);
        transition:transform .2s ease;
    }

    body.srf-sidebar-open .app-sidebar{
        transform:translateX(0);
    }

    body.srf-sidebar-open:after{
        content:"";
        position:fixed;
        inset:0;
        z-index:1037;
        background:rgba(0,0,0,.35);
    }

    body.srf-sidebar-open .app-sidebar{
        z-index:1038;
    }
}


/* SiteRFlow Cloud Dashboard v0.2 */
.srf-chart-wrap{
    position:relative;
    min-height:330px;
    height:330px;
}

.srf-funnel-step{
    margin-bottom:22px;
}

.srf-funnel-step:last-child{
    margin-bottom:0;
}

.srf-funnel-step .progress{
    height:14px;
    border-radius:999px;
    overflow:hidden;
}

.srf-funnel-step .progress-bar{
    min-width:2px;
    border-radius:999px;
}


/* SiteRFlow Cloud Dashboard v0.3 */
.srf-credential-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid #edf0f2;
}

.srf-credential-row:last-child{
    border-bottom:0;
}

.srf-config-page{
    padding:16px;
    border:1px solid #e0e5ea;
    border-radius:12px;
    background:#fbfcfd;
}


/* SiteRFlow Cloud Dashboard v0.4 */
.srf-health-icon{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:14px;
    font-size:22px;
}

.srf-health-icon.ok{
    background:#ecfdf3;
    color:#067647;
}

.srf-health-icon.bad{
    background:#fef3f2;
    color:#b42318;
}


/* SiteRFlow Cloud Dashboard v0.4.3 */
.srf-integration-product{
    border:1px solid #e0e5ea;
    border-radius:14px;
    padding:18px;
    background:#fbfcfd;
}


/* SiteRFlow Cloud Dashboard v0.5.0 Outreach */
.srf-pipeline{
    display:grid;
    grid-template-columns:repeat(8,minmax(220px,1fr));
    gap:12px;
    overflow-x:auto;
    padding-bottom:12px;
}
.srf-pipeline-col{
    background:#f7f8fa;
    border:1px solid #e2e6ea;
    border-radius:14px;
    padding:12px;
    min-height:220px;
}
.srf-pipeline-card{
    display:flex;
    flex-direction:column;
    gap:3px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:10px;
    padding:10px;
    margin-bottom:8px;
    color:inherit;
    text-decoration:none;
}
.srf-pipeline-card:hover{
    border-color:#b7c1cc;
}
.srf-pipeline-card span{
    font-size:.78rem;
    color:#6c757d;
}


/* SiteRFlow Cloud Dashboard v0.5.1 */
.srf-top-brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.srf-top-logo{
    width:44px;
    height:32px;
    object-fit:contain;
    border-radius:7px;
}
.srf-sidebar-logo{
    width:38px;
    height:30px;
    object-fit:contain;
    border-radius:7px;
    flex:0 0 auto;
}
.srf-login-logo{
    width:min(260px,100%);
    max-height:78px;
    object-fit:contain;
    display:block;
    margin-bottom:14px;
}
.srf-sidebar-close{
    margin-left:auto;
    color:#fff;
    border:1px solid rgba(255,255,255,.2);
}
.srf-delete-details{
    position:relative;
}
.srf-delete-details>summary{
    list-style:none;
}
.srf-delete-details>summary::-webkit-details-marker{
    display:none;
}
.srf-delete-popover{
    position:absolute;
    z-index:30;
    right:0;
    top:38px;
    width:230px;
    padding:12px;
    background:#fff;
    border:1px solid #e0e5ea;
    border-radius:12px;
    box-shadow:0 12px 35px rgba(11,47,107,.16);
}
.srf-email-preview{
    width:100%;
    min-height:320px;
    border:1px solid #dbe1e7;
    border-radius:12px;
    background:#fff;
}
.srf-html-editor{
    min-height:180px;
}
.srf-status-new{border-top:4px solid #6c757d;}
.srf-status-contacted{border-top:4px solid #0d6efd;}
.srf-status-replied{border-top:4px solid #0dcaf0;}
.srf-status-interested{border-top:4px solid #ffc107;}
.srf-status-demo{border-top:4px solid #212529;}
.srf-status-won{border-top:4px solid #198754;}
.srf-status-lost{border-top:4px solid #dc3545;}
.srf-status-unsubscribed{border-top:4px solid #adb5bd;}

@media(max-width:991.98px){
    body.srf-sidebar-open{
        overflow:hidden;
    }

    .app-sidebar{
        position:fixed !important;
        top:0 !important;
        bottom:0 !important;
        left:0 !important;
        width:280px !important;
        max-width:86vw;
        height:100dvh !important;
        transform:translate3d(-105%,0,0) !important;
        visibility:hidden;
        transition:transform .22s ease, visibility .22s ease !important;
        z-index:1055 !important;
    }

    body.srf-sidebar-open .app-sidebar{
        transform:translate3d(0,0,0) !important;
        visibility:visible;
    }

    body.srf-sidebar-open:after{
        z-index:1050 !important;
    }

    .sidebar-wrapper{
        height:calc(100dvh - 64px);
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }

    .srf-top-brand span{
        font-size:1rem;
    }

    .srf-top-logo{
        width:34px;
        height:28px;
    }

    .app-header .btn.btn-sm.btn-light{
        max-width:150px;
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
}


/* SiteRFlow Cloud Dashboard v0.5.2 — stable sidebar + logo sizing */
.srf-top-logo,
.srf-sidebar-logo{
    width:150px !important;
    max-width:150px !important;
    height:auto !important;
    max-height:46px;
    object-fit:contain;
    border-radius:0;
}

.srf-login-logo{
    width:240px !important;
    max-width:100%;
    height:auto !important;
    max-height:90px;
    object-fit:contain;
    border-radius:0;
}

.sidebar-brand{
    position:relative;
    justify-content:flex-start;
    gap:8px;
}

.sidebar-brand .brand-link{
    min-width:0;
}

.sidebar-brand .brand-text{
    display:none;
}

.srf-sidebar-close{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    padding:0;
    margin-left:auto;
    color:#fff !important;
    background:rgba(255,255,255,.08) !important;
    border:1px solid rgba(255,255,255,.28) !important;
    border-radius:8px;
    z-index:3;
}

.srf-sidebar-close:hover{
    background:rgba(255,255,255,.16) !important;
}

/* Desktop: sidebar open by default; can be fully closed. */
@media(min-width:992px){
    .app-sidebar{
        position:fixed !important;
        top:0 !important;
        bottom:0 !important;
        left:0 !important;
        width:260px !important;
        height:100vh !important;
        transform:translate3d(0,0,0) !important;
        visibility:visible !important;
        z-index:1040 !important;
        transition:transform .22s ease, visibility .22s ease !important;
    }

    .app-header,
    .app-main,
    .app-footer{
        margin-left:260px !important;
        transition:margin-left .22s ease !important;
    }

    body.srf-sidebar-desktop-closed .app-sidebar{
        transform:translate3d(-105%,0,0) !important;
        visibility:hidden !important;
    }

    body.srf-sidebar-desktop-closed .app-header,
    body.srf-sidebar-desktop-closed .app-main,
    body.srf-sidebar-desktop-closed .app-footer{
        margin-left:0 !important;
    }
}

/* Mobile/tablet: drawer is closed by default and overlays content when opened. */
@media(max-width:991.98px){
    .app-header,
    .app-main,
    .app-footer{
        margin-left:0 !important;
    }

    .app-sidebar{
        display:block !important;
        position:fixed !important;
        top:0 !important;
        bottom:0 !important;
        left:0 !important;
        width:280px !important;
        max-width:86vw !important;
        height:100dvh !important;
        transform:translate3d(-105%,0,0) !important;
        visibility:hidden !important;
        opacity:1 !important;
        z-index:1060 !important;
        transition:transform .22s ease, visibility .22s ease !important;
    }

    body.srf-sidebar-open .app-sidebar{
        transform:translate3d(0,0,0) !important;
        visibility:visible !important;
    }

    body.srf-sidebar-open{
        overflow:hidden;
    }

    body.srf-sidebar-open:after{
        content:"";
        position:fixed;
        inset:0;
        z-index:1055 !important;
        background:rgba(0,0,0,.42);
    }

    .sidebar-wrapper{
        height:calc(100dvh - 64px) !important;
        overflow-y:auto !important;
        -webkit-overflow-scrolling:touch;
    }

    .srf-top-brand{
        flex:1 1 auto;
        min-width:0;
        overflow:hidden;
    }

    .srf-top-logo{
        width:150px !important;
        flex:0 0 150px;
    }

    .srf-top-brand span{
        display:none;
    }

    .app-header .container-fluid{
        flex-wrap:nowrap;
    }

    .app-header .ms-auto{
        min-width:0;
    }

    .app-header .btn.btn-sm.btn-light{
        max-width:145px;
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
}
/* FIX AdminLTE sidebar-collapse conflict */
.sidebar-collapse:not(.sidebar-mini) .app-sidebar {
    margin-left: 0 !important;
}

/* Desktop: sidebar-ul nostru este controlat exclusiv prin transform */
@media (min-width: 992px) {
    body:not(.srf-sidebar-desktop-closed) .app-sidebar,
    body.sidebar-collapse:not(.sidebar-mini):not(.srf-sidebar-desktop-closed) .app-sidebar {
        margin-left: 0 !important;
        transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
    }

    body.srf-sidebar-desktop-closed .app-sidebar {
        margin-left: 0 !important;
        transform: translate3d(-105%, 0, 0) !important;
        visibility: hidden !important;
    }
}

/* SiteRFlow Cloud v0.6.10 — unified products/licenses, clinic picker, mobile + dark UI */
.srf-plan-select{min-width:125px;max-width:150px}
.srf-clinic-picker-card{border-color:rgba(13,156,154,.28)}
.srf-connector-option{
    border:1px solid var(--bs-border-color);
    border-radius:14px;
    padding:18px;
    background:var(--bs-tertiary-bg);
}
.srf-vault-note{border-radius:14px}
.srf-account-button{display:flex;align-items:center;gap:.4rem;min-width:0}
.srf-account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* AdminLTE sometimes leaves sidebar-collapse on the body at mobile widths.
   Keep the SiteRFlow drawer full-width and force labels to remain visible. */
.app-sidebar .sidebar-menu,
.app-sidebar .nav,
.app-sidebar .nav-item,
.app-sidebar .nav-link{width:100%!important;max-width:none!important}
.app-sidebar .nav-link{
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    min-height:46px;
    padding:.72rem 1rem!important;
    border-radius:10px;
}
.app-sidebar .nav-link .nav-icon{
    flex:0 0 24px!important;
    width:24px!important;
    margin:0!important;
    text-align:center;
}
.app-sidebar .nav-link p{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    margin:0!important;
    transform:none!important;
    overflow:visible!important;
    white-space:normal!important;
    color:inherit!important;
}
.app-sidebar .nav-header{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    padding:.9rem 1rem .35rem!important;
}

@media(max-width:991.98px){
    .app-sidebar,
    body.sidebar-collapse .app-sidebar,
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .app-sidebar{
        width:min(330px,88vw)!important;
        max-width:88vw!important;
    }

    .sidebar-brand{
        min-height:70px!important;
        padding:0 16px!important;
        border-bottom:1px solid rgba(255,255,255,.09);
    }

    .sidebar-wrapper{
        height:calc(100dvh - 70px)!important;
        padding:10px 10px 24px!important;
    }

    .srf-sidebar-logo{
        width:185px!important;
        max-width:calc(100% - 54px)!important;
    }

    .app-sidebar .nav-link{font-size:1rem}
    .app-sidebar .nav-header{font-size:.72rem!important;letter-spacing:.12em}

    .app-header{min-height:64px}
    .app-header .container-fluid{padding-left:10px;padding-right:10px;gap:6px}
    #srf-sidebar-toggle{padding:.35rem .45rem!important;margin-right:0!important}
    .srf-top-brand{flex:0 1 155px!important}
    .srf-top-logo{width:145px!important;max-width:145px!important}
    .app-header .ms-auto{gap:6px!important}
    .srf-account-button{width:40px;height:38px;justify-content:center;padding:0!important}
    .srf-account-button .srf-account-name{display:none!important}
    .srf-account-button .bi{font-size:1.05rem}
    .app-header form .btn{width:40px;height:38px;padding:0!important}

    .app-content-header .container-fluid{padding-top:.75rem!important}
    .app-content-header h1{font-size:1.65rem!important}
    .app-content .container-fluid{padding-left:12px;padding-right:12px}
    .card{border-radius:12px}

    .srf-products-table{min-width:880px}
    .srf-filter-card .btn{min-height:38px}
}

/* Native dark mode. Bootstrap's variables plus our hard-coded legacy colors are
   overridden here so cards, tables, forms and typography keep readable contrast. */
@media (prefers-color-scheme: dark){
    :root{
        --srf-text:#d7dde5;
    }
    html{color-scheme:dark}
    body{
        --bs-body-bg:#161b20;
        --bs-body-color:#d7dde5;
        --bs-emphasis-color:#f4f7fa;
        --bs-secondary-color:#aeb7c2;
        --bs-secondary-bg:#252b31;
        --bs-tertiary-bg:#20262c;
        --bs-border-color:#3a424b;
        --bs-light-bg-subtle:#252b31;
        background:#161b20!important;
        color:#d7dde5!important;
    }
    .app-wrapper,.app-main,.app-content{background:#161b20!important}
    .app-header{background:#1d2329!important;border-bottom:1px solid #343c45!important}
    .app-sidebar{background:#1b2025!important;border-right:1px solid #343c45!important}
    .sidebar-brand{background:#1b2025!important}
    .app-content-header h1,.card-title,h1,h2,h3,h4,h5,h6,strong{color:#eef2f6}
    a{color:#70c8ce}
    .text-secondary,.form-text,.small.text-secondary{color:#9ea9b5!important}
    .card{
        background:#20262c!important;
        border-color:#3b444d!important;
        box-shadow:0 8px 24px rgba(0,0,0,.16)!important;
        color:#d7dde5;
    }
    .card-header{background:transparent!important;border-color:#3b444d!important}
    .table{--bs-table-bg:transparent;--bs-table-color:#d7dde5;--bs-table-hover-bg:#272e35;--bs-table-hover-color:#f2f5f7;--bs-table-border-color:#39424b;color:#d7dde5}
    .table>thead th{background:#252c33!important;color:#b7c0ca!important;border-bottom-color:#3b444d!important}
    .form-control,.form-select{
        background-color:#171c21!important;
        border-color:#45505b!important;
        color:#eef2f6!important;
    }
    .form-control::placeholder{color:#798591!important}
    .form-control:focus,.form-select:focus{border-color:#0D9C9A!important;box-shadow:0 0 0 .2rem rgba(13,156,154,.18)!important}
    .btn-light{background:#303840!important;border-color:#45505b!important;color:#edf2f6!important}
    .btn-outline-secondary{color:#c5cdd5!important;border-color:#59636e!important}
    .btn-outline-primary{color:#66d0ce!important;border-color:#268e91!important}
    .progress{background:#39424b!important}
    .srf-stat-card span{color:#aeb7c2!important}
    .srf-stat-card strong{color:#4b8dde!important}
    .srf-stat-card small{color:#9ea9b5!important}
    .srf-stat-icon{background:#eaf6f6!important;color:#16858d!important}
    .srf-config-page,.srf-integration-product,.srf-connector-option,.srf-pipeline-col{background:#1a2026!important;border-color:#3b444d!important}
    .srf-pipeline-card{background:#20262c!important;border-color:#3b444d!important}
    .srf-credential-row{border-bottom-color:#39424b!important}
    code{background:#151b20!important;color:#75cecc!important}
    .alert-info{--bs-alert-bg:#153237;--bs-alert-color:#bfe8ea;--bs-alert-border-color:#25545a}
    .alert-success{--bs-alert-bg:#173627;--bs-alert-color:#c6efd6;--bs-alert-border-color:#2b6848}
    .badge.text-bg-light{background:#303840!important;color:#dfe5eb!important;border-color:#4b5661!important}
    .app-footer{background:#1d2329!important;border-top-color:#343c45!important;color:#9ea9b5!important}
}

/* v0.6.11 — picker/access polish */
.srf-clinic-picker-card .form-select-lg { min-height: 48px; }
@media (max-width: 575.98px) {
  .srf-clinic-picker-card .card-body { padding: .85rem; }
  .srf-clinic-picker-card .form-select-lg { font-size: 1rem; }
}
