/* =====================================================================
   CRM SOLAR - Design System
   Tema claro e escuro, sidebar, cards, kanban e componentes.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. VARIAVEIS DE TEMA
   --------------------------------------------------------------------- */
:root {
    /* Marca */
    --brand:            #f59e0b;
    --brand-600:        #d97706;
    --brand-400:        #fbbf24;
    --brand-soft:       rgba(245, 158, 11, .12);
    --accent:           #0ea5e9;
    --accent-soft:      rgba(14, 165, 233, .12);

    /* Estados */
    --success:          #22c55e;
    --success-soft:     rgba(34, 197, 94, .12);
    --danger:           #ef4444;
    --danger-soft:      rgba(239, 68, 68, .12);
    --warning:          #f59e0b;
    --warning-soft:     rgba(245, 158, 11, .12);
    --info:             #3b82f6;
    --info-soft:        rgba(59, 130, 246, .12);

    /* Superficies (tema claro) */
    --bg:               #f1f5f9;
    --bg-alt:           #e2e8f0;
    --surface:          #ffffff;
    --surface-2:        #f8fafc;
    --surface-3:        #f1f5f9;
    --border:           #e2e8f0;
    --border-strong:    #cbd5e1;

    /* Texto */
    --text:             #0f172a;
    --text-muted:       #64748b;
    --text-soft:        #94a3b8;
    --text-invert:      #ffffff;

    /* Sidebar */
    --sidebar-bg:       #0f172a;
    --sidebar-text:     #94a3b8;
    --sidebar-active:   #ffffff;
    --sidebar-hover:    rgba(255, 255, 255, .06);
    --sidebar-width:    268px;
    --sidebar-collapsed: 76px;
    --topbar-height:    66px;

    /* Sombras */
    --shadow-xs:  0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm:  0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow:     0 4px 12px rgba(15, 23, 42, .07);
    --shadow-lg:  0 12px 32px rgba(15, 23, 42, .10);
    --shadow-xl:  0 24px 56px rgba(15, 23, 42, .14);

    /* Raios */
    --radius-sm:  8px;
    --radius:     12px;
    --radius-lg:  16px;
    --radius-xl:  22px;

    /* Movimento */
    --t-fast:   .15s cubic-bezier(.4, 0, .2, 1);
    --t:        .24s cubic-bezier(.4, 0, .2, 1);
    --t-slow:   .4s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --bg:            #0b1120;
    --bg-alt:        #0f172a;
    --surface:       #131c30;
    --surface-2:     #1a2440;
    --surface-3:     #223052;
    --border:        #223052;
    --border-strong: #334166;

    --text:          #e8edf7;
    --text-muted:    #94a3b8;
    --text-soft:     #64748b;

    --sidebar-bg:    #080e1c;
    --sidebar-hover: rgba(255, 255, 255, .05);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow:    0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, .5);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, .6);

    /* Faz os componentes do Bootstrap acompanharem o tema escuro,
       evitando texto preto (--bs-body-color: #212529) em cards,
       modais, tabelas e formularios. */
    --bs-body-color:         var(--text);
    --bs-body-bg:            var(--bg);
    --bs-secondary-color:    var(--text-muted);
    --bs-secondary-bg:       var(--surface-2);
    --bs-tertiary-color:     var(--text-soft);
    --bs-tertiary-bg:        var(--surface-3);
    --bs-emphasis-color:     var(--text);
    --bs-border-color:       var(--border);
    --bs-card-color:         var(--text);
    --bs-card-bg:            var(--surface);
    --bs-card-cap-bg:        var(--surface-2);
    --bs-table-color:        var(--text);
    --bs-table-hover-color:  var(--text);
    --bs-table-striped-bg:   var(--surface-2);
    --bs-link-color:         var(--accent);
    --bs-link-hover-color:   var(--brand);
    --bs-code-color:         var(--accent);
}

/* ---------------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background var(--t), color var(--t);
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand); }

h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 700; letter-spacing: -.015em; }

hr { border-color: var(--border); opacity: 1; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

::selection { background: var(--brand-soft); color: var(--text); }

/* ---------------------------------------------------------------------
   3. LAYOUT PRINCIPAL
   --------------------------------------------------------------------- */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--t), transform var(--t);
    border-right: 1px solid rgba(255, 255, 255, .05);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), #f97316);
    display: grid; place-items: center;
    color: #0f172a; font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
}

.sidebar-brand {
    color: #fff; font-weight: 700; font-size: 16px;
    white-space: nowrap; overflow: hidden;
    transition: opacity var(--t);
}
.sidebar-brand small { display: block; font-size: 11px; color: var(--sidebar-text); font-weight: 500; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 24px;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); }

.nav-section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
    font-weight: 700;
    padding: 18px 12px 8px;
    white-space: nowrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.nav-link i { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: var(--sidebar-hover); color: #e2e8f0; transform: translateX(2px); }

.nav-link.active {
    background: linear-gradient(90deg, var(--brand-soft), transparent);
    color: var(--sidebar-active);
    font-weight: 600;
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 22px;
    border-radius: 0 4px 4px 0;
    background: var(--brand);
}
.nav-link.active i { color: var(--brand); }

.nav-badge {
    margin-left: auto;
    background: var(--brand);
    color: #0f172a;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.5;
}

/* Submenu */
.nav-group > .nav-link .nav-caret { margin-left: auto; font-size: 12px; transition: transform var(--t); }
.nav-group.open > .nav-link .nav-caret { transform: rotate(90deg); }
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-slow);
    padding-left: 34px;
}
.nav-group.open .nav-submenu { max-height: 520px; }
.nav-submenu .nav-link { padding: 7px 12px; font-size: 13px; }
.nav-submenu .nav-link.active::before { display: none; }

/* Sidebar recolhida */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-caret,
.sidebar.collapsed .nav-badge { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 11px; }
.sidebar.collapsed .nav-submenu { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; }

/* Tooltip da sidebar recolhida */
.sidebar.collapsed .nav-link::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(.9);
    background: var(--sidebar-bg);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: opacity var(--t-fast), transform var(--t-fast);
    z-index: 100;
}
.sidebar.collapsed .nav-link:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }

/* Conteudo */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--t);
}
.sidebar.collapsed ~ .app-main { margin-left: var(--sidebar-collapsed); }

.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(12px);
}

.topbar-btn {
    width: 38px; height: 38px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    display: grid; place-items: center;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: background var(--t-fast), color var(--t-fast);
}
.topbar-btn:hover { background: var(--surface-3); color: var(--text); }

.topbar-search {
    position: relative;
    flex: 1;
    max-width: 440px;
}
.topbar-search i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft); font-size: 15px;
    pointer-events: none;
}
.topbar-search input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 13.5px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.topbar-search input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.badge-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--surface);
}

.page-content { padding: 24px; flex: 1; }

/* ---------------------------------------------------------------------
   4. COMPONENTES
   --------------------------------------------------------------------- */

/* Cabecalho de pagina */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-subtitle { color: var(--text-muted); font-size: 13.5px; margin: 3px 0 0; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-header h5, .card-header h6 { margin: 0; font-size: 15px; font-weight: 650; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Card de KPI */
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--t), box-shadow var(--t);
}
.kpi-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--kpi-color, var(--brand));
    opacity: .9;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: grid; place-items: center;
    font-size: 21px;
    background: var(--kpi-soft, var(--brand-soft));
    color: var(--kpi-color, var(--brand));
    margin-bottom: 14px;
}
.kpi-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; margin: 0; }
.kpi-value { font-size: 27px; font-weight: 750; letter-spacing: -.03em; margin: 3px 0 0; line-height: 1.15; }
.kpi-trend { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.flat { color: var(--text-soft); }

/* Botoes */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 18px;
    border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: all var(--t-fast);
    cursor: pointer;
    white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn i { font-size: 15px; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #f97316);
    color: #1c1917;
    box-shadow: 0 3px 12px rgba(245, 158, 11, .3);
}
.btn-primary:hover { filter: brightness(1.06); color: #1c1917; box-shadow: 0 6px 18px rgba(245, 158, 11, .4); }

.btn-secondary, .btn-light {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.btn-secondary:hover, .btn-light:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }

.btn-outline-primary { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline-primary:hover { background: var(--brand); color: #1c1917; }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* Formularios */
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-label .req { color: var(--danger); }

.form-control, .form-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13.5px;
    padding: 9px 13px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    color: var(--text);
}
.form-control::placeholder { color: var(--text-soft); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-3); opacity: .8; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.invalid-feedback { font-size: 12px; color: var(--danger); }

.form-check-input { border-color: var(--border-strong); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }

.input-group-text { background: var(--surface-3); border-color: var(--border); color: var(--text-muted); border-radius: 10px; }

/* Tabelas */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); }
.table {
    color: var(--text);
    margin: 0;
    border-color: var(--border);
    --bs-table-bg: transparent;
}
.table > thead > tr > th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table > tbody > tr > td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 13.5px;
}
.table > tbody > tr { transition: background var(--t-fast); }
.table > tbody > tr:hover { background: var(--surface-2); }
.table > tbody > tr:last-child > td { border-bottom: none; }

/* Badges */
.badge {
    font-weight: 600;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .01em;
}
.badge-soft-success { background: var(--success-soft); color: var(--success); }
.badge-soft-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-soft-warning { background: var(--warning-soft); color: var(--warning); }
.badge-soft-info    { background: var(--info-soft);    color: var(--info); }
.badge-soft-primary { background: var(--brand-soft);   color: var(--brand-600); }
.badge-soft-secondary { background: var(--surface-3);  color: var(--text-muted); }

/* Avatares */
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    object-fit: cover;
    text-transform: uppercase;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-xl { width: 82px; height: 82px; font-size: 26px; }
.avatar-group { display: flex; }
.avatar-group .avatar { margin-left: -10px; border: 2px solid var(--surface); }
.avatar-group .avatar:first-child { margin-left: 0; }

/* Dropdowns */
.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 7px;
    font-size: 13.5px;
    animation: dropIn var(--t-fast);
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown-item {
    color: var(--text);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex; align-items: center; gap: 10px;
    transition: background var(--t-fast);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--text); }
.dropdown-item.text-danger:hover { background: var(--danger-soft); color: var(--danger); }
.dropdown-divider { border-color: var(--border); margin: 6px 0; }
.dropdown-header { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* Modais */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; }
.modal-title { font-size: 16.5px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 15px 22px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.btn-close { filter: var(--close-filter, none); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(2); }

/* Offcanvas */
.offcanvas { background: var(--surface); color: var(--text); border-color: var(--border); }
.offcanvas-header { border-bottom: 1px solid var(--border); }

/* Abas */
.nav-tabs { border-bottom: 1px solid var(--border); gap: 4px; }
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
}
.nav-tabs .nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-tabs .nav-link.active {
    color: var(--brand);
    background: transparent;
    border-bottom-color: var(--brand);
}

/* Paginacao */
.pagination { gap: 4px; }
.page-link {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 9px !important;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    transition: all var(--t-fast);
}
.page-link:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #1c1917; }
.page-item.disabled .page-link { opacity: .45; background: var(--surface); }

/* Alertas */
.alert { border: 1px solid transparent; border-radius: var(--radius); font-size: 13.5px; padding: 13px 17px; }
.alert-success { background: var(--success-soft); border-color: rgba(34,197,94,.25); color: var(--success); }
.alert-danger  { background: var(--danger-soft);  border-color: rgba(239,68,68,.25);  color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: rgba(245,158,11,.25); color: var(--brand-600); }
.alert-info    { background: var(--info-soft);    border-color: rgba(59,130,246,.25); color: var(--info); }

/* Toasts */
.toast-container { position: fixed; top: 82px; right: 22px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; }
.toast-item {
    min-width: 310px;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    display: flex; align-items: flex-start; gap: 12px;
    animation: toastIn .32s cubic-bezier(.2, .9, .3, 1.3);
}
.toast-item.hiding { animation: toastOut .25s forwards; }
.toast-item.success { border-left-color: var(--success); }
.toast-item.error   { border-left-color: var(--danger); }
.toast-item.warning { border-left-color: var(--warning); }
.toast-item.info    { border-left-color: var(--info); }
.toast-item i.toast-icon { font-size: 19px; margin-top: 1px; }
.toast-item.success i.toast-icon { color: var(--success); }
.toast-item.error   i.toast-icon { color: var(--danger); }
.toast-item.warning i.toast-icon { color: var(--warning); }
.toast-item.info    i.toast-icon { color: var(--info); }
.toast-body-text { flex: 1; font-size: 13.5px; }
.toast-title { font-weight: 700; display: block; margin-bottom: 2px; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(110%); } }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-text { height: 12px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 45%; margin-bottom: 14px; }
.skeleton-card { height: 118px; border-radius: var(--radius-lg); }
.skeleton-circle { border-radius: 50%; }

/* Estado vazio */
.empty-state { text-align: center; padding: 56px 22px; }
.empty-state i { font-size: 52px; color: var(--text-soft); opacity: .5; margin-bottom: 14px; display: block; }
.empty-state h5 { font-size: 16px; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px; }

/* Timeline */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 13px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-dot {
    position: absolute;
    left: -34px; top: 1px;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    z-index: 1;
}
.timeline-item.is-ligacao   .timeline-dot { border-color: var(--info);    color: var(--info); }
.timeline-item.is-whatsapp  .timeline-dot { border-color: #25d366;        color: #25d366; }
.timeline-item.is-email     .timeline-dot { border-color: #8b5cf6;        color: #8b5cf6; }
.timeline-item.is-visita    .timeline-dot { border-color: var(--brand);   color: var(--brand); }
.timeline-item.is-proposta  .timeline-dot { border-color: var(--success); color: var(--success); }
.timeline-item.is-etapa     .timeline-dot { border-color: var(--accent);  color: var(--accent); }
.timeline-content {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 16px;
}
.timeline-time { font-size: 11.5px; color: var(--text-soft); }

/* ---------------------------------------------------------------------
   5. KANBAN
   --------------------------------------------------------------------- */
.kanban-board {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    min-height: calc(100vh - 210px);
    scroll-behavior: smooth;
}

.kanban-column {
    flex: 0 0 306px;
    width: 306px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 210px);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.kanban-column.drag-over { background: var(--brand-soft); border-color: var(--brand); border-style: dashed; }

.kanban-column-header {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 9px;
    flex-shrink: 0;
    position: sticky; top: 0;
    background: var(--surface-2);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 2;
}
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kanban-column-title { font-size: 13px; font-weight: 700; margin: 0; flex: 1; }
.kanban-count {
    background: var(--surface-3);
    color: var(--text-muted);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}
.kanban-column-total { font-size: 11.5px; color: var(--text-muted); padding: 0 15px 9px; font-weight: 600; }

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.kanban-cards::-webkit-scrollbar { width: 5px; }

.kanban-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px;
    cursor: grab;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
    position: relative;
}
.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; transform: rotate(2deg) scale(.98); }
.kanban-card.alerta::before {
    content: '';
    position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: var(--danger);
}
.kanban-card-title { font-size: 13.5px; font-weight: 650; margin: 0 0 5px; line-height: 1.35; }
.kanban-card-meta { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.kanban-card-value { font-size: 14px; font-weight: 700; color: var(--success); }
.kanban-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--border);
}
.temp-quente { color: #ef4444; }
.temp-morno  { color: #f59e0b; }
.temp-frio   { color: #38bdf8; }

/* ---------------------------------------------------------------------
   Dropdown do card (3 pontinhos)
   Sem essas regras o menu abre POR BAIXO do card seguinte: o :hover do
   card aplica transform, criando um stacking context que prende o menu,
   e o overflow do .kanban-cards corta o que passar da lista.
   --------------------------------------------------------------------- */
.kanban-card.menu-aberto {
    transform: none;
    z-index: 40;
}
.kanban-cards.menu-aberto,
.kanban-column.menu-aberto,
.kanban-board.menu-aberto {
    overflow: visible;
}

/* Fallback para navegadores com suporte a :has() */
.kanban-card:has(.dropdown-menu.show) {
    transform: none;
    z-index: 40;
}
.kanban-cards:has(.dropdown-menu.show),
.kanban-column:has(.dropdown-menu.show),
.kanban-board:has(.dropdown-menu.show) {
    overflow: visible;
}

/* ---------------------------------------------------------------------
   Dropdown de acoes dentro de tabela (3 pontinhos)
   O .table-responsive do Bootstrap tem overflow-x: auto, que corta o
   menu aberto (fica por baixo/por tras das colunas seguintes). Deixar o
   overflow visivel apenas enquanto o menu esta aberto resolve sem perder
   o scroll horizontal quando nao ha menu.
   --------------------------------------------------------------------- */
.table-responsive:has(.dropdown-menu.show) {
    overflow: visible;
}
.table-responsive .dropdown-menu.show {
    z-index: 1060;
}

/* ---------------------------------------------------------------------
   6. LANDING PAGE
   --------------------------------------------------------------------- */
.landing-page { background: var(--bg); color: var(--text); }

.landing-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.landing-nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 16px 0;
}
.landing-brand {
    display: flex; align-items: center; gap: 12px;
    color: #fff; font-weight: 700; font-size: 17px; text-decoration: none;
}
.landing-brand:hover { color: var(--brand-400); }
.landing-brand--sm { font-size: 15px; }
.landing-brand-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #f97316);
    display: grid; place-items: center; color: #0f172a; font-size: 20px;
    box-shadow: 0 6px 18px rgba(245, 158, 11, .35);
}
.landing-nav-links { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; }
.landing-nav-links a { color: rgba(255,255,255,.72); font-size: 14px; font-weight: 500; text-decoration: none; transition: color var(--t-fast); }
.landing-nav-links a:hover { color: #fff; }

.landing-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(140deg, #0f172a 0%, #1e293b 45%, #78350f 100%);
    color: #fff; padding: 80px 0 100px;
}
.landing-hero-glow {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(245,158,11,.3), transparent 68%);
    animation: floaty 9s ease-in-out infinite;
}
.landing-hero-glow--1 { width: 520px; height: 520px; top: -120px; right: -100px; }
.landing-hero-glow--2 {
    width: 400px; height: 400px; bottom: -80px; left: -80px;
    background: radial-gradient(circle, rgba(14,165,233,.25), transparent 68%);
    animation-duration: 11s; animation-direction: reverse;
}
.landing-hero .container { position: relative; z-index: 1; }
.landing-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(245, 158, 11, .15); color: var(--brand-400);
    font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.landing-hero h1 { color: #fff; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; margin-bottom: 20px; max-width: 560px; }
.landing-hero-text { color: rgba(255,255,255,.75); font-size: 17px; max-width: 520px; margin-bottom: 32px; }
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.landing-hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 28px; }
.landing-hero-stats li { color: rgba(255,255,255,.65); font-size: 14px; }
.landing-hero-stats strong { display: block; color: #fff; font-size: 24px; font-weight: 800; }

.landing-preview {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-xl); backdrop-filter: blur(8px);
}
.landing-preview-bar { display: flex; gap: 8px; padding: 14px 18px; background: rgba(0,0,0,.2); }
.landing-preview-bar span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.2); }
.landing-preview-bar span:first-child { background: #ef4444; }
.landing-preview-bar span:nth-child(2) { background: #f59e0b; }
.landing-preview-bar span:nth-child(3) { background: #22c55e; }
.landing-preview-body { padding: 24px; }
.landing-preview-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.landing-kpi {
    background: rgba(255,255,255,.08); border-radius: var(--radius);
    padding: 14px; font-size: 12px; color: rgba(255,255,255,.65);
}
.landing-kpi strong { display: block; color: #fff; font-size: 20px; margin: 4px 0; }
.landing-kpi .text-success { color: #4ade80 !important; }
.landing-kpi .text-brand { color: var(--brand-400) !important; }
.landing-preview-chart {
    display: flex; align-items: flex-end; gap: 10px; height: 100px;
    padding: 12px; background: rgba(0,0,0,.15); border-radius: var(--radius); margin-bottom: 16px;
}
.landing-chart-bar {
    flex: 1; border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
    opacity: .85;
}
.landing-preview-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.landing-pipe-col {
    text-align: center; padding: 10px 6px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,.06); font-size: 11px; color: rgba(255,255,255,.7);
}

.landing-section { padding: 90px 0; }
.landing-section--alt { background: var(--surface); }
.landing-section-head { max-width: 640px; margin: 0 auto 56px; }
.landing-section-head h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 14px; }
.landing-section-head p { color: var(--text-muted); font-size: 16px; }
.landing-label { display: block; color: var(--brand); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }

.landing-card {
    height: 100%; padding: 28px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t);
}
.landing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.landing-card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 24px; margin-bottom: 18px;
}
.landing-card h3 { font-size: 18px; margin-bottom: 10px; }
.landing-card p { color: var(--text-muted); margin: 0; font-size: 14px; line-height: 1.6; }

.landing-modules { display: flex; flex-wrap: wrap; gap: 10px; }
.landing-module-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: 13px; font-weight: 500; color: var(--text);
}

.landing-security {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
    padding: 40px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.landing-security-icon {
    width: 72px; height: 72px; border-radius: 20px; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; font-size: 32px;
}
.landing-security h2 { font-size: 24px; margin-bottom: 8px; }
.landing-security p { color: var(--text-muted); margin: 0; max-width: 520px; }
.landing-security .btn { margin-left: auto; }

.landing-cta {
    padding: 80px 0; text-align: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}
.landing-cta h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); margin-bottom: 12px; }
.landing-cta p { color: rgba(255,255,255,.7); font-size: 16px; margin-bottom: 28px; }

.landing-footer {
    padding: 28px 0; background: #080e1c; border-top: 1px solid rgba(255,255,255,.06);
}
.landing-footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.landing-footer .landing-brand { color: rgba(255,255,255,.9); }

@media (max-width: 991.98px) {
    .landing-nav-links { display: none; }
    .landing-preview-kpis { grid-template-columns: 1fr; }
    .landing-security .btn { margin-left: 0; width: 100%; }
}

@media (max-width: 575.98px) {
    .landing-hero { padding: 56px 0 72px; }
    .landing-section { padding: 64px 0; }
    .landing-hero-actions .btn { width: 100%; }
}

/* ---------------------------------------------------------------------
   7. LOGIN
   --------------------------------------------------------------------- */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    /* Sem altura definida o grid para onde o conteudo do painel esquerdo
       termina e sobra fundo vazio embaixo. dvh acompanha a barra de
       endereco no celular; vh fica como reserva para navegadores antigos. */
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-visual {
    position: relative;
    background: linear-gradient(140deg, #0f172a 0%, #1e293b 45%, #78350f 100%);
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px;
    color: #fff;
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute;
    width: 560px; height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,.35), transparent 68%);
    top: -140px; right: -170px;
    animation: floaty 9s ease-in-out infinite;
}
.auth-visual::after {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,165,233,.28), transparent 68%);
    bottom: -110px; left: -110px;
    animation: floaty 11s ease-in-out infinite reverse;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual h1 { color: #fff; font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
.auth-visual p { color: rgba(255,255,255,.72); font-size: 15px; max-width: 430px; }
.auth-features { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 13px; }
.auth-features li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.9); font-size: 14px; }
.auth-features i { color: var(--brand-400); font-size: 19px; }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 408px; }
.auth-logo {
    width: 58px; height: 58px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--brand), #f97316);
    display: grid; place-items: center;
    color: #0f172a; font-size: 30px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(245,158,11,.35);
}

/* ---------------------------------------------------------------------
   7. UTILITARIOS
   --------------------------------------------------------------------- */
.text-muted { color: var(--text-muted) !important; }
.text-soft  { color: var(--text-soft) !important; }
.text-brand { color: var(--brand) !important; }
.bg-surface { background: var(--surface) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }
.border-app { border-color: var(--border) !important; }
.fw-650 { font-weight: 650; }
.fs-13 { font-size: 13px; }
.fs-12 { font-size: 12px; }
.fs-11 { font-size: 11px; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stat-bar { height: 6px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.stat-bar > span { display: block; height: 100%; border-radius: 20px; background: var(--brand); transition: width var(--t-slow); }

.divider-text { display: flex; align-items: center; gap: 14px; color: var(--text-soft); font-size: 12px; margin: 20px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.fade-in { animation: fadeIn var(--t-slow); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spinner-app {
    width: 20px; height: 20px;
    border: 2.5px solid var(--border-strong);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Barra de progresso global */
#globalProgress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--brand), #f97316);
    z-index: 2000;
    transition: width .25s ease, opacity .3s ease;
    box-shadow: 0 0 10px var(--brand);
}

/* ---------------------------------------------------------------------
   8. RESPONSIVO
   --------------------------------------------------------------------- */
.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    z-index: 1035;
    opacity: 0; pointer-events: none;
    transition: opacity var(--t);
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 1200px) {
    .auth-visual { display: none; }
    .auth-page { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-xl); }
    .sidebar.show { transform: none; }
    .sidebar.collapsed { width: var(--sidebar-width); }
    .sidebar.collapsed .sidebar-brand,
    .sidebar.collapsed .nav-link span,
    .sidebar.collapsed .nav-section { opacity: 1; width: auto; }
    .sidebar.collapsed .nav-link { justify-content: flex-start; padding: 10px 12px; }
    .sidebar.collapsed .nav-submenu { display: block; }

    .app-main, .sidebar.collapsed ~ .app-main { margin-left: 0; }
    .page-content { padding: 16px; }
    .topbar { padding: 0 14px; }
    .topbar-search { max-width: none; }
}

@media (max-width: 575.98px) {
    .page-title { font-size: 18.5px; }
    .kpi-value { font-size: 22px; }
    .kanban-column { flex-basis: 84vw; width: 84vw; }
    .card-body { padding: 15px; }
    .topbar-search { display: none; }
    .btn { padding: 9px 14px; }
    .toast-container { left: 12px; right: 12px; top: 74px; }
    .toast-item { min-width: 0; max-width: none; }
    /* Alvos de toque maiores no celular */
    .btn, .nav-link, .dropdown-item { min-height: 42px; }
}

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    body { background: #fff; }
}

/* ---------------- Faixa de aviso de licenca ---------------- */
.faixa-licenca {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(90deg, rgba(245, 158, 11, .16), rgba(249, 115, 22, .10));
    border-bottom: 1px solid rgba(245, 158, 11, .3);
    color: #b45309;
    font-size: 13px;
    font-weight: 500;
}
.faixa-licenca i { font-size: 15px; flex-shrink: 0; }
.faixa-licenca span { flex: 1; min-width: 0; }
.faixa-licenca a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}
[data-theme="dark"] .faixa-licenca { color: #fcd34d; }

@media (max-width: 575.98px) {
    .faixa-licenca { flex-wrap: wrap; font-size: 12px; padding: 9px 14px; }
}

/* ---------------------------------------------------------------------
   PLANOS NA PAGINA INICIAL
   --------------------------------------------------------------------- */

.landing-hero-nota {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}
.landing-hero-nota i { color: var(--success); margin-right: 4px; }

/* Alternador mensal / anual */
.landing-ciclo {
    display: inline-flex;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 4px;
    gap: 3px;
}

.landing-ciclo button {
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 30px;
    padding: 8px 22px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
    position: relative;
}
.landing-ciclo button:hover { color: var(--text); }
.landing-ciclo button.ativo {
    background: var(--brand);
    color: #1a1206;
    box-shadow: 0 3px 10px rgba(245, 158, 11, .3);
}

.landing-ciclo-selo {
    background: var(--success);
    color: #052e16;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Cartao de plano */
.landing-plano {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.landing-plano:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.landing-plano--destaque {
    border-color: var(--brand);
    border-width: 2px;
    box-shadow: 0 8px 30px rgba(245, 158, 11, .16);
}

.landing-plano-selo {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand), #f97316);
    color: #1a1206;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 15px;
    border-radius: 20px;
    white-space: nowrap;
}

.landing-plano h3 { font-size: 19px; margin: 0 0 5px; }
.landing-plano-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 18px; min-height: 38px; }

.landing-plano-preco {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}
.landing-plano-preco .moeda   { font-size: 17px; font-weight: 600; color: var(--text-muted); }
.landing-plano-preco .valor   { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.landing-plano-preco .periodo { font-size: 14px; color: var(--text-muted); }

.landing-plano-nota { font-size: 12px; color: var(--text-soft); margin: 0 0 20px; min-height: 18px; }

.landing-plano-itens {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: grid;
    gap: 10px;
    flex: 1;
}
.landing-plano-itens li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    color: var(--text);
}
.landing-plano-itens i { color: var(--success); font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.landing-plano-itens li.indisponivel { color: var(--text-soft); }
.landing-plano-itens li.indisponivel i { color: var(--text-soft); }

@media (max-width: 575.98px) {
    .landing-plano { padding: 24px 20px; }
    .landing-plano-preco .valor { font-size: 34px; }
    .landing-plano-desc { min-height: 0; }
    .landing-ciclo button { padding: 8px 16px; font-size: 12.5px; }
}
