/* ============================================================
   VoxEmpresas — "new" UI theme (dark-neon glassmorphism)
   Loaded on top of base.html's inline styles when UI_THEME=new.
   Targets the SAME class names already used across every
   template so no Jinja/markup changes were needed anywhere.
   Toggle: site/.env -> UI_THEME=new|old
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ============================================================
   LEFT-SIDEBAR APP SHELL (mockup layout)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 250px; flex: none;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
    display: flex; flex-direction: column; gap: 4px;
    padding: 22px 16px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-right: 1px solid rgba(255,255,255,0.12);
    overflow-y: auto;
}
.app-brand {
    display: flex; align-items: center;
    padding: 6px 8px 20px; text-decoration: none;
}
.app-brand-img {
    width: 100%; max-width: 190px; height: auto; display: block;
}

.app-nav-section {
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(245,243,247,0.5); padding: 14px 12px 6px;
}
.app-nav { display: flex; flex-direction: column; gap: 4px; }
.app-nav-item {
    display: flex; align-items: center; gap: 13px;
    padding: 12px 14px; border-radius: 14px;
    color: rgba(245,243,247,0.62); text-decoration: none;
    font-size: 0.92rem; font-weight: 500;
    transition: all 0.2s ease; position: relative;
}
.app-nav-item i {
    width: 18px; text-align: center; font-size: 1rem;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
.app-nav-item span { transition: transform 0.25s ease; display: inline-block; }
.app-nav-item:hover {
    color: #f5f3f7; background: rgba(255,255,255,0.06);
    transform: translateX(4px);
}
.app-nav-item:hover i { transform: scale(1.18); color: var(--primary-color); }
.app-nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(244,85,58,0.16), rgba(255,255,255,0.05));
}
.app-nav-item.active i { color: var(--primary-color); }
.app-nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
    width: 3px; border-radius: 3px;
    background: linear-gradient(135deg, #ff6a4d, #d94429);
    box-shadow: 0 0 12px rgba(244,85,58,0.6);
    animation: navBarGrow 0.35s cubic-bezier(.4,0,.2,1);
}
.app-nav-item .badge, .app-nav-item .count { margin-left: auto; }

/* staggered entrance for the rail items on page load */
.app-nav-item {
    opacity: 0;
    animation: navItemIn 0.5s cubic-bezier(.4,0,.2,1) forwards;
}
.app-nav .app-nav-item:nth-child(1) { animation-delay: 0.04s; }
.app-nav .app-nav-item:nth-child(2) { animation-delay: 0.09s; }
.app-nav .app-nav-item:nth-child(3) { animation-delay: 0.14s; }
.app-nav .app-nav-item:nth-child(4) { animation-delay: 0.19s; }
.app-nav .app-nav-item:nth-child(5) { animation-delay: 0.24s; }
.app-nav .app-nav-item:nth-child(6) { animation-delay: 0.29s; }
.app-nav .app-nav-item:nth-child(7) { animation-delay: 0.34s; }
.app-nav .app-nav-item:nth-child(8) { animation-delay: 0.39s; }
.app-brand { opacity: 0; animation: navItemIn 0.5s ease forwards; }

@keyframes navItemIn {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes navBarGrow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
    .app-nav-item, .app-brand { opacity: 1 !important; animation: none !important; }
}
.app-nav-divider {
    height: 1px; background: rgba(255,255,255,0.12);
    margin: 12px 8px;
}

.app-main {
    flex: 1; min-width: 0;
    margin-left: 250px;
    padding: 26px 30px;
}
.app-main .main-content { padding: 0 !important; max-width: none !important; }
.app-main .dashboard-container,
.app-main .franchise-shell,
.app-main .paid-clients-container,
.app-main .admin-container { max-width: none !important; margin: 0 !important; padding: 0 !important; }

.app-sidebar-toggle {
    display: none;
    position: fixed; top: 16px; left: 16px; z-index: 1100;
    width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    background: rgba(20,16,26,0.8); color: #f5f3f7;
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
    .app-sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; padding: 70px 18px 24px; }
    .app-sidebar-toggle { display: grid; place-items: center; }
}

:root {
    /* keep brand hues, retint everything else for dark glass */
    --primary-color: #F4553A;
    --primary-dark: #d94429;
    --secondary-color: #ffffff;
    --accent-color: #F4553A;
    --background-light: #14101a;
    --background-dark: #0c0910;
    --text-primary: #f5f3f7;
    --text-secondary: rgba(245, 243, 247, 0.62);
    --text-light: #ffffff;
    --border-color: rgba(255, 255, 255, 0.14);
    --success-color: #36d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.55);
    --transition: all 0.25s cubic-bezier(.4,0,.2,1);
    --border-radius: 20px;
    --border-radius-sm: 12px;

    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-strong: rgba(255, 255, 255, 0.10);
    --glass-blur: blur(22px) saturate(140%);
    --glow: 0 0 26px rgba(244, 85, 58, 0.45);
    --glow-soft: 0 0 18px rgba(244, 85, 58, 0.28);
    --glow-duotone: -20px 0 46px -12px rgba(244,85,58,0.5), 20px 0 46px -12px rgba(90,140,255,0.4);
    --grad-brand: linear-gradient(135deg, #ff6a4d, #F4553A 55%, #d94429);
}

html, body {
    background:
        radial-gradient(circle at 16% 10%, rgba(244,85,58,0.20), transparent 42%),
        radial-gradient(circle at 88% 90%, rgba(90,140,255,0.14), transparent 48%),
        linear-gradient(160deg, var(--background-light), var(--background-dark)) !important;
    background-attachment: fixed !important;
    color: var(--text-primary) !important;
    font-family: 'Poppins', 'Inter', sans-serif !important;
}

body::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

/* ---------------- Glass utility (shared surfaces) ---------------- */
.card, .form-control, .form-select, .modal, .modal-header,
.stat-card, .metric-card, .item-card, .sidebar,
.checkbox-item, .hours-item, .ai-text-box, .flash-message,
.dynamic-section, .auth-card, .empty-state,
.review-section, .add-image-section, .image-input-row,
.image-count-indicator {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-light) !important;
    color: var(--text-primary) !important;
}

/* Horários — give the day tiles internal padding + breathing room */
.hours-grid { gap: 1rem !important; padding: 2px; }
.hours-item {
    padding: 16px 16px 18px !important;
    border-radius: 16px !important;
    gap: 0.55rem !important;
    transition: var(--transition);
}
.hours-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium), var(--glow-soft) !important;
    border-color: rgba(244,85,58,0.4) !important;
}
.hours-item label {
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important; letter-spacing: 0.03em;
    text-transform: uppercase; margin-bottom: 2px;
}
.hours-item input { width: 100%; }

/* ---------------- Dashboard layout: header + sidebar + grid ---------------- */
/* Header is a transparent title row, NOT a glass card. */
.dashboard-header {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.dashboard-header h1 { color: var(--text-primary) !important; }

/* Sidebar: glass rail with legible nav */
.sidebar { padding: 1rem !important; }
.sidebar-nav a {
    color: var(--text-secondary) !important;
    border-radius: var(--border-radius-sm) !important;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--glass-bg-strong) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 3px 0 0 var(--primary-color);
}

/* public-places pages (feature/place cards, review panels, etc.) */
.feature-card, .place-card, .form-section, .review-header, .review-section,
.bottom-cta, .filter-tabs, .reject-modal-content, .info-card, .step-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-light) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius) !important;
    color: var(--text-primary) !important;
}
.feature-card:hover, .place-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium), var(--glow-soft) !important;
    border-color: rgba(244,85,58,0.5) !important;
}
.feature-card h3, .place-card h3, .place-card h4 { color: var(--text-primary) !important; }
.feature-card p, .place-card p { color: var(--text-secondary) !important; }
.category-chip {
    background: var(--glass-bg-strong) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}
.category-chip.active, .category-chip.selected {
    background: var(--grad-brand) !important; color: #fff !important;
}

/* data tables (admin paid-clients, franchisees, etc.) */
.clients-table-card, .company-table, .table-card, .data-table-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-light) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius) !important;
}
.clients-table th, .company-table th, table th {
    background: var(--glass-bg-strong) !important;
    color: var(--text-secondary) !important;
}
.clients-table td, .company-table td, table td { color: var(--text-primary) !important; }
.clients-table th, .clients-table td,
.company-table th, .company-table td, table th, table td {
    border-bottom-color: var(--border-color) !important;
}

/* generic form sections that aren't .card but need dark text */
.form-section, .section-info, .info-item, .review-section h3,
.form-group label, .form-hint, .hint, .muted,
.day-name, .item-info, .item-info p, .metric-label, .metric-sub {
    color: var(--text-secondary) !important;
}
.section-info { background: transparent !important; border: none !important; box-shadow: none !important; }
h1, h2, h3, h4, h5, .card-header h2, .metric-value, .item-info h3, .item-info h4 {
    color: var(--text-primary) !important;
}

/* ---------------- Header / nav ---------------- */
.main-header {
    border-radius: 0 !important;
    border-left: none !important; border-right: none !important; border-top: none !important;
    background: rgba(12, 9, 16, 0.6) !important;
    position: sticky; z-index: 1000;
}
.logo-text { color: var(--text-primary); }
.logo-text .accent { color: var(--primary-color); }
.nav-link { color: var(--text-secondary) !important; border-radius: var(--border-radius-sm); }
.nav-link:hover { color: var(--text-primary) !important; background: var(--glass-bg-strong); }
.nav-link.btn-primary, a.nav-link.btn-primary {
    background: var(--grad-brand) !important; color: #fff !important;
    box-shadow: var(--glow-soft); padding: 0.55rem 1.2rem;
}
.nav-admin { color: var(--primary-color) !important; }

/* ---------------- Cards / stat / metric tiles ---------------- */
.card:hover, .stat-card:hover, .metric-card:hover, .item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium), var(--glow-soft) !important;
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary);
}
.metric-value, .stat-card .value { color: var(--text-primary); font-weight: 700; }
.metric-label, .metric-sub { color: var(--text-secondary); }
.metric-icon { color: var(--primary-color); }

/* ---------------- Buttons ---------------- */
.btn-submit, .btn-primary, .btn-add, .btn-add-item, .btn-save {
    background: var(--grad-brand) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: var(--glow-soft);
    transition: var(--transition);
}
.btn-submit:hover, .btn-primary:hover, .btn-add:hover, .btn-add-item:hover, .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}
.btn-secondary, .btn-cancel, .btn-outline {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 999px !important;
    backdrop-filter: var(--glass-blur);
}
.btn-secondary:hover, .btn-cancel:hover, .btn-outline:hover {
    border-color: rgba(244,85,58,.55) !important;
    box-shadow: var(--glow-soft);
}
.btn-delete, .btn-remove-item {
    background: rgba(248,113,113,0.14) !important;
    color: var(--error-color) !important;
    border: 1px solid rgba(248,113,113,0.3) !important;
    border-radius: 999px !important;
}
.btn-edit, .btn-ai-improve {
    background: var(--glass-bg-strong) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 999px !important;
}

/* ---------------- Forms ---------------- */
.form-control, .form-select {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius-sm) !important;
    transition: var(--transition);
}
.form-control::placeholder { color: rgba(245,243,247,0.4); }
.form-control:focus, .form-select:focus {
    border-color: rgba(244,85,58,0.7) !important;
    box-shadow: 0 2px 12px rgba(244,85,58,0.35) !important;
    outline: none;
}
.form-group label, .form-hint, .hint, .muted { color: var(--text-secondary) !important; }

/* checkboxes / toggles keep native control but retint the chip */
.checkbox-item { padding: 0.6rem 0.9rem; }
.checkbox-item span { color: var(--text-secondary); }
.checkbox-item input:checked ~ span, .checkbox-item.selected {
    color: var(--primary-color);
}

/* ---------------- Modals ---------------- */
.modal-overlay { background: rgba(5,3,8,0.7) !important; backdrop-filter: blur(4px); }
.modal { box-shadow: var(--shadow-medium), var(--glow-duotone) !important; }
.modal-header { border-bottom: 1px solid var(--border-color) !important; }
.modal-close { color: var(--text-secondary); }

/* ---------------- Badges / flash ---------------- */
.badge, .count {
    background: var(--grad-brand) !important;
    color: #fff !important;
    box-shadow: var(--glow-soft);
}
.flash-message { border-left: 3px solid var(--primary-color) !important; }
.flash-success { border-left-color: var(--success-color) !important; }
.flash-error { border-left-color: var(--error-color) !important; }

/* ---------------- Tabs ---------------- */
.filter-tab.active, .filter-tab[class*="active"] {
    background: var(--glass-bg-strong) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 -2px 0 var(--primary-color);
}

/* ---------------- Footer ---------------- */
.main-footer {
    background: rgba(12,9,16,0.65) !important;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.main-footer h3, .main-footer h4 { color: var(--text-primary); }
.social-links a {
    background: var(--glass-bg); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 50%;
}
.social-links a:hover { box-shadow: var(--glow-soft); color: var(--primary-color); }

/* ---------------- Auth pages ---------------- */
.auth-card { box-shadow: var(--shadow-medium), var(--glow-duotone) !important; }
.auth-header h1, .auth-header p { color: var(--text-primary); }
.auth-footer a { color: var(--primary-color); }

/* ---------------- Empty states / misc ---------------- */
.empty-state i { color: var(--text-secondary); opacity: .5; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(244,85,58,0.4); border-radius: 999px; }

/* ============================================================
   MOCKUP DASHBOARD (.vox-*)  — exact reference layout
   ============================================================ */
.vox-top {
    display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.vox-hello h1 { font-size: 1.55rem; font-weight: 700; color: var(--text-primary); }
.vox-hello p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }
.vox-search {
    margin-left: auto; position: relative; max-width: 300px; flex: 1;
}
.vox-search i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-secondary);
}
.vox-search input {
    width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px;
    background: var(--glass-bg); border: 1px solid var(--border-color);
    color: var(--text-primary); font-family: inherit; outline: none;
    backdrop-filter: var(--glass-blur);
}
.vox-search input::placeholder { color: var(--text-secondary); }
.vox-avatar {
    width: 46px; height: 46px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; color: #fff;
    background: var(--grad-brand); box-shadow: var(--glow-soft);
}

/* KPI tiles */
.vox-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px;
}
.vox-kpi {
    padding: 22px 24px; border-radius: var(--border-radius);
    background: var(--glass-bg); border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light); transition: var(--transition);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    opacity: 0; animation: voxFadeUp 0.5s cubic-bezier(.4,0,.2,1) forwards;
}
.vox-kpis .vox-kpi:nth-child(1) { animation-delay: 0.05s; }
.vox-kpis .vox-kpi:nth-child(2) { animation-delay: 0.12s; }
.vox-kpis .vox-kpi:nth-child(3) { animation-delay: 0.19s; }
.vox-kpis .vox-kpi:nth-child(4) { animation-delay: 0.26s; }
.vox-kpi:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-medium), var(--glow-soft); }
.vox-cols .vox-card { opacity: 0; animation: voxFadeUp 0.5s cubic-bezier(.4,0,.2,1) 0.3s forwards; }
.vox-prompt-wrap { opacity: 0; animation: voxFadeUp 0.5s ease 0.4s forwards; }

@keyframes voxFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .vox-kpi, .vox-cols .vox-card, .vox-prompt-wrap { opacity: 1 !important; animation: none !important; }
}
.vox-kpi-num { font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--text-primary); }
.vox-kpi-num i { color: var(--primary-color); }
.vox-kpi-lbl { color: var(--text-secondary); font-size: 0.85rem; margin-top: 8px; }
.vox-kpi-delta { font-size: 0.78rem; margin-top: 8px; color: var(--text-secondary); }
.vox-kpi-delta.up { color: var(--success-color); }
.vox-kpi-delta.warn { color: var(--warning-color); }
.vox-bar { height: 6px; border-radius: 999px; margin-top: 12px; background: rgba(255,255,255,0.1); overflow: hidden; }
.vox-bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad-brand); box-shadow: var(--glow-soft); transition: width .6s cubic-bezier(.4,0,.2,1); }

/* chart + controls columns */
.vox-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.vox-card {
    padding: 24px; border-radius: var(--border-radius);
    background: var(--glass-bg); border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.vox-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.vox-sub { color: var(--text-secondary); font-size: 0.85rem; margin-top: 2px; }
.vox-chart-num { font-size: 2.6rem; font-weight: 700; color: var(--text-primary); margin-top: 18px; letter-spacing: -.02em; }
.vox-chart-delta { color: var(--success-color); font-weight: 600; font-size: 0.88rem; margin-top: 4px; }
.vox-chart { width: 100%; height: 160px; margin-top: 14px; }

/* chart bars grow up from their bottom edge, staggered */
.vox-cbar {
    transform-box: fill-box;
    transform-origin: bottom;
    transform: scaleY(0);
    animation: barGrow 0.7s cubic-bezier(.34,1.4,.5,1) forwards;
}
.vox-cbar:nth-child(1) { animation-delay: 0.10s; }
.vox-cbar:nth-child(2) { animation-delay: 0.18s; }
.vox-cbar:nth-child(3) { animation-delay: 0.26s; }
.vox-cbar:nth-child(4) { animation-delay: 0.34s; }
.vox-cbar:nth-child(5) { animation-delay: 0.42s; }
.vox-cbar:nth-child(6) { animation-delay: 0.50s; }
.vox-cbar:nth-child(7) { animation-delay: 0.58s; }
@keyframes barGrow { to { transform: scaleY(1); } }

/* the trend line draws itself in, then the node pops */
.vox-cline {
    stroke-dasharray: 640; stroke-dashoffset: 640;
    animation: lineDraw 1.1s ease 0.55s forwards;
}
@keyframes lineDraw { to { stroke-dashoffset: 0; } }
.vox-cnode {
    transform-box: fill-box; transform-origin: center;
    transform: scale(0);
    animation: nodePop 0.4s cubic-bezier(.34,1.56,.64,1) 1.5s forwards;
}
@keyframes nodePop { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    .vox-cbar, .vox-cline, .vox-cnode {
        animation: none !important;
        transform: none !important; stroke-dashoffset: 0 !important;
    }
}

.vox-ctl { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.vox-ctl-row {
    display: flex; align-items: center; gap: 14px; padding: 15px;
    border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--border-color);
    transition: var(--transition);
}
.vox-ctl-row:hover { transform: translateX(3px); box-shadow: var(--glow-soft); }
.vox-ctl-ic {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center; color: var(--primary-color);
    background: var(--glass-bg-strong);
}
.vox-ctl-meta { flex: 1; min-width: 0; }
.vox-ctl-meta .t { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.vox-ctl-meta .d { color: var(--text-secondary); font-size: 0.78rem; }
.vox-switch {
    width: 50px; height: 28px; border-radius: 999px; flex: none; position: relative;
    background: rgba(255,255,255,0.12); border: 1px solid var(--border-color); transition: var(--transition);
}
.vox-switch::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
    border-radius: 50%; background: #fff; transition: var(--transition);
}
.vox-switch.on { background: var(--grad-brand); box-shadow: var(--glow-soft); }
.vox-switch.on::after { left: 25px; }

/* AI prompt bar */
.vox-prompt-wrap { padding: 3px; border-radius: 999px; box-shadow: var(--glow-duotone); margin-bottom: 26px; }
.vox-prompt {
    display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 20px;
    border-radius: 999px; background: rgba(10,8,14,0.78);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.vox-prompt input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-family: inherit; font-size: 0.98rem;
}
.vox-prompt input::placeholder { color: var(--text-secondary); }
.vox-pill {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
    border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: var(--transition);
}
.vox-pill:hover { color: var(--text-primary); border-color: rgba(244,85,58,.5); }
.vox-send {
    width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; flex: none;
    background: var(--grad-brand); color: #fff; box-shadow: var(--glow-soft); transition: var(--transition);
}
.vox-send:hover { transform: scale(1.06); box-shadow: var(--glow); }
.vox-send:disabled { opacity: .6; cursor: wait; }

/* editor heading separating overview from the edit form */
.dashboard-editor-heading { margin: 8px 0 20px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.dashboard-editor-heading h2 { font-size: 1.25rem; color: var(--text-primary); }
.dashboard-editor-heading h2 i { color: var(--primary-color); margin-right: 8px; }

/* empty-state when the account has no company (franqueado/admin) */
.vox-empty {
    margin-top: 24px;
    padding: 48px 32px;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.vox-empty > i { font-size: 2.6rem; color: var(--primary-color); opacity: 0.9; }
.vox-empty h2 { font-size: 1.25rem; color: var(--text-primary); margin: 16px 0 6px; }
.vox-empty p { color: var(--text-secondary); font-size: 0.92rem; }
.vox-empty-cta {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 22px; padding: 13px 26px; border-radius: var(--r-pill, 999px);
    background: var(--grad-brand); color: #fff; font-weight: 600; text-decoration: none;
    box-shadow: var(--glow-soft); transition: var(--transition);
}
.vox-empty-cta:hover { transform: translateY(-2px); box-shadow: var(--glow); }

/* Inside the shell, the editor's OWN inner sidebar is redundant (the rail
   replaces it) — hide it and let the form span full width. Kills the big gap. */
.app-main .dashboard-grid { display: block !important; }
.app-main .dashboard-grid > .sidebar { display: none !important; }
.app-main .dashboard-main { gap: 1.5rem; }

/* ============================================================
   SPA panel swap (sidebar stays fixed, content slides in)
   ============================================================ */
/* Every panel: the overview grid + each editor section. Hidden by default,
   the active one gets .panel-active. JS adds .spa-ready to <body> so that
   without JS everything still shows (progressive enhancement). */
body.spa-ready .vox-panel,
body.spa-ready .app-main .dashboard-main > form > section[id],
body.spa-ready .app-main .dashboard-main > section[id] {
    display: none;
}
body.spa-ready .vox-panel.panel-active,
body.spa-ready .app-main .dashboard-main > form > section[id].panel-active,
body.spa-ready .app-main .dashboard-main > section[id].panel-active {
    display: block;
    animation: panelSlideIn 0.32s cubic-bezier(.4,0,.2,1);
}
/* hide the "Editar empresa" heading + the save button on the overview panel */
body.spa-ready.on-overview .dashboard-editor-heading,
body.spa-ready.on-overview .main-submit-btn { display: none; }

@keyframes panelSlideIn {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    body.spa-ready .panel-active { animation: none !important; }
}

@media (max-width: 1000px) {
    .vox-kpis { grid-template-columns: repeat(2, 1fr); }
    .vox-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .vox-top { flex-wrap: wrap; }
    .vox-search { order: 3; max-width: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
