:root {
    --bg: #07080a;
    --sidebar: #0b0d11;
    --panel: #11141a;
    --panel2: #171a21;
    --gold: #d9ad45;
    --gold2: #f4cc65;
    --text: #f7f3e8;
    --muted: #9ba0aa;
    --line: rgba(255, 255, 255, .09);
    --danger: #ff6b75;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% -10%, rgba(217, 173, 69, .14), transparent 34%),
        radial-gradient(circle at 10% 90%, rgba(217, 173, 69, .08), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    text-align: center;
    padding: 42px 34px;
    border-radius: 26px;
    border: 1px solid rgba(217, 173, 69, .32);
    background:
        radial-gradient(circle at top, rgba(217, 173, 69, .18), transparent 45%),
        linear-gradient(145deg, #171a21, #090a0d);
    box-shadow: 0 35px 90px rgba(0, 0, 0, .65);
}

.brand-ball {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    font-size: 2.8rem;
    background: rgba(217, 173, 69, .12);
    border: 1px solid rgba(217, 173, 69, .35);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold2);
    font-size: .72rem;
    letter-spacing: .32em;
    font-weight: 900;
}

.login-card h1,
.content h1 {
    margin: 0;
    line-height: 1.05;
}

.login-card h1 {
    font-size: 2.3rem;
}

.login-card > p {
    color: var(--muted);
    line-height: 1.6;
}

.login-card input {
    width: 100%;
    margin: 18px 0 14px;
    padding: 15px 16px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .13);
    color: white;
    border-radius: 12px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(217, 173, 69, .1);
}

.login-card button,
.topbar button {
    border: 0;
    background: linear-gradient(135deg, var(--gold2), var(--gold));
    color: #08090b;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(217, 173, 69, .16);
    transition: .25s;
}

.login-card button {
    width: 100%;
}

.login-card button:hover,
.topbar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(217, 173, 69, .25);
}

.login-card a {
    display: block;
    margin-top: 22px;
    color: var(--muted);
    font-size: .85rem;
}

.error {
    margin: 14px 0;
    background: rgba(255, 107, 117, .12);
    color: #ff9ca3;
    border: 1px solid rgba(255, 107, 117, .28);
    padding: 12px;
    border-radius: 12px;
}

.dashboard {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 50% 0, rgba(217, 173, 69, .08), transparent 38%),
        var(--sidebar);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 10px;
}

.brand > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(217, 173, 69, .12);
    border: 1px solid rgba(217, 173, 69, .22);
    font-size: 1.5rem;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    font-size: .78rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 42px;
}

.sidebar nav a {
    color: #b6bac3;
    padding: 14px 14px;
    border-radius: 14px;
    transition: .25s;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: linear-gradient(135deg, rgba(217, 173, 69, .18), rgba(255, 255, 255, .04));
    color: white;
    box-shadow: inset 0 0 0 1px rgba(217, 173, 69, .18);
}

.logout {
    color: #ff8d94;
    padding: 14px;
    border-radius: 14px;
    transition: .25s;
}

.logout:hover {
    background: rgba(255, 107, 117, .1);
}

.content {
    width: 100%;
    max-width: 1580px;
    margin: auto;
    padding: 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 30px;
}

.content h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -.04em;
}

.subtitle {
    margin: 12px 0 0;
    color: var(--muted);
}

.topbar button {
    min-width: 190px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
}

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

.cards article,
.panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 0, rgba(217, 173, 69, .10), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .24);
}

.cards article {
    padding: 26px;
}

.cards article::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 1px solid rgba(244, 204, 101, .22);
    pointer-events: none;
}

.cards span {
    color: #c1c3ca;
    font-size: .82rem;
}

.cards strong {
    display: block;
    margin: 12px 0;
    color: var(--gold2);
    font-size: 2.7rem;
    line-height: 1;
    text-shadow: 0 0 24px rgba(217, 173, 69, .18);
}

.cards small {
    color: var(--muted);
}

.panel {
    margin-top: 22px;
    padding: 24px;
}

.chart-panel {
    height: 390px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.panel-title h2 {
    font-size: 1.08rem;
    margin: 0 0 6px;
}

.panel-title span {
    color: var(--muted);
    font-size: .78rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 260px;
    padding: 0 13px;
    background: rgba(0, 0, 0, .32);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
}

.search-box span {
    color: var(--gold2);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 13px 0;
    background: transparent;
    border: 0;
    color: white;
    outline: none;
}

.search-box input::placeholder {
    color: #747984;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: #858b96;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}

td {
    padding: 17px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #c7cad2;
    font-size: .9rem;
}

tbody tr {
    transition: .22s;
}

tbody tr:hover {
    background: rgba(217, 173, 69, .045);
}

td strong {
    color: white;
}

.people-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(217, 173, 69, .14);
    color: var(--gold2);
    font-weight: 900;
    border: 1px solid rgba(217, 173, 69, .22);
}

.delete-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(255, 107, 117, .12);
    color: #ff8b92;
    border: 1px solid rgba(255, 107, 117, .32);
    border-radius: 11px;
    cursor: pointer;
    transition: .22s;
}

.delete-btn:hover {
    background: rgba(255, 107, 117, .22);
    transform: scale(1.05);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 42px;
}

@media (max-width: 900px) {
    .dashboard {
        display: block;
    }

    .sidebar {
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        padding: 14px;
    }

    .sidebar nav {
        display: none;
    }

    .logout {
        margin-left: auto;
    }

    .content {
        padding: 24px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .brand small {
        display: none;
    }

    .topbar {
        display: block;
    }

    .topbar button {
        margin-top: 18px;
        width: 100%;
    }

    .panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .chart-panel {
        height: 330px;
    }

    td,
    th {
        white-space: nowrap;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding-top: 22px;
}

.pagination button {
    border: 1px solid rgba(217, 173, 69, .35);
    background: rgba(217, 173, 69, .12);
    color: var(--gold2);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    background: var(--gold);
    color: #08090b;
}

.pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pagination span {
    color: var(--muted);
    font-size: .85rem;
}

/* AJUSTE COMPACTO */

.dashboard {
    grid-template-columns: 235px 1fr;
}

.sidebar {
    padding: 20px 12px;
}

.content {
    max-width: 1320px;
    padding: 26px 32px;
}

.topbar {
    margin-bottom: 22px;
}

.content h1 {
    font-size: clamp(2.1rem, 3vw, 3rem);
}

.subtitle {
    font-size: .95rem;
}

.cards {
    gap: 14px;
}

.cards article {
    padding: 20px 22px;
    border-radius: 18px;
}

.cards strong {
    font-size: 2.3rem;
}

.panel {
    margin-top: 16px;
    padding: 20px 24px;
    border-radius: 18px;
}

.chart-panel {
    height: 310px;
}

.panel-title {
    margin-bottom: 14px;
}

th {
    font-size: .76rem;
    padding: 11px 12px;
}

td {
    font-size: .95rem;
    padding: 12px;
}

.people-pill {
    min-width: 28px;
    height: 28px;
    font-size: .9rem;
}

.delete-btn {
    width: 30px;
    height: 30px;
}

.search-box {
    min-width: 230px;
}

.search-box input {
    padding: 10px 0;
    font-size: .9rem;
}

.pagination {
    padding-top: 14px;
}

.topbar button {
    padding: 13px 18px;
    min-width: 180px;
}