:root{
    --sidebar:#0b1220;
    --sidebar2:#111827;
    --primary:#155eef;
    --primary2:#1d4ed8;
    --bg:#f4f7fb;
    --card:#fff;
    --text:#0f172a;
    --muted:#64748b;
    --border:#e5e7eb;
    --success:#16a34a;
    --danger:#dc2626;
    --warning:#d97706;
    --shadow:0 16px 42px rgba(15,23,42,.08)
}
*{
    box-sizing:border-box
}
html,body{
    height:100%
}
body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
a{
    text-decoration:none
}
.btn{
    border-radius:14px;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    gap:7px
}
.btn-primary{
    background:var(--primary);
    border-color:var(--primary);
    box-shadow:0 12px 24px rgba(21,94,239,.18)
}
.btn-primary:hover{
    background:var(--primary2);
    border-color:var(--primary2)
}
.btn-success{
    background:#15803d;
    border-color:#15803d
}
.btn-outline-primary{
    border-color:#bfdbfe;
    color:#1d4ed8;
    background:#fff
}
.btn-outline-secondary{
    border-color:#d1d5db;
    color:#334155;
    background:#fff
}
.form-control,.form-select{
    border-radius:14px;
    border:1px solid #d7dde8;
    padding:.74rem .88rem
}
.form-control:focus,.form-select:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 .22rem rgba(37,99,235,.12)
}
.app-shell{
    min-height:100vh;
    display:flex
}
.app-sidebar{
    width:286px;
    background:linear-gradient(180deg,var(--sidebar),var(--sidebar2));
    color:#fff;
    position:fixed;
    inset:0 auto 0 0;
    padding:24px 20px;
    display:flex;
    flex-direction:column;
    z-index:1000;
    box-shadow:14px 0 42px rgba(15,23,42,.22);
    transition:width .22s ease,padding .22s ease
}
.brand-box{
    display:flex;
    align-items:center;
    gap:13px;
    margin-bottom:26px
}
.brand-icon{
    width:48px;
    height:48px;
    border-radius:17px;
    background:linear-gradient(135deg,#2563eb,#38bdf8);
    display:grid;
    place-items:center;
    font-size:24px;
    color:#fff;
    flex:0 0 auto
}
.brand-title{
    font-size:19px;
    font-weight:950;
    letter-spacing:.2px
}
.brand-subtitle{
    font-size:12px;
    color:#94a3b8;
    margin-top:1px
}
.sidebar-menu{
    display:flex;
    flex-direction:column;
    gap:7px
}
.menu-link{
    height:47px;
    display:flex;
    align-items:center;
    gap:13px;
    color:#cbd5e1;
    border-radius:15px;
    padding:0 14px;
    font-weight:800;
    transition:.16s ease
}
.menu-link i{
    font-size:19px;
    width:22px;
    text-align:center
}
.menu-link:hover,.menu-link.active{
    background:rgba(37,99,235,.22);
    color:#fff
}
.menu-link:hover{
    transform:translateX(2px)
}
.sidebar-footer{
    margin-top:auto;
    border-top:1px solid rgba(255,255,255,.10);
    padding-top:18px
}
.user-mini{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:14px
}
.avatar-mini{
    width:42px;
    height:42px;
    border-radius:15px;
    background:#2563eb;
    display:grid;
    place-items:center;
    font-weight:950
}
.user-name{
    font-weight:850;
    font-size:14px
}
.user-email{
    font-size:11px;
    color:#94a3b8;
    max-width:180px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}
.logout-link{
    height:42px;
    border-radius:13px;
    background:rgba(255,255,255,.08);
    color:#e5e7eb;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:850
}
.logout-link:hover{
    background:rgba(239,68,68,.18);
    color:#fecaca
}
.app-content{
    margin-left:286px;
    width:calc(100% - 286px);
    min-height:100vh;
    transition:margin .22s ease,width .22s ease
}
.topbar{
    height:88px;
    background:rgba(255,255,255,.86);
    backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(226,232,240,.95);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 30px;
    position:sticky;
    top:0;
    z-index:800
}
.topbar-left{
    display:flex;
    align-items:center;
    gap:14px
}
.icon-btn{
    width:42px;
    height:42px;
    border:1px solid #e5e7eb;
    border-radius:15px;
    background:#fff;
    color:#0f172a;
    display:grid;
    place-items:center;
    font-size:22px;
    box-shadow:0 10px 24px rgba(15,23,42,.06)
}
.icon-btn:hover{
    color:var(--primary);
    border-color:#bfdbfe
}
.topbar h1{
    font-size:21px;
    font-weight:950;
    margin:0
}
.topbar p{
    margin:3px 0 0;
    color:var(--muted);
    font-size:13px
}
.topbar-actions{
    display:flex;
    align-items:center;
    gap:10px
}
.content-wrapper{
    padding:28px 30px 46px
}
.alert-soft{
    border:0;
    border-radius:18px;
    box-shadow:0 12px 28px rgba(15,23,42,.06);
    display:flex;
    align-items:center;
    gap:8px
}
.app-shell.sidebar-collapsed .app-sidebar,body.sidebar-collapsed .app-sidebar{
    width:92px;
    padding-left:14px;
    padding-right:14px
}
.app-shell.sidebar-collapsed .brand-box,body.sidebar-collapsed .brand-box{
    justify-content:center
}
.app-shell.sidebar-collapsed .brand-copy,.app-shell.sidebar-collapsed .menu-link span,.app-shell.sidebar-collapsed .user-mini-copy,.app-shell.sidebar-collapsed .logout-link span,body.sidebar-collapsed .brand-copy,body.sidebar-collapsed .menu-link span,body.sidebar-collapsed .user-mini-copy,body.sidebar-collapsed .logout-link span{
    display:none!important
}
.app-shell.sidebar-collapsed .menu-link,body.sidebar-collapsed .menu-link{
    justify-content:center;
    padding-left:0;
    padding-right:0
}
.app-shell.sidebar-collapsed .app-content,body.sidebar-collapsed .app-content{
    margin-left:92px;
    width:calc(100% - 92px)
}
.page-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    margin-bottom:20px
}
.page-kicker{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#1d4ed8;
    background:#eff6ff;
    border:1px solid #bfdbfe;
    border-radius:999px;
    padding:6px 11px;
    font-size:12px;
    font-weight:950;
    margin-bottom:8px
}
.page-title h2{
    font-size:25px;
    font-weight:950;
    margin:0
}
.page-title p{
    color:var(--muted);
    margin:5px 0 0
}
.card{
    border:0;
    border-radius:22px;
    background:var(--card);
    box-shadow:var(--shadow)
}
.card-header-clean{
    padding:20px 22px;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between
}
.card-body-pad{
    padding:22px
}
.kpi-card{
    padding:22px;
    min-height:126px;
    position:relative;
    overflow:hidden
}
.kpi-card:after{
    content:"";
    position:absolute;
    right:-28px;
    top:-28px;
    width:104px;
    height:104px;
    border-radius:50%;
    background:rgba(21,94,239,.08)
}
.kpi-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px
}
.kpi-label{
    color:var(--muted);
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.05em
}
.kpi-value{
    font-size:28px;
    font-weight:950;
    margin-top:8px
}
.kpi-foot{
    font-size:12px;
    color:var(--muted);
    margin-top:4px
}
.kpi-icon{
    width:30px;
    height:30px;
    border-radius:15px;
    display:grid;
    place-items:center;
    color:#1d4ed8;
    font-size:21px;
    flex:0 0 auto
}
.kpi-success .kpi-icon{
    background:#dcfce7;
    color:#166534
}
.kpi-danger .kpi-icon{
    background:#fee2e2;
    color:#991b1b
}
.chart-card canvas{
    max-height:360px
}
.quick-link{
    display:flex;
    align-items:center;
    gap: 5px;
    padding: 10px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    color:#0f172a;
    background:linear-gradient(180deg,#fff,#f8fafc);
    font-weight: 400;
    min-height:74px;
    transition:.16s
}
.quick-link i{
    width:42px;
    height:42px;
    border-radius:15px;
    background:#eff6ff;
    color:#1d4ed8;
    display:grid;
    place-items:center;
    font-size:20px
}
.quick-link:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 30px rgba(15,23,42,.09);
    border-color:#bfdbfe
}
.action-card{
    padding:24px;
    color:#fff;
    min-height:100%;
    overflow:hidden;
    position:relative
}
.blue-gradient{
    background:linear-gradient(135deg,#155eef,#0f172a)
}
.action-card:after{
    content:"";
    position:absolute;
    right:-50px;
    top:-50px;
    width:160px;
    height:160px;
    border-radius:50%;
    background:rgba(255,255,255,.12)
}
.action-icon{
    width:56px;
    height:56px;
    border-radius:18px;
    background:rgba(255,255,255,.16);
    display:grid;
    place-items:center;
    font-size:26px;
    margin-bottom:16px
}
.action-card h5{
    font-weight:950
}
.action-value{
    font-size:32px;
    font-weight:950;
    margin:8px 0
}
.action-card p{
    color:rgba(255,255,255,.80)
}
.table-card{
    overflow:visible
}
.table-responsive{
    overflow:visible
}
.table{
    margin-bottom:0
}
.table thead th{
    color:#475569;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
    border-bottom:1px solid #e5e7eb;
    padding:15px 16px
}
.table tbody td{
    padding:16px;
    border-color:#eef2f7;
    vertical-align:middle
}
.empty-state{
    padding:42px;
    text-align:center;
    color:#64748b
}
.tabs-pro{
    display:flex;
    gap:8px;
    background:#eaf0f8;
    padding:7px;
    border-radius:18px;
    width:max-content;
    max-width:100%;
    overflow:auto
}
.tab-pro{
    border:0;
    background:transparent;
    color:#475569;
    border-radius:14px;
    padding:10px 16px;
    font-weight:900;
    white-space:nowrap
}
.tab-pro.active{
    background:#fff;
    color:#0f172a;
    box-shadow:0 10px 22px rgba(15,23,42,.08)
}
.tab-panel-pro{
    display:none
}
.tab-panel-pro.active{
    display:block
}
.badge-rec{
    background:#ede9fe;
    color:#5b21b6
}
.badge-single{
    background:#dbeafe;
    color:#1d4ed8
}
.muted-small{
    font-size:11px;
    color:#64748b;
    margin-top:2px
}
.status-pill{
    font-weight:900
}
.status-paid{
    background:#dcfce7;
    color:#166534
}
.status-open{
    background:#fef3c7;
    color:#92400e
}
.status-overdue{
    background:#fee2e2;
    color:#991b1b
}
.actions-wrap{
    position:relative;
    display:inline-block
}
.actions-trigger{
    width:38px;
    height:38px;
    border-radius:13px!important;
    display:inline-grid!important;
    place-items:center!important;
    padding:0!important;
    background:#f8fafc!important;
    border:1px solid #e5e7eb!important
}
.actions-menu{
    display:none;
    position:absolute;
    right:0;
    top:44px;
    min-width:232px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:17px;
    box-shadow:0 24px 70px rgba(15,23,42,.20);
    padding:8px;
    z-index:5000;
    text-align:left
}
.actions-menu.show{
    display:block
}
.actions-menu a,.actions-menu button{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    border:0;
    background:transparent;
    color:#0f172a;
    padding:11px 12px;
    border-radius:13px;
    font-weight:850;
    font-size:13px;
    text-align:left;
    white-space:nowrap
}
.actions-menu a:hover,.actions-menu button:hover{
    background:#f1f5f9
}
.actions-menu .danger:hover{
    background:#fef2f2;
    color:#991b1b
}
.modal-pro{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(15,23,42,.68);
    z-index:999999;
    padding:22px
}
.modal-pro.is-open{
    display:flex
}
.modal-pro-card{
    width:100%;
    max-width:590px;
    background:#fff;
    border-radius:24px;
    box-shadow:0 35px 110px rgba(0,0,0,.36);
    overflow:hidden;
    animation:modalProIn .16s ease-out
}
.modal-pro-card form{
    margin:0
}
.modal-pro-header{
    padding:24px 28px;
    border-bottom:1px solid #e5e7eb;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    background:linear-gradient(180deg,#fff,#f8fafc)
}
.modal-pro-header.danger{
    background:linear-gradient(180deg,#fff,#fff5f5)
}
.modal-pro-header h5{
    margin:0;
    font-size:19px;
    font-weight:950;
    color:#0f172a
}
.modal-pro-header p{
    margin:4px 0 0;
    color:#64748b;
    font-size:13px
}
.modal-pro-close{
    width:38px;
    height:38px;
    border:0;
    border-radius:13px;
    background:#f1f5f9;
    color:#475569;
    display:grid;
    place-items:center
}
.modal-pro-body{
    padding:24px 28px
}
.modal-pro-footer{
    padding:18px 28px;
    background:#f8fafc;
    border-top:1px solid #e5e7eb;
    display:flex;
    justify-content:flex-end;
    gap:10px
}
.modal-info-box{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:14px 16px;
    color:#334155
}
.danger-check{
    background:#fff7ed;
    border:1px solid #fed7aa;
    border-radius:16px;
    padding:14px 16px 14px 40px
}
.modal-open-pro{
    overflow:hidden!important
}
@keyframes modalProIn{
    from{
        opacity:0;
        transform:translateY(10px) scale(.985)
    }
    to{
        opacity:1;
        transform:translateY(0) scale(1)
    }
}
.login-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    background:radial-gradient(circle at top left,#dbeafe,transparent 32%),linear-gradient(135deg,#f8fafc,#eef2ff)
}
.login-card{
    width:100%;
    max-width:430px;
    padding:34px;
    border-radius:26px;
    background:#fff;
    box-shadow:0 28px 70px rgba(15,23,42,.14)
}
.login-logo{
    width:58px;
    height:58px;
    border-radius:18px;
    background:#2563eb;
    color:#fff;
    display:grid;
    place-items:center;
    font-size:28px;
    margin-bottom:18px
}
.login-card h3{
    font-weight:950
}
.login-card .muted{
    color:var(--muted);
    margin-bottom:22px
}
.module-tags{
    display:flex;
    gap:5px;
    flex-wrap:wrap
}
.module-tags span{
    font-size:11px;
    font-weight:850;
    color:#1e40af;
    background:#dbeafe;
    border-radius:999px;
    padding:5px 8px
}
.module-checks{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px
}
.check-card{
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid #e5e7eb;
    background:#fff;
    border-radius:14px;
    padding:12px 14px;
    font-weight:850;
    color:#334155
}
.video-card{
    overflow:hidden;
    height:100%
}
.video-thumb{
    width:100%;
    height:180px;
    object-fit:cover;
    background:#e5e7eb
}
.text-muted{
    color:#94a3b8!important
}
@media(max-width:950px){
    .app-sidebar{
        width:92px;
        padding-left:14px;
        padding-right:14px
    }
    .brand-copy,.menu-link span,.user-mini-copy,.logout-link span{
        display:none!important
    }
    .brand-box{
        justify-content:center
    }
    .menu-link{
        justify-content:center;
        padding-left:0;
        padding-right:0
    }
    .app-content{
        margin-left:92px;
        width:calc(100% - 92px)
    }
    .topbar{
        padding:0 18px
    }
    .content-wrapper{
        padding:20px 16px
    }
    .page-head{
        align-items:flex-start;
        flex-direction:column
    }
    .module-checks{
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}
@media(max-width:700px){
    .topbar-actions{
        display:none
    }
    .topbar p{
        display:none
    }
    .table-responsive{
        overflow:auto
    }
    .tabs-pro{
        width:100%
    }
    .tab-pro{
        flex:1
    }
    .modal-pro-card{
        max-width:94vw
    }
    .modal-pro-footer{
        flex-direction:column-reverse
    }
    .modal-pro-footer .btn{
        width:100%
    }
    .choice-row{
        grid-template-columns:1fr
    }
    .module-checks{
        grid-template-columns:1fr
    }
    .kpi-value{
        font-size:24px
    }
}

/* V11 - Grids profissionais com DataTables e filtros */
.grid-shell {
    margin-bottom: 22px;
}
.grid-filters {
    background: #ffffff;
    border: 1px solid #e6ecf5;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}
.grid-filters label {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 6px;
}
.grid-filters .form-control,
.grid-filters .form-select {
    min-height: 42px;
    border-radius: 12px;
    border-color: #dbe4f0;
}
.table-card .dataTables_wrapper {
    padding: 16px;
}
.table-card table.dataTable {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
}
.dt-top {
    margin-bottom: 14px;
}
.dt-bottom {
    margin-top: 14px;
}
.dt-buttons .btn {
    border-radius: 10px !important;
    border: 1px solid #dbe4f0 !important;
    color: #334155 !important;
}
.dataTables_filter input,
.dataTables_length select {
    border: 1px solid #dbe4f0 !important;
    border-radius: 12px !important;
    padding: 7px 10px !important;
    margin-left: 8px !important;
}
.dataTables_info {
    color: #64748b;
    font-size: 13px;
}
.page-link {
    border-radius: 10px !important;
    margin: 0 2px;
    border-color: #dbe4f0;
    color: #2563eb;
}
.page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
}
.table thead th {
    white-space: nowrap;
}
.client-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-right: 10px;
}
.client-line {
    display: flex;
    align-items: center;
}
.client-meta {
    line-height: 1.25;
}
.action-dropdown {
    position: relative;
}
.field-hint {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== GRID CLIENTES COMPACTO ===== */

.tabela-clientes {
    width: 100% !important;
    table-layout: auto;
}

.tabela-clientes th,
.tabela-clientes td {
    white-space: nowrap;
    vertical-align: middle;
}

.tabela-clientes th {
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.td-id {
    width: 55px;
}

.td-cliente {
    min-width: 220px;
}

.client-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.client-name {
    font-weight: 800;
    color: #0f172a;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-phone {
    font-size: 12px;
    color: #64748b;
}

.td-email {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-plano {
    min-width: 130px;
}

.td-plano span {
    display: inline-block;
    margin-right: 4px;
}

.td-banco {
    min-width: 150px;
}

.banco-nome {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: #64748b;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.actions-cell {
    width: 1%;
    white-space: nowrap !important;
    text-align: right;
}

.actions-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.actions-inline .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.dt-buttons {
    display: none !important;
}

.dataTables_wrapper .row {
    align-items: center;
}

.dt-search {
    display:none!important
}

.table-responsive{
    overflow-x:auto;
}

table.dataTable{
    width:100% !important;
}

table.dataTable td,
table.dataTable th{
    white-space:nowrap;
}

/* Todas as tabelas */
.datatable-pro {
    width: 100% !important;
}

.datatable-pro th,
.datatable-pro td {
    white-space: nowrap;
    vertical-align: middle;
}

/* Última coluna (Ações) */
.datatable-pro th:last-child,
.datatable-pro td:last-child {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    text-align: center;
}

/* Colunas de links */
.datatable-pro td .d-flex {
    flex-wrap: nowrap !important;
}

/* Cliente ocupa o espaço restante */
.datatable-pro td:nth-child(3) {
    white-space: normal;
}

/* Botão de ações */
.actions-wrap {
    display: flex;
    justify-content: center;
}

.dt-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.datatable-pro {
    width: 100% !important;
}

.datatable-pro th,
.datatable-pro td {
    vertical-align: middle;
    white-space: nowrap;
}

.datatable-pro th:last-child,
.datatable-pro td:last-child,
.datatable-pro .actions-col {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    text-align: center !important;
}

.datatable-pro td:last-child .actions-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.datatable-pro .btn-sm {
    white-space: nowrap;
}

.datatable-pro td .d-flex.gap-1 {
    flex-wrap: nowrap !important;
}