/* ============================================================
   GTAWebtax - Design system compartilhado
   Incluido via menu.html em todas as paginas que usam o sidebar.

   Mesma identidade do site institucional (static/site/site.css):
   azul-marinho + ciano/teal da espiral do logotipo, degrades,
   Poppins (titulos) + Inter (interface), botoes com brilho.
   ============================================================ */

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

:root {
    --gta-bg: #f5f8fc;
    --gta-surface: #ffffff;
    --gta-border: #e3e9f2;
    --gta-text: #0f172a;
    --gta-text-muted: #5b6b82;

    /* primaria: teal escuro da marca (contraste com texto branco) */
    --gta-primary: #1f7fa6;
    --gta-primary-dark: #0b1f3a;
    --gta-primary-light: #e3f4fa;

    /* acento: ciano do site */
    --gta-accent: #22c3e6;
    --gta-accent-dark: #1593b3;
    --gta-accent-light: #e0f8fd;

    --gta-sidebar-bg: #061325;
    --gta-sidebar-bg-alt: #12305a;
    --gta-sidebar-text: #b7c6da;
    --gta-sidebar-text-active: #ffffff;

    --gta-success: #12935a;
    --gta-success-bg: #e5f7ee;
    --gta-danger: #d64545;
    --gta-danger-bg: #fdecec;
    --gta-warning: #b7791f;
    --gta-warning-bg: #fdf4e3;

    --gta-radius: 16px;
    --gta-radius-sm: 10px;
    --gta-shadow: 0 1px 2px rgba(15, 40, 80, 0.05), 0 6px 18px -10px rgba(15, 40, 80, 0.18);
    --gta-shadow-md: 0 18px 44px -18px rgba(15, 40, 80, 0.35);

    --gta-degrade: linear-gradient(135deg, #22d3ee 0%, #3299bb 45%, #2563eb 100%);
    --gta-degrade-escuro: linear-gradient(150deg, #061325 0%, #0b1f3a 55%, #12305a 100%);

    --gta-font-display: 'Poppins', 'Inter', sans-serif;
    --gta-font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@keyframes gta-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gta-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gta-pulso {
    0% { box-shadow: 0 0 0 0 rgba(125, 255, 179, .7); }
    70% { box-shadow: 0 0 0 8px rgba(125, 255, 179, 0); }
    100% { box-shadow: 0 0 0 0 rgba(125, 255, 179, 0); }
}

body {
    font-family: var(--gta-font-body);
    background-color: var(--gta-bg);
    background-image:
        radial-gradient(900px 500px at 100% 0%, rgba(34, 211, 238, 0.08), transparent 60%),
        radial-gradient(800px 500px at 0% 100%, rgba(37, 99, 235, 0.06), transparent 60%);
    background-attachment: fixed;
    color: var(--gta-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .gta-display {
    font-family: var(--gta-font-display);
    letter-spacing: -0.02em;
}

a { color: var(--gta-primary); }

::selection { background: rgba(34, 211, 238, .25); }

/* barra de rolagem discreta */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9d5e4; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b9cd; background-clip: padding-box; border: 2px solid transparent; }

/* ---------- Sidebar ---------- */
.sidebar {
    height: 100%;
    width: 232px;
    position: fixed;
    top: 0;
    left: 0;
    background:
        radial-gradient(260px 260px at 110% -10%, rgba(34, 211, 238, 0.28), transparent 70%),
        radial-gradient(260px 300px at -20% 105%, rgba(37, 99, 235, 0.30), transparent 70%),
        var(--gta-degrade-escuro);
    padding: 18px 0 12px;
    color: var(--gta-sidebar-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 8px 0 30px -12px rgba(0, 0, 0, 0.45);
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar::before { /* linha luminosa na borda direita */
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .45), transparent);
    pointer-events: none;
}

.sidebar > div, .sidebar .footer {
    position: relative;
}

.sidebar .brand {
    text-align: center;
    margin: 0 0 10px;
    padding: 4px 16px 6px;
}

.sidebar .brand a { display: inline-block; }

.sidebar .brand img {
    max-width: 150px;
    height: auto;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

.sidebar .brand img:hover { transform: rotate(-3deg) scale(1.04); }

.sidebar hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 8px 16px 12px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0 12px;
    margin: 0;
}

.sidebar ul li {
    padding: 2px 0;
    animation: gta-fade-up 0.45s ease both;
}

.sidebar ul li:nth-child(1) { animation-delay: 0.03s; }
.sidebar ul li:nth-child(2) { animation-delay: 0.07s; }
.sidebar ul li:nth-child(3) { animation-delay: 0.11s; }
.sidebar ul li:nth-child(4) { animation-delay: 0.15s; }
.sidebar ul li:nth-child(5) { animation-delay: 0.19s; }
.sidebar ul li:nth-child(6) { animation-delay: 0.23s; }
.sidebar ul li:nth-child(7) { animation-delay: 0.27s; }
.sidebar ul li:nth-child(8) { animation-delay: 0.31s; }

.sidebar ul li a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--gta-sidebar-text) !important;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    border-radius: 12px;
    background-color: transparent !important;
    overflow: hidden;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: var(--gta-sidebar-text-active) !important;
    transform: translateX(3px);
}

.sidebar ul li a.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.28)) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35), 0 10px 24px -14px rgba(34, 211, 238, 0.8);
}

.sidebar ul li a.active::before { /* barrinha em degrade */
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--gta-degrade);
}

.sidebar .footer {
    padding: 12px 18px 0;
    text-align: left;
    color: rgba(183, 198, 218, .75);
    font-size: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 14px;
}

.sidebar .footer p { margin: 6px 0 0; }

.sidebar .footer a {
    color: #7fdcf0;
    text-decoration: none;
}

.sidebar .footer a:hover {
    color: #fff;
}

.content {
    margin-left: 232px;
    padding: 26px 28px;
    min-height: 100vh;
    animation: gta-fade-in 0.35s ease both;
}

@media (max-width: 780px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .content {
        margin-left: 0;
        padding: 18px 16px;
    }
}

/* ---------- Cards / paineis genericos ---------- */
.gta-card {
    background: var(--gta-surface);
    border: 1px solid var(--gta-border);
    border-radius: var(--gta-radius);
    box-shadow: var(--gta-shadow);
    transition: box-shadow .3s ease, border-color .3s ease;
}

a.gta-card:hover, .gta-card.clicavel:hover {
    box-shadow: var(--gta-shadow-md);
    border-color: rgba(50, 153, 187, .45);
}

/* ---------- Botoes ---------- */
.gta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--gta-border);
    border-radius: 999px;
    background: #fff;
    color: var(--gta-primary-dark);
    font-family: var(--gta-font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background-position .6s ease, filter .2s ease;
    line-height: 1.2;
}

.gta-btn::before { /* brilho que atravessa o botao */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .45) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .8s ease;
    pointer-events: none;
}

.gta-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(50, 153, 187, .55);
    box-shadow: 0 10px 22px -12px rgba(15, 40, 80, .45);
}

.gta-btn:hover::before { transform: translateX(120%); }
.gta-btn:active { transform: translateY(0) scale(.98); }
.gta-btn:disabled, .gta-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.gta-btn-primary {
    background: var(--gta-degrade);
    background-size: 180% 180%;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .65);
}

.gta-btn-primary:hover {
    color: #fff;
    background-position: 100% 50%;
    border-color: transparent;
    box-shadow: 0 16px 30px -14px rgba(37, 99, 235, .8);
}

.gta-btn-outline {
    background: #fff;
    color: var(--gta-primary);
    border-color: var(--gta-primary);
}

.gta-btn-accent {
    background: linear-gradient(135deg, #3be0f5 0%, #22c3e6 100%);
    color: #062033;
    border-color: transparent;
}

.gta-btn-danger {
    background: #fff;
    color: var(--gta-danger);
    border-color: rgba(214, 69, 69, .55);
}

.gta-btn-danger:hover { background: var(--gta-danger-bg); border-color: var(--gta-danger); }

.gta-btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.gta-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--gta-text-muted);
    transition: background-color 0.15s ease, color 0.15s ease, transform .15s ease;
}

.gta-icon-btn:hover {
    background-color: var(--gta-primary-light);
    color: var(--gta-primary);
    transform: translateY(-1px);
}

.gta-icon-btn.danger:hover {
    background-color: var(--gta-danger-bg);
    color: var(--gta-danger);
}

/* ---------- Cards em degrade (acoes / destaques) ---------- */
.gta-grad-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    color: #fff;
    font-family: var(--gta-font-body);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    background-size: 180% 180% !important;
    box-shadow: 0 10px 24px -14px rgba(15, 40, 80, .6);
    transition: transform 0.2s ease, box-shadow 0.25s ease, background-position .6s ease;
}

.gta-grad-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .4) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .8s ease;
    pointer-events: none;
}

.gta-grad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -14px rgba(15, 40, 80, .7);
    background-position: 100% 50% !important;
    color: #fff;
    text-decoration: none;
}

.gta-grad-card:hover::before { transform: translateX(120%); }

.gta-grad-card:active {
    transform: translateY(0);
}

.gta-grad-primary { background: var(--gta-degrade); }
.gta-grad-accent  { background: linear-gradient(135deg, #22d3ee 0%, #3299bb 100%); color: #fff; }
.gta-grad-danger  { background: linear-gradient(135deg, #f0776f 0%, #c43c34 100%); }
.gta-grad-neutral { background: linear-gradient(135deg, #24466f 0%, #0b1f3a 100%); }
.gta-grad-success { background: linear-gradient(135deg, #2fd08a 0%, #12935a 100%); }

/* ---------- Badges ---------- */
.gta-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.gta-badge-muted {
    background: #eef2f7;
    color: var(--gta-text-muted);
}

.gta-badge-primary {
    background: var(--gta-primary-light);
    color: var(--gta-primary);
}

.gta-badge-accent {
    background: var(--gta-accent-light);
    color: var(--gta-accent-dark);
}

/* ---------- Alertas ---------- */
.gta-alert {
    padding: 12px 16px;
    margin: 0 0 16px;
    border-radius: 12px;
    font-size: 13.5px;
    animation: gta-fade-up .35s ease both;
}

.gta-alert-success {
    background-color: var(--gta-success-bg);
    color: var(--gta-success);
    border: 1px solid rgba(18, 147, 90, 0.25);
}

.gta-alert-error {
    background-color: var(--gta-danger-bg);
    color: var(--gta-danger);
    border: 1px solid rgba(214, 69, 69, 0.25);
}

.gta-alert-warning {
    background-color: var(--gta-warning-bg);
    color: var(--gta-warning);
    border: 1px solid rgba(183, 121, 31, 0.25);
}

/* ---------- Inputs ---------- */
.gta-input {
    border: 1.5px solid var(--gta-border);
    border-radius: var(--gta-radius-sm);
    padding: 8px 12px;
    font-family: var(--gta-font-body);
    font-size: 14px;
    color: var(--gta-text);
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.gta-input:focus {
    outline: none;
    border-color: #3299bb;
    box-shadow: 0 0 0 4px rgba(50, 153, 187, 0.15);
}

/* ---------- Tabelas ---------- */
.gta-table {
    width: 100%;
    border-collapse: collapse;
}

.gta-table th,
.gta-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gta-border);
    font-size: 14px;
}

.gta-table thead th {
    background: #f1f6fb;
    color: #3d5170;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
}

.gta-table thead tr:first-child th:first-child { border-top-left-radius: 10px; }
.gta-table thead tr:first-child th:last-child { border-top-right-radius: 10px; }

.gta-table tbody tr {
    transition: background-color .15s ease;
}

.gta-table tbody tr:hover {
    background: #f4fafd;
}

.gta-table th.sortable {
    cursor: pointer;
}

.gta-table th.sortable:hover {
    color: var(--gta-primary);
}

.gta-sort-arrow {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.35;
    font-size: 10px;
}

.gta-table th.sort-asc .gta-sort-arrow,
.gta-table th.sort-desc .gta-sort-arrow {
    opacity: 1;
    color: var(--gta-primary);
}


/* ---------- Barra do site (topo das telas do sistema) ---------- */
html { scroll-padding-top: 76px; }

.barra-site {
    position: fixed;
    top: 0;
    left: 232px;
    right: 0;
    height: 56px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    background: rgba(6, 19, 37, .92);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7);
    border-bottom: 1px solid rgba(34, 211, 238, .18);
    animation: gta-fade-in .35s ease both;
}

.barra-site a { text-decoration: none; }

.barra-site-marca {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cfe9f4;
    font-size: 13.5px;
    white-space: nowrap;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: background .2s, box-shadow .2s;
}

.barra-site-marca strong { color: #fff; font-weight: 700; }
.barra-site-marca .globo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gta-degrade); font-size: 13px; }
.barra-site-marca:hover { background: rgba(34, 211, 238, .14); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .5); }

.barra-site-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.barra-site-links::-webkit-scrollbar { display: none; }

.barra-site-links a {
    position: relative;
    color: rgba(255, 255, 255, .78);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 11px;
    border-radius: 8px;
    white-space: nowrap;
    transition: color .2s;
}

.barra-site-links a::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--gta-degrade);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.barra-site-links a:hover { color: #fff; }
.barra-site-links a:hover::after { transform: scaleX(1); }

.barra-sistema {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    background: var(--gta-degrade);
    background-size: 180% 180%;
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .8);
    transition: transform .2s, background-position .6s;
}

.barra-sistema:hover { color: #fff; transform: translateY(-1px); background-position: 100% 50%; }
.barra-sistema .ponto { width: 8px; height: 8px; border-radius: 50%; background: #7dffb3; animation: gta-pulso 2s infinite; }

.barra-conta { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.barra-usuario {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #fff;
    font: 600 13px var(--gta-font-body);
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: background .2s, box-shadow .2s;
    white-space: nowrap;
}

.barra-usuario:hover { background: rgba(34, 211, 238, .12); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .5); }
.barra-usuario .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gta-degrade); font: 700 13px var(--gta-font-display); }
.barra-usuario .plano { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.barra-usuario .plano.limitado { background: rgba(255, 209, 102, .16); color: #ffd98a; }
.barra-usuario .plano.ilimitado { background: rgba(125, 255, 179, .16); color: #8fffc0; }
.barra-usuario .plano.admin { background: rgba(34, 211, 238, .18); color: #8ae9fb; }

.barra-upgrade {
    border: 0;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 999px;
    color: #1f1300;
    font: 700 13px var(--gta-font-body);
    white-space: nowrap;
    background: linear-gradient(135deg, #ffe08a 0%, #ffb547 100%);
    box-shadow: 0 8px 18px -10px rgba(255, 181, 71, .9);
    transition: transform .2s, box-shadow .2s;
}

a.barra-upgrade { text-decoration: none; display: inline-flex; align-items: center; }
a.barra-upgrade:hover { color: #1f1300; }
.barra-upgrade:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(255, 181, 71, 1); }

.barra-sair {
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    transition: background .2s, color .2s, box-shadow .2s;
}

.barra-sair:hover { color: #fff; background: rgba(239, 68, 68, .18); box-shadow: inset 0 0 0 1px rgba(255, 120, 120, .6); }

@media (max-width: 1320px) {
    .barra-usuario .nome { display: none; }
}

.sidebar ~ .content, .barra-site ~ .content { padding-top: calc(26px + 56px); }


@media (max-width: 780px) {
    .barra-site { position: relative; left: 0; height: auto; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
    .barra-site-links { order: 3; flex-basis: 100%; }
    .barra-sistema, .barra-conta { margin-left: auto; }
    .sidebar ~ .content, .barra-site ~ .content { padding-top: 18px; }
    html { scroll-padding-top: 0; }
}
