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

:root {
    --bg: #07111f;
    --card: #0f1a2b;
    --card-2: #111f33;
    --text: #eef6ff;
    --muted: #91a4ba;
    --green: #39d98a;
    --green-dark: #258c5b;
    --red: #ff5d6c;
    --amber: #f5b942;
    --blue: #55a7ff;
    --purple: #9b72ff;
    --border: rgba(95, 255, 168, .28);
    --border-soft: rgba(255, 255, 255, .15);
    --shadow: rgba(0, 0, 0, .5);
    --cor-destaque: #2e8b57;
    --texto-principal: #fff;
    --texto-mutado: #b0bec5;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background-image:
        linear-gradient(rgba(15, 23, 42, .85), rgba(15, 23, 42, .9)),
        url("fundo-marmore.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    font-family: Inter, "Segoe UI", sans-serif;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, .34);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    gap: 15px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    font-family: Rajdhani, Inter, sans-serif;
    font-weight: 700;
}

.brand span {
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #2e8b57 0%,
        #5fffa8 25%,
        #3d28ff 50%,
        #655aff 75%,
        #2e8b57 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: clamp(1rem, 2vw, 1.62rem);
    letter-spacing: 2px;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    animation: gbm-shine 4s linear infinite;
    transition: letter-spacing .25s ease, transform .25s ease;
}

.brand:hover span {
    letter-spacing: 3px;
    transform: scale(1.015);
    animation-duration: 1.8s;
}

.brand:focus-visible {
    border-radius: 10px;
    outline: 2px solid var(--green);
    outline-offset: 4px;
}

@keyframes gbm-shine {
    from { background-position: 0 center; }
    to { background-position: 200% center; }
}

.brand img {
    width: auto;
    height: 70px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: contain;
}

.top-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.container {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 64px;
}

.page-title { margin-bottom: 22px; }
.page-title h1 {
    margin: 0 0 8px;
    font-family: Rajdhani, Inter, sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    letter-spacing: .5px;
}
.page-title p { margin: 0; color: var(--muted); line-height: 1.55; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 26, 43, .93);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
    backdrop-filter: blur(7px);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.card:hover {
    border-color: rgba(95, 255, 168, .42);
    box-shadow: 0 17px 44px rgba(0, 0, 0, .32);
}

.card h2, .card h3 {
    margin: 0 0 14px;
    font-family: Rajdhani, Inter, sans-serif;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label {
    color: var(--texto-mutado);
    font-family: Rajdhani, Inter, sans-serif;
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .3px;
}

input, select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px;
    outline: none;
    background: rgba(6, 15, 29, .82);
    color: var(--text);
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    border-color: #5fffa8;
    background: rgba(6, 15, 29, .96);
    box-shadow: 0 0 0 3px rgba(95, 255, 168, .12);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 9px;
    background: #0f1a2b;
    color: var(--text);
    text-decoration: none;
    font-family: Rajdhani, Inter, sans-serif;
    font-weight: 700;
    letter-spacing: .25px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover {
    transform: translateY(-1px);
    border-color: #5fffa8;
    box-shadow: 0 0 18px rgba(95, 255, 168, .2);
}
.btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}
.btn:disabled { cursor: wait; opacity: .62; transform: none; }
.btn-primary {
    background: linear-gradient(135deg, #258c5b, #2e9b64);
    border-color: #5fffa8;
}
.btn-danger { background: rgba(255,93,108,.12); border-color: rgba(255,93,108,.5); color: #ff9aa4; }
.btn-purple { background: rgba(155,114,255,.18); border-color: rgba(155,114,255,.5); }
.btn-small { min-height: 32px; padding: 6px 10px; font-size: .78rem; }

.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }
.divider { height: 1px; margin: 20px 0; background: rgba(255,255,255,.1); }

.empty {
    padding: 34px 16px;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}
.pill.green { color: #8bffc1; border-color: rgba(57,217,138,.35); }
.pill.red { color: #ff9aa4; border-color: rgba(255,93,108,.35); }
.pill.amber { color: #ffd87f; border-color: rgba(245,185,66,.35); }
.pill.blue { color: #9dcbff; border-color: rgba(85,167,255,.35); }

.progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}
.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green-dark), var(--green));
}

.stat { color: var(--muted); font-size: .82rem; }
.stat strong { color: var(--text); font-size: 1.25rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: left;
    white-space: nowrap;
}
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .7px; }
td { font-size: .86rem; }

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    max-width: min(390px, calc(100% - 36px));
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 26, 43, .98);
    color: var(--text);
    box-shadow: 0 14px 35px rgba(0,0,0,.4);
    font-weight: 700;
    animation: toast-entrada .22s ease-out;
}
.toast.erro { border-color: rgba(255,93,108,.5); }
.toast.sucesso { border-color: rgba(95,255,168,.5); }

@keyframes toast-entrada {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: 1; }
    .grid-3 > * { grid-column: 1 !important; }
    .topbar {
        min-height: 58px;
        padding: 0 12px;
    }
    .brand { gap: 8px; }
    .brand img { height: 58px; }
    .brand span {
        max-width: min(42vw, 170px);
        font-size: .95rem;
        letter-spacing: 1.2px;
    }
    .top-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
    .top-actions .btn {
        min-height: 34px;
        padding: 6px 9px;
        font-size: .72rem;
    }
    .container { width: min(100% - 24px, 1320px); }
    .container { padding-top: 24px; }
    .card { padding: 18px; }
    .actions.end > .btn { width: 100%; }
    .toast {
        right: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 430px) {
    .brand span { max-width: 88px; }
    .top-actions .btn:not(:last-child) { display: none; }
}

/* Padronização visual exclusiva das páginas internas autenticadas. */
body.gbm-interna {
    --text: #fff;
    --texto: #fff;
    --muted: #b0bec5;
    --mutado: #b0bec5;
    --texto-mutado: #b0bec5;
    color: #fff;
    background-image:
        linear-gradient(rgba(15, 23, 42, .85), rgba(15, 23, 42, .9)),
        url("fundo-marmore.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

body.gbm-interna > header,
body.gbm-interna > main,
body.gbm-interna > .container,
body.gbm-interna > .page-wrapper {
    position: relative;
    z-index: 1;
}

body.gbm-interna #particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

body.gbm-interna .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 56px;
    min-height: 56px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.gbm-interna .brand {
    gap: 15px;
}

body.gbm-interna .brand img {
    width: auto;
    height: 50px;
    border-radius: 8px;
    animation: gbm-interna-float 4s ease-in-out infinite;
}

body.gbm-interna .brand span {
    max-width: none;
    font-family: Rajdhani, Inter, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(
        90deg,
        #2e8b57 0%,
        #5fffa8 25%,
        #3d28ff 50%,
        #655aff 75%,
        #2e8b57 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gbm-shine 4s linear infinite;
}

@keyframes gbm-interna-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

body.gbm-interna :is(.card, .cartao, .zona-perigo, .perfil-card, .contato-card) {
    border: 1px solid rgba(95, 255, 168, .22);
    background: #0f1a2b;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(95, 255, 168, .05) inset;
    backdrop-filter: none;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

body.gbm-interna :is(.card, .cartao, .zona-perigo, .perfil-card, .contato-card):hover {
    border-color: rgba(95, 255, 168, .45);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, .55),
        0 0 14px rgba(95, 255, 168, .12);
}

body.gbm-interna .zona-perigo,
body.gbm-interna .zona-perigo:hover {
    border-color: rgba(255, 100, 115, .55);
}

body.gbm-interna .btn-voltar {
    position: relative;
    display: inline-flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid rgba(95, 255, 168, .25);
    border-radius: 8px;
    background: #0f1a2b;
    color: #fff;
    text-decoration: none;
    font-family: Rajdhani, Inter, sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color .3s ease, box-shadow .3s ease, color .3s ease;
}

body.gbm-interna .btn-voltar::after {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .18) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    content: "";
    pointer-events: none;
    transform: rotate(30deg);
    animation: gbm-btn-shine 4s infinite ease-in-out;
}

body.gbm-interna .btn-voltar:hover {
    border-color: #5fffa8;
    color: #5fffa8;
    box-shadow: 0 0 14px rgba(95, 255, 168, .3);
}

body.gbm-interna .btn-voltar:focus-visible {
    outline: 2px solid #5fffa8;
    outline-offset: 3px;
}

@keyframes gbm-btn-shine {
    0% { left: -60%; }
    15%, 100% { left: 130%; }
}

@media (max-width: 760px) {
    body.gbm-interna .topbar {
        height: 56px;
        min-height: 56px;
        padding: 0 20px;
    }

    body.gbm-interna .brand img {
        height: 40px;
    }

    body.gbm-interna .brand span {
        display: none;
    }

    body.gbm-interna :is(.card, .cartao, .zona-perigo, .perfil-card, .contato-card) {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.gbm-interna .brand img,
    body.gbm-interna .brand span,
    body.gbm-interna .btn-voltar::after {
        animation: none;
    }
}

@media print {
    body.gbm-interna #particles-canvas {
        display: none;
    }
}
