/* ==========================================================================
   XControle - Design system
   Cores da marca: menta #73FFDC · verde-limão #80FF00 · azul-marinho #0F172A · cinza #EEEEEE
   ========================================================================== */
:root {
    --xc-mint: #73ffdc;
    --xc-lime: #80ff00;
    --xc-navy: #0f172a;
    --xc-navy-2: #16213a;
    --xc-navy-3: #1e2a47;
    --xc-gray: #eeeeee;
    --xc-bg: #f3f5f8;
    --xc-text: #0f172a;
    --xc-muted: #64748b;
    --xc-border: #e5e9f0;
    --xc-mint-dark: #0fb48f;
    --xc-lime-dark: #3f9c00;
    --xc-gradient: linear-gradient(135deg, var(--xc-mint) 0%, var(--xc-lime) 100%);
    --xc-gradient-soft: linear-gradient(135deg, rgba(115, 255, 220, .18) 0%, rgba(128, 255, 0, .18) 100%);
    --xc-radius: 16px;
    --xc-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --xc-shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
    --xc-sidebar: 264px;

    --bs-primary: #0fb48f;
    --bs-primary-rgb: 15, 180, 143;
    --bs-success: #3f9c00;
    --bs-success-rgb: 63, 156, 0;
    --bs-info: #0ea5e9;
    --bs-info-rgb: 14, 165, 233;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-warning: #f59e0b;
    --bs-warning-rgb: 245, 158, 11;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--xc-text);
    --bs-body-bg: var(--xc-bg);
    --bs-border-color: var(--xc-border);
    --bs-link-color: #0b8f72;
    --bs-link-color-rgb: 11, 143, 114;
    --bs-link-hover-color: #087059;
}

body { background: var(--xc-bg); font-size: .925rem; -webkit-font-smoothing: antialiased; }
.font-brand, h1, .h1, .page-title { font-family: 'Exo 2', 'Inter', sans-serif; letter-spacing: -.01em; }
a { text-decoration: none; }
.text-muted { color: var(--xc-muted) !important; }
.text-mint { color: var(--xc-mint-dark) !important; }
.text-lime { color: var(--xc-lime-dark) !important; }
.text-navy { color: var(--xc-navy) !important; }
.bg-navy { background: var(--xc-navy) !important; }
.bg-gradient-brand { background: var(--xc-gradient) !important; }
.text-gradient { background: var(--xc-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.small-caps { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--xc-muted); }

/* --------------------------------------------------------------- Layout */
.xc-wrapper { display: flex; min-height: 100vh; }
.xc-sidebar {
    width: var(--xc-sidebar); flex-shrink: 0; background: var(--xc-navy);
    background-image: radial-gradient(circle at 0% 0%, rgba(115, 255, 220, .10), transparent 45%), radial-gradient(circle at 100% 100%, rgba(128, 255, 0, .08), transparent 40%);
    color: #cbd5e1; position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.xc-sidebar .brand { display: flex; align-items: center; gap: .7rem; padding: 1.35rem 1.4rem 1rem; color: #fff; }
.xc-sidebar .brand img { width: 38px; height: 38px; }
.xc-sidebar .brand-name { font-family: 'Exo 2', sans-serif; font-weight: 800; letter-spacing: .06em; font-size: 1.2rem; line-height: 1; }
.xc-sidebar .brand-sub { font-size: .7rem; color: #94a3b8; letter-spacing: .04em; margin-top: .2rem; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xc-nav { padding: .5rem .85rem; flex: 1; }
/* Desktop: o menu acompanha a altura da página e rola junto com ela (sem rolagem própria) */
@media (min-width: 992px) {
    .xc-sidebar { position: relative; inset: auto; min-height: 100vh; }
}
.xc-nav .nav-section { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #64748b; padding: 1rem .75rem .45rem; font-weight: 700; }
.xc-nav a {
    display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; border-radius: 12px; color: #cbd5e1; font-weight: 500; margin-bottom: 2px;
    position: relative; transition: background .15s, color .15s;
}
.xc-nav a i { width: 20px; text-align: center; font-size: 1rem; color: #94a3b8; transition: color .15s; }
.xc-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.xc-nav a:hover i { color: var(--xc-mint); }
.xc-nav a.active { background: linear-gradient(90deg, rgba(115, 255, 220, .16), rgba(128, 255, 0, .06)); color: #fff; }
.xc-nav a.active i { color: var(--xc-mint); }
.xc-nav a.active::before { content: ''; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--xc-gradient); }
.xc-nav .badge { margin-left: auto; }
.xc-sidebar .sidebar-footer { padding: 1rem 1.2rem; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .8rem; }
.xc-plan-card { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; padding: .85rem 1rem; }
.xc-plan-card .badge { background: rgba(115, 255, 220, .15) !important; color: var(--xc-mint) !important; }

.xc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xc-topbar {
    position: sticky; top: 0; z-index: 1030; height: 68px; display: flex; align-items: center; gap: 1rem; padding: 0 1.75rem;
    background: rgba(243, 245, 248, .85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent;
}
.xc-topbar.scrolled { border-bottom-color: var(--xc-border); }
.xc-topbar .search { max-width: 380px; flex: 1; position: relative; }
.xc-topbar .search input { border-radius: 12px; padding-left: 2.4rem; background: #fff; border-color: var(--xc-border); height: 42px; }
.xc-topbar .search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--xc-muted); }
.xc-icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--xc-border); color: var(--xc-navy); position: relative; }
.xc-icon-btn:hover { border-color: var(--xc-mint-dark); color: var(--xc-mint-dark); }
.xc-icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--xc-lime); box-shadow: 0 0 0 2px #fff; }
.xc-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--xc-gradient); color: var(--xc-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.xc-avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.xc-content { padding: 1.5rem 1.75rem 2.5rem; flex: 1; }
.xc-footer { padding: 1rem 1.75rem; color: var(--xc-muted); font-size: .78rem; }

.page-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title { font-size: 1.6rem; font-weight: 800; margin: 0; }
.page-subtitle { color: var(--xc-muted); margin: .2rem 0 0; }
.breadcrumb { font-size: .78rem; margin-bottom: .25rem; }

.xc-impersonating { background: repeating-linear-gradient(45deg, #fef3c7, #fef3c7 12px, #fde68a 12px, #fde68a 24px); color: #78350f; font-size: .82rem; padding: .45rem 1.75rem; font-weight: 600; }

/* --------------------------------------------------------------- Cards */
.card { border: 1px solid var(--xc-border); border-radius: var(--xc-radius); box-shadow: var(--xc-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--xc-border); padding: 1rem 1.25rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-header .card-title { margin: 0; font-size: 1rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-footer { background: transparent; border-top: 1px solid var(--xc-border); }

.kpi { position: relative; overflow: hidden; height: 100%; }
.kpi .card-body { display: flex; flex-direction: column; gap: .35rem; }
.kpi .kpi-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: .4rem; }
.kpi .kpi-label { color: var(--xc-muted); font-size: .8rem; font-weight: 600; }
.kpi .kpi-value { font-family: 'Exo 2', sans-serif; font-size: clamp(1.15rem, 1.5vw, 1.55rem); font-weight: 800; line-height: 1.15; white-space: nowrap; }
.kpi .kpi-foot { font-size: .78rem; color: var(--xc-muted); }
.kpi-mint .kpi-icon { background: rgba(115, 255, 220, .25); color: #0b8f72; }
.kpi-lime .kpi-icon { background: rgba(128, 255, 0, .2); color: var(--xc-lime-dark); }
.kpi-navy .kpi-icon { background: rgba(15, 23, 42, .08); color: var(--xc-navy); }
.kpi-red .kpi-icon { background: rgba(239, 68, 68, .12); color: #dc2626; }
.kpi-amber .kpi-icon { background: rgba(245, 158, 11, .14); color: #d97706; }
.kpi-blue .kpi-icon { background: rgba(14, 165, 233, .12); color: #0284c7; }

.kpi-hero { background: var(--xc-navy); color: #fff; border: 0; background-image: radial-gradient(circle at 100% 0%, rgba(128, 255, 0, .28), transparent 50%), radial-gradient(circle at 0% 100%, rgba(115, 255, 220, .25), transparent 55%); }
.kpi-hero .kpi-label, .kpi-hero .kpi-foot { color: #cbd5e1; }
.kpi-hero .kpi-icon { background: rgba(255, 255, 255, .1); color: var(--xc-mint); }

/* --------------------------------------------------------------- Buttons */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1.05rem; }
.btn-sm { border-radius: 10px; padding: .35rem .75rem; }
.btn-brand { background: var(--xc-gradient); color: var(--xc-navy); border: 0; box-shadow: 0 6px 16px rgba(115, 255, 220, .35); }
.btn-brand:hover, .btn-brand:focus { color: var(--xc-navy); filter: brightness(.96); box-shadow: 0 8px 20px rgba(128, 255, 0, .35); }
.btn-navy { background: var(--xc-navy); color: #fff; border: 0; }
.btn-navy:hover { background: var(--xc-navy-3); color: #fff; }
.btn-light { background: #fff; border: 1px solid var(--xc-border); color: var(--xc-navy); }
.btn-light:hover { border-color: var(--xc-mint-dark); background: #fff; color: var(--xc-mint-dark); }
.btn-primary { --bs-btn-bg: #0fb48f; --bs-btn-border-color: #0fb48f; --bs-btn-hover-bg: #0b9c7b; --bs-btn-hover-border-color: #0b9c7b; --bs-btn-active-bg: #087a61; }
.btn-outline-primary { --bs-btn-color: #0b8f72; --bs-btn-border-color: #0fb48f; --bs-btn-hover-bg: #0fb48f; --bs-btn-hover-border-color: #0fb48f; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* --------------------------------------------------------------- Forms */
.form-control, .form-select { border-radius: 12px; border-color: #dbe1ea; padding: .58rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--xc-mint-dark); box-shadow: 0 0 0 .22rem rgba(115, 255, 220, .35); }
.form-label { font-weight: 600; font-size: .82rem; color: #334155; margin-bottom: .35rem; }
.form-text { font-size: .76rem; }
.form-check-input:checked { background-color: var(--xc-mint-dark); border-color: var(--xc-mint-dark); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(115, 255, 220, .35); border-color: var(--xc-mint-dark); }
.form-switch .form-check-input { width: 2.6em; height: 1.35em; }
.input-group-text { border-radius: 12px; background: #f8fafc; border-color: #dbe1ea; color: var(--xc-muted); }
.form-section { font-family: 'Exo 2', sans-serif; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: .55rem; margin: .5rem 0 1rem; }
.form-section i { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--xc-gradient-soft); color: #0b8f72; font-size: .9rem; }
.option-card { border: 1.5px solid var(--xc-border); border-radius: 14px; padding: .9rem 1rem; cursor: pointer; transition: all .15s; display: block; height: 100%; }
.option-card:hover { border-color: var(--xc-mint-dark); }
.btn-check:checked + .option-card { border-color: var(--xc-mint-dark); background: var(--xc-gradient-soft); box-shadow: 0 0 0 3px rgba(115, 255, 220, .25); }

/* --------------------------------------------------------------- Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--xc-muted); font-weight: 700; border-bottom-width: 1px; padding: .8rem 1rem; white-space: nowrap; background: #f8fafc; }
.table > tbody td { padding: .85rem 1rem; vertical-align: middle; border-color: #eef1f5; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(115, 255, 220, .07); }
.table .cell-title { font-weight: 600; color: var(--xc-navy); }
.table .cell-sub { font-size: .78rem; color: var(--xc-muted); }
.table-card .card-body { padding: 0; }
.table-responsive { border-radius: 0 0 var(--xc-radius) var(--xc-radius); }

/* --------------------------------------------------------------- Badges */
.badge { font-weight: 600; padding: .42em .7em; border-radius: 8px; font-size: .72rem; }
.badge-soft-success { background: rgba(128, 255, 0, .18); color: #2f7a00; }
.badge-soft-danger { background: rgba(239, 68, 68, .12); color: #b91c1c; }
.badge-soft-warning { background: rgba(245, 158, 11, .15); color: #b45309; }
.badge-soft-info { background: rgba(115, 255, 220, .3); color: #0b7a61; }
.badge-soft-secondary { background: #eef1f5; color: #475569; }
.badge-soft-primary { background: rgba(15, 180, 143, .12); color: #0b8f72; }
.badge-soft-navy { background: rgba(15, 23, 42, .08); color: var(--xc-navy); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }

/* --------------------------------------------------------------- Misc components */
.alert { border-radius: 14px; border: 0; }
.alert-success { background: rgba(128, 255, 0, .14); color: #2f6b00; }
.alert-danger { background: rgba(239, 68, 68, .1); color: #991b1b; }
.alert-warning { background: rgba(245, 158, 11, .14); color: #92400e; }
.alert-info { background: rgba(115, 255, 220, .22); color: #0b6450; }
.dropdown-menu { border-radius: 14px; border: 1px solid var(--xc-border); box-shadow: var(--xc-shadow-lg); padding: .5rem; }
.dropdown-item { border-radius: 10px; padding: .5rem .75rem; }
.dropdown-item:active { background: var(--xc-gradient-soft); color: var(--xc-navy); }
.nav-pills .nav-link { border-radius: 12px; color: #475569; font-weight: 600; }
.nav-pills .nav-link.active { background: var(--xc-navy); color: #fff; }
.nav-pills .nav-link.active i { color: var(--xc-mint); }
.nav-tabs-xc { border-bottom: 1px solid var(--xc-border); gap: .25rem; }
.nav-tabs-xc .nav-link { border: 0; border-bottom: 3px solid transparent; color: var(--xc-muted); font-weight: 600; padding: .7rem 1rem; }
.nav-tabs-xc .nav-link.active { color: var(--xc-navy); border-image: var(--xc-gradient) 1; border-bottom: 3px solid; }
.pagination { --bs-pagination-border-radius: 10px; --bs-pagination-active-bg: var(--xc-navy); --bs-pagination-active-border-color: var(--xc-navy); --bs-pagination-color: var(--xc-navy); margin: 0; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--xc-muted); }
.empty-state .empty-icon { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--xc-gradient-soft); color: #0b8f72; }
.empty-state h5 { color: var(--xc-navy); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--xc-border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--xc-border); }
.progress { border-radius: 99px; background: #eef1f5; }
.progress-bar { border-radius: 99px; }
.progress-brand { background: var(--xc-gradient); }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; border-bottom: 1px dashed var(--xc-border); }
.list-clean li:last-child { border-bottom: 0; }
.health-ring { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.health-ring canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.health-ring .ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.health-ring .ring-label strong { font-family: 'Exo 2', sans-serif; font-size: 2rem; font-weight: 800; line-height: 1; }
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 220px; }
.copy-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: .75rem; font-family: ui-monospace, monospace; font-size: .78rem; word-break: break-all; }
.notif-item { display: flex; gap: .75rem; padding: .65rem .5rem; border-radius: 12px; white-space: normal; }
.notif-item:hover { background: #f8fafc; }
.notif-item .ni-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--xc-gradient-soft); color: #0b8f72; }
.notif-item.unread .ni-title { font-weight: 700; }
.template-vars code { background: var(--xc-gradient-soft); color: #0b6450; padding: .15rem .45rem; border-radius: 6px; cursor: pointer; font-size: .76rem; }
.wa-preview { background: #e5ddd5 url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23d4cbc2'/%3E%3C/svg%3E"); border-radius: 14px; padding: 1rem; min-height: 120px; }
.wa-bubble { background: #dcf8c6; border-radius: 10px 10px 10px 2px; padding: .6rem .8rem; max-width: 92%; white-space: pre-wrap; font-size: .85rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }

/* --------------------------------------------------------------- Auth */
.auth-wrapper { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
    background: var(--xc-navy); color: #fff; position: relative; overflow: hidden; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::before, .auth-hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.auth-hero::before { width: 420px; height: 420px; background: var(--xc-mint); top: -140px; right: -120px; opacity: .25; }
.auth-hero::after { width: 380px; height: 380px; background: var(--xc-lime); bottom: -160px; left: -100px; opacity: .2; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .hero-logo { display: flex; align-items: center; gap: .8rem; }
.auth-hero .hero-logo img { width: 52px; }
.auth-hero .hero-logo span { font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: .08em; }
.auth-hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.12; max-width: 520px; }
.auth-hero .lead { color: #cbd5e1; max-width: 480px; }
.auth-feature { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1rem; }
.auth-feature i { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(115, 255, 220, .12); color: var(--xc-mint); flex-shrink: 0; }
.auth-feature strong { display: block; }
.auth-feature span { color: #94a3b8; font-size: .85rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-form .inner { width: 100%; max-width: 400px; }
.auth-form .form-control { height: 50px; }
.auth-form .btn { height: 50px; }
.auth-admin .auth-hero { background: #0b1120; }

/* --------------------------------------------------------------- Contratação (checkout) */
.signup .auth-hero { justify-content: flex-start; gap: 3rem; }
.signup .auth-hero > small { margin-top: auto; }
.signup .auth-form { align-items: flex-start; padding: 3rem 2rem; min-width: 0; }
.signup .auth-form .inner { max-width: 560px; }
.signup .auth-form .form-control, .signup .auth-form .form-select { height: 46px; }
.signup .auth-form .btn-check + .btn { height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.signup .auth-form .btn-brand { height: 52px; }
.signup h1 { font-size: 2.3rem; }
.signup-price { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 1.2rem 1.4rem; margin: 1.5rem 0 2rem; max-width: 420px; }
.signup-price .tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--xc-mint); }
.signup-price .value { font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 3rem; line-height: 1.1; }
.signup-price .value small { font-size: 1.1rem; vertical-align: top; margin-right: 3px; }
.signup-price .value span { font-size: 1rem; color: #94a3b8; font-weight: 600; }
.signup-price .plus { color: var(--xc-lime); font-weight: 600; }
.billing-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.billing-days .btn { padding-left: .25rem; padding-right: .25rem; white-space: nowrap; }
@media (max-width: 575.98px) {
    .signup .auth-form { padding: 2rem 1rem; }
    .signup .person-type .btn { font-size: .9rem; padding-left: .4rem; padding-right: .4rem; }
}

/* --------------------------------------------------------------- Public invoice */
.public-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--xc-navy); background-image: radial-gradient(circle at 10% 10%, rgba(115, 255, 220, .2), transparent 40%), radial-gradient(circle at 90% 90%, rgba(128, 255, 0, .15), transparent 40%); }
.public-card { max-width: 520px; width: 100%; border-radius: 24px; overflow: hidden; }

/* --------------------------------------------------------------- Responsive */
.xc-backdrop { display: none; }
@media (max-width: 991.98px) {
    .xc-sidebar { transform: translateX(-100%); overflow-y: auto; }
    .xc-sidebar.show { transform: translateX(0); box-shadow: var(--xc-shadow-lg); }
    .xc-main { margin-left: 0; }
    .xc-topbar, .xc-content, .xc-footer { padding-left: 1rem; padding-right: 1rem; }
    .xc-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; }
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .page-title { font-size: 1.35rem; }
}
@media (max-width: 575.98px) {
    .xc-content { padding-top: 1rem; }
    .kpi .kpi-value { font-size: 1.35rem; }
    .table > tbody td, .table > thead th { padding: .7rem .75rem; }
}

/* PWA standalone: respeita a área segura do iOS */
@supports (padding: env(safe-area-inset-top)) {
    .xc-topbar { padding-top: env(safe-area-inset-top); height: calc(68px + env(safe-area-inset-top)); }
}

/* Seletor de dias da semana (Configurações > Regras de cobrança) */
.btn-weekday { border: 1px solid var(--xc-border); background: #fff; color: var(--xc-muted); font-weight: 600; min-width: 56px; }
.btn-weekday:hover { background: var(--xc-gray); color: var(--xc-text); }
.btn-check:checked + .btn-weekday { background: var(--xc-mint); border-color: var(--xc-mint-dark); color: var(--xc-navy); }

/* ===== Financeiro ===== */
.fin-type { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.fin-receivable { background: rgba(128, 255, 0, .16); color: #3f8f00; }
.fin-payable { background: rgba(239, 68, 68, .12); color: #dc2626; }
.fin-account { background: rgba(15, 23, 42, .08); color: #0f172a; }
.dre-table th, .dre-table td { white-space: nowrap; font-size: .8rem; }
.dre-table th:first-child, .dre-table td:first-child { position: sticky; left: 0; background: var(--bs-body-bg, #fff); min-width: 200px; }
.dre-section td { font-weight: 700; text-transform: uppercase; background: #f1f5f9 !important; }
.dre-group td { font-weight: 600; cursor: pointer; }
.dre-group.open .fa-chevron-right { transform: rotate(90deg); }
.dre-group .fa-chevron-right { transition: transform .15s; }
.dre-result td { font-weight: 700; border-top: 2px solid #0f172a; background: rgba(115, 255, 220, .18) !important; }
