/* ============================================================
   GESTOR SNOW v2.0 — Tema Futurista (Neon / Glassmorphism)
   ============================================================ */

:root {
    --bg-base: #04060f;
    --bg-deep: #070b1a;
    --surface: rgba(13, 20, 40, 0.62);
    --surface-strong: rgba(13, 20, 40, 0.92);
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(56, 189, 248, 0.35);

    --text-1: #e8edf7;
    --text-2: #94a3b8;
    --text-3: #64748b;

    --cyan: #22d3ee;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --pink: #ec4899;
    --green: #34d399;
    --red: #fb7185;
    --amber: #fbbf24;
    --indigo: #6366f1;

    --grad-primary: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
    --grad-green: linear-gradient(135deg, #34d399, #10b981);
    --grad-red: linear-gradient(135deg, #fb7185, #ef4444);
    --grad-amber: linear-gradient(135deg, #fbbf24, #f59e0b);

    --font-ui: 'Space Grotesk', system-ui, sans-serif;
    --font-display: 'Orbitron', system-ui, sans-serif;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
    --glow-violet: 0 0 24px rgba(139, 92, 246, 0.35);
    --sidebar-w: 268px;
}

* { box-sizing: border-box; }

/* ---------- Correção: textos secundários legíveis no tema escuro ----------
   O Bootstrap 5.3 pinta .text-muted/.text-secondary de cinza escuro (quase
   preto), ilegível no fundo escuro. Usamos a cor secundária do Gestor Snow. */
.text-muted,
.text-secondary,
.form-text {
    color: var(--text-2) !important;
}

html, body { height: 100%; }

body {
    font-family: var(--font-ui);
    background: var(--bg-base);
    color: var(--text-1);
    min-height: 100vh;
    margin: 0;
    padding-bottom: 64px;
    overflow-x: hidden;
    font-size: 0.95rem;
}

/* ---------- Fundo animado ---------- */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    animation: drift 18s ease-in-out infinite alternate;
}
.orb-1 {
    width: 520px; height: 520px;
    top: -160px; left: -120px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.5), transparent 70%);
}
.orb-2 {
    width: 460px; height: 460px;
    bottom: -140px; right: -100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
    animation-delay: -6s;
}
.orb-3 {
    width: 380px; height: 380px;
    top: 40%; left: 55%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.42), transparent 70%);
    animation-delay: -11s;
}
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 85%);
    mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 85%);
}
@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(60px, -40px, 0) scale(1.12); }
    100% { transform: translate3d(-40px, 50px, 0) scale(0.96); }
}

/* ---------- Shell ---------- */
.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    background: var(--surface);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-right: 1px solid var(--border);
    z-index: 20;
}
.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 6px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.sidebar-logo { max-height: 84px; width: auto; }
.brand-fallback {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    font-size: 1.9rem;
    color: #fff;
    background: var(--grad-primary);
    border-radius: 16px;
    box-shadow: var(--glow-cyan);
}
.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    border-radius: 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
}
.nav-item i { font-size: 1.05rem; min-width: 22px; text-align: center; }
.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    transform: translateX(4px);
}
.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.16));
    border-color: var(--border-strong);
    box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.08);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -16px; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--grad-primary);
    box-shadow: var(--glow-cyan);
}
.nav-item.active i { color: var(--cyan); }
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.user-avatar {
    width: 38px; height: 38px;
    flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--grad-primary);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cyan);
}

/* ---------- Main ---------- */
.app-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 30px 36px;
    min-width: 0;
}
.main-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}
.topbar-user {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    max-width: 60%;
    white-space: nowrap;
}
.topbar-user i {
    color: var(--cyan);
    font-size: 0.95rem;
}
.topbar-user-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-user-role {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--grad-primary);
    color: #fff;
}
.topbar-user-creditos {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #fbbf24;
}
.topbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.top-clock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 1px;
    color: var(--cyan);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
    animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- Alertas ---------- */
.app-alert {
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid;
    backdrop-filter: blur(10px);
}
.app-alert-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(251, 113, 133, 0.4);
    color: #fecdd3;
}
.app-alert-success {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.4);
    color: #a7f3d0;
}
.app-alert-info {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.4);
    color: #bfdbfe;
}
.app-alert-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fde68a;
}

/* ---------- Cards ---------- */
.glass-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.glass-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow), 0 0 30px rgba(34, 211, 238, 0.08);
}
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    overflow: hidden;
}
.page-head::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: var(--grad-primary);
    opacity: 0.7;
}
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
}
.page-subtitle { color: var(--text-2); margin: 4px 0 0; font-size: 0.9rem; }
.page-head-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-1);
}

.head-metric {
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid;
    min-width: 190px;
    text-align: right;
}
.head-metric-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.4); color: var(--green); }
.head-metric-danger  { background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.4); color: var(--red); }

/* ---------- Stat cards ---------- */
.stat-card {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    position: relative;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 4px;
    border-radius: 4px;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.stat-success::before { background: var(--grad-green); box-shadow: 0 0 14px rgba(52, 211, 153, 0.6); }
.stat-danger::before  { background: var(--grad-red); box-shadow: 0 0 14px rgba(251, 113, 133, 0.6); }
.stat-info::before    { background: var(--grad-primary); box-shadow: 0 0 14px rgba(34, 211, 238, 0.6); }
.stat-warning::before { background: var(--grad-amber); box-shadow: 0 0 14px rgba(251, 191, 36, 0.6); }
.stat-icon {
    width: 56px; height: 56px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.6rem;
}
.stat-success .stat-icon { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.stat-danger .stat-icon  { background: rgba(251, 113, 133, 0.14); color: var(--red); }
.stat-info .stat-icon    { background: rgba(34, 211, 238, 0.14); color: var(--cyan); }
.stat-warning .stat-icon { background: rgba(251, 191, 36, 0.14); color: var(--amber); }
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-2);
    font-weight: 600;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    margin: 2px 0;
}
.stat-success .stat-value { color: var(--green); }
.stat-danger .stat-value  { color: var(--red); }
.stat-info .stat-value    { color: var(--cyan); }
.stat-warning .stat-value { color: var(--amber); }
.stat-hint { font-size: 0.78rem; color: var(--text-3); }

/* ---------- Info rows / badges ---------- */
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.info-row-danger { border-color: rgba(251, 113, 133, 0.3); }
.status-box {
    padding: 16px;
    border-radius: 12px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.28);
}
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
}
.badge-primary { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-success { background: rgba(52, 211, 153, 0.16); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.4); }
.badge-warning { background: rgba(251, 191, 36, 0.16); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.4); }
.badge-danger  { background: rgba(251, 113, 133, 0.16); color: var(--red); border: 1px solid rgba(251, 113, 133, 0.4); }
.badge-dark    { background: rgba(148, 163, 184, 0.12); color: var(--text-2); border: 1px solid var(--border); }

.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-ativo   { background: rgba(52, 211, 153, 0.14); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.4); }
.status-hoje    { background: rgba(251, 191, 36, 0.14); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.4); }
.status-amanha  { background: rgba(34, 211, 238, 0.14); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.4); }
.status-vencido { background: rgba(251, 113, 133, 0.14); color: var(--red); border: 1px solid rgba(251, 113, 133, 0.4); }

.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
}
.chip-dark   { background: rgba(148, 163, 184, 0.12); color: var(--text-2); border: 1px solid var(--border); }
.chip-info   { background: rgba(34, 211, 238, 0.12); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.35); }
.chip-warning{ background: rgba(251, 191, 36, 0.12); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.35); }

/* ---------- Botões (Neon / Glass futurista) ---------- */
.btn {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    position: relative;
    isolation: isolate;
}
.btn-neon,
.btn-ghost,
.btn-success,
.btn-warning,
.btn-danger,
.btn-primary,
.btn-pix,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-light,
.btn-secondary {
    overflow: hidden;
    transition: all 0.25s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Brilho que atravessa o botão no hover */
.btn-neon::after,
.btn-ghost::after,
.btn-success::after,
.btn-warning::after,
.btn-danger::after,
.btn-primary::after,
.btn-pix::after,
.btn-outline-success::after,
.btn-outline-info::after,
.btn-outline-warning::after,
.btn-outline-light::after,
.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 45%;
    left: -65%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 1;
}
.btn-neon:hover::after,
.btn-ghost:hover::after,
.btn-success:hover::after,
.btn-warning:hover::after,
.btn-danger:hover::after,
.btn-primary:hover::after,
.btn-pix:hover::after,
.btn-outline-success:hover::after,
.btn-outline-info:hover::after,
.btn-outline-warning:hover::after,
.btn-outline-light:hover::after,
.btn-secondary:hover::after { left: 135%; }

.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.4); }

.btn-neon {
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
    background-size: 200% 200%;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.15),
        0 8px 22px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-neon:hover {
    color: #fff;
    transform: translateY(-2px);
    background-position: 100% 0;
    filter: brightness(1.08);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.35),
        0 0 24px rgba(34, 211, 238, 0.5),
        0 12px 28px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-neon:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    padding: 0;
    border-radius: 12px;
    font-size: 0.98rem;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-icon:hover { transform: translateY(-2px) scale(1.05); }
.btn-icon:active { transform: translateY(0) scale(0.95); }
.btn-icon.btn-xs { width: 30px; height: 30px; font-size: 0.85rem; }

.btn-xs { padding: 0.35rem 0.7rem; font-size: 0.7rem; border-radius: 8px; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; border-radius: 10px; }

.btn-success {
    background: rgba(52, 211, 153, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: var(--green);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-success:hover {
    background: var(--grad-green);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.5), 0 6px 18px rgba(52, 211, 153, 0.35);
}
.btn-warning {
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: var(--amber);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-warning:hover {
    background: var(--grad-amber);
    border-color: transparent;
    color: #1a1206;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.5), 0 6px 18px rgba(251, 191, 36, 0.35);
}
.btn-danger {
    background: rgba(251, 113, 133, 0.14);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: var(--red);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-danger:hover {
    background: var(--grad-red);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 18px rgba(251, 113, 133, 0.5), 0 6px 18px rgba(251, 113, 133, 0.35);
}
.btn-primary {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #93c5fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-primary:hover {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.5), 0 6px 18px rgba(59, 130, 246, 0.35);
}

.btn-outline-success {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: var(--green);
}
.btn-outline-success:hover {
    background: rgba(52, 211, 153, 0.16);
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.35);
    transform: translateY(-1px);
}
.btn-outline-info {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.5);
    color: var(--cyan);
}
.btn-outline-info:hover {
    background: rgba(34, 211, 238, 0.16);
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
    transform: translateY(-1px);
}
.btn-outline-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: var(--amber);
}
.btn-outline-warning:hover {
    background: rgba(251, 191, 36, 0.16);
    color: var(--amber);
    border-color: var(--amber);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
    transform: translateY(-1px);
}
.btn-outline-light {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: var(--text-1);
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--border-strong);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
    transform: translateY(-1px);
}
.btn-secondary {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: var(--text-2);
}
.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #fff;
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: 0 0 14px rgba(148, 163, 184, 0.25);
}

/* ---------- Formulários ---------- */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-1);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: all 0.2s ease;
}
.form-control::placeholder { color: var(--text-3); }
.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.form-select option { background: #0b1120; color: var(--text-1); }
.form-label { font-weight: 500; color: var(--text-2); }

.search-box {
    position: relative;
    max-width: 300px;
}
.search-box > i {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 0.85rem;
}
.search-box .form-control { padding-left: 36px; }

/* ---------- Tabelas ---------- */
.table-neon {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-1);
    --bs-table-striped-color: var(--text-1);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.028);
    --bs-table-hover-color: var(--text-1);
    --bs-table-hover-bg: rgba(34, 211, 238, 0.07);
    --bs-table-active-color: var(--text-1);
    --bs-table-active-bg: rgba(255, 255, 255, 0.04);
    --bs-table-border-color: var(--border);
    color: var(--text-1);
    margin-bottom: 0;
}
.table-neon thead th {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-2);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.22);
    padding: 12px 14px;
    white-space: nowrap;
}
.table-neon tbody td {
    background-color: transparent;
    border-color: var(--border);
    padding: 12px 14px;
    vertical-align: middle;
}
.table-neon tbody tr { transition: background 0.18s ease; }
.table-neon tbody tr:hover { background: rgba(34, 211, 238, 0.07); }
.table-neon tbody tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.02); }
.table-neon code {
    background: rgba(148, 163, 184, 0.14);
    color: #a5f3fc;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.8rem;
}
.table-responsive { border-radius: 12px; }

/* ---------- Badges de pagamento ---------- */
.status-pago {
    background: rgba(52, 211, 153, 0.14);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.status-nao-pago {
    background: rgba(251, 191, 36, 0.14);
    color: var(--amber);
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.chip-success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.35);
}

/* ---------- Modais ---------- */
.app-modal {
    background: var(--surface-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-1);
    box-shadow: var(--shadow);
}
.app-modal .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 22px;
}
.app-modal .modal-footer { border-top: 1px solid var(--border); }
.app-modal .modal-title { font-family: var(--font-display); font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Rodapé ---------- */
.footer-flutuante {
    position: fixed;
    bottom: 0; left: var(--sidebar-w); right: 0;
    z-index: 15;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.8rem;
    color: var(--text-3);
    background: rgba(6, 10, 22, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    font-family: var(--font-display);
    letter-spacing: 1px;
}

/* ---------- Responsivo ---------- */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Tablets e abaixo: sidebar vira barra superior */
@media (max-width: 992px) {
    .app-shell { flex-wrap: wrap; }
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        padding: 10px 12px;
        gap: 8px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-brand { flex-direction: row; border: none; margin: 0; padding: 0; flex-shrink: 0; }
    .sidebar-logo { max-height: 40px; }
    .brand-text { display: none; }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .nav-item { width: auto; padding: 8px 11px; font-size: 0.85rem; flex-shrink: 0; }
    .nav-item span { display: none; }
    .nav-item i { min-width: 0; }
    .nav-item.active::before { display: none; }
    .sidebar-user { margin: 0; padding: 0; background: transparent; border: none; flex-shrink: 0; }
    .user-avatar { display: none; }
    .user-info { display: none; }

    .app-main { margin-left: 0; padding: 18px 14px; }
    .footer-flutuante { left: 0; }

    .main-topbar { flex-wrap: wrap; gap: 8px; }
    .topbar-user {
        position: static;
        transform: none;
        order: -1;
        width: 100%;
        justify-content: center;
        margin: 0;
        max-width: 100%;
    }
    .top-clock { order: 2; }
    .page-head { overflow: visible; }
}

/* Celulares */
@media (max-width: 768px) {
    .glass-card { padding: 16px; }
    .page-head { gap: 12px; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.25rem; border-radius: 12px; }
    .stat-value { font-size: 1.05rem; }
    .stat-hint { font-size: 0.7rem; }
    .head-metric { min-width: 125px; padding: 9px 12px; }
    .search-box { max-width: 100%; }
    .info-row { flex-wrap: wrap; gap: 8px; }
    .form-control, .form-select { font-size: 16px; }
    .top-clock { display: none; }
    .table-neon { min-width: 480px; }
    .app-main { padding: 14px 12px; }
    .topbar-user { padding: 8px 14px; }
    .rev-topbar { padding: 10px 12px; }
    .rev-topbar .btn { font-size: 0.75rem; padding: 6px 10px; }
}

/* Telas pequenas */
@media (max-width: 576px) {
    .page-title { font-size: 0.98rem; }
    .stat-value { font-size: 1rem; }
    .page-head-chip { font-size: 0.68rem; padding: 6px 10px; }
    .modal-dialog { margin: 8px; }
    .app-modal { border-radius: 14px; }
    .modal-body { padding: 16px; }
    .topbar-user-name { font-size: 0.78rem; }
    .footer-flutuante { font-size: 0.68rem; padding: 10px 12px; letter-spacing: 0.5px; }
    .btn { letter-spacing: 0.4px; }
}

/* ---------- DNS de Servidores ---------- */
.btn-xs {
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    line-height: 1.4;
    border-radius: 8px;
}
.dns-addr {
    font-size: 0.72rem;
    color: var(--text-2, #9db2c8);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    padding: 2px 7px;
    border-radius: 6px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.btn-dns-check.btn-success {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.55);
    color: #6ee7b7;
}
.btn-dns-check.btn-success:hover { background: rgba(16, 185, 129, 0.3); color: #a7f3d0; }
.btn-dns-check.btn-danger {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.55);
    color: #fca5a5;
}
.btn-dns-check.btn-danger:hover { background: rgba(239, 68, 68, 0.3); color: #fecaca; }

/* ---------- M�ltiplos Servidores/MACs por Cliente ---------- */
.server-picker { position: relative; }
.server-picker-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.server-option {
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-1, #e2e8f0);
    transition: background 0.15s ease;
}
.server-option:hover { background: rgba(59, 130, 246, 0.12); }
.server-option input.form-check-input { margin: 0; }
.server-option-custo {
    font-size: 0.7rem;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    padding: 1px 6px;
    border-radius: 6px;
    white-space: nowrap;
}
.mac-rows { display: flex; flex-direction: column; gap: 6px; }
.mac-row { display: flex; gap: 6px; align-items: center; }
.mac-input { flex: 1; }
.otp-input { flex: 0 0 140px; }
.chip-mac {
    display: inline-block;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
    border-radius: 6px;
    padding: 1px 8px;
    margin: 1px 2px 1px 0;
    font-size: 0.72rem;
}

/* ---------- PIX e lembretes ---------- */
.btn-pix {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
    border: 1px solid rgba(139, 92, 246, 0.6);
    color: #c4b5fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-pix:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.45));
    color: #ede9fe;
    border-color: rgba(167, 139, 250, 0.9);
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.pix-qr-box {
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    width: fit-content;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.pix-qr-img { display: block; border-radius: 8px; }
.pix-copia-cola {
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    word-break: break-all;
    font-size: 0.72rem;
    color: #e2e8f0;
    max-width: 360px;
    margin: 0 auto;
    text-align: left;
}

