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

:root {
    --bg: #f5f7fb;
    --ink: #182033;
    --muted: #788198;
    --line: #e8ecf3;
    --purple: #5b5ce2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    font: 14px Inter, system-ui, sans-serif;
    color: var(--ink);
}

.shell {
    display: flex;
    min-height: 100vh;
}

.side {
    width: 245px;
    background: #12172d;
    color: #fff;
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 10px 34px;
}

.logo span {
    color: #898bff;
}

.side small {
    font-size: 10px;
    color: #777f9d;
    letter-spacing: 1.4px;
    margin: 0 12px 10px;
}

.side a {
    color: #abb2c9;
    text-decoration: none;
    padding: 13px 12px;
    border-radius: 10px;
    margin: 3px 0;
}

.side a:hover {
    background: #272d4b;
    color: white;
}

.sidebottom {
    margin-top: auto;
    background: #1d2340;
    padding: 16px;
    border-radius: 12px;
    color: #aab1c8;
    line-height: 1.8;
}

.sidebottom b {
    color: #fff;
}

.main {
    flex: 1;
    padding: 30px;
    max-width: 1500px;
    margin: auto;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

header small {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted);
}

h1 {
    font-size: 26px;
    letter-spacing: -.8px;
    margin: 7px 0 0;
}

h2 {
    font-size: 17px;
    margin: 0 0 18px;
}

h3 {
    font-size: 15px;
}

.userbadge {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 15px;
    font-weight: 600;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 18px;
}

.stats article,
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 20px;
}

.stats small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.stats strong {
    display: block;
    font-size: 30px;
    letter-spacing: -1px;
    margin: 15px 0 8px;
}

.stats strong i {
    color: #f5a623;
    font-style: normal;
    font-size: 20px;
}

.stats span {
    color: #16a36a;
    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
}

.panelhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pill {
    font-size: 11px;
    background: #eeeefe;
    color: #5b5ce2;
    border-radius: 7px;
    padding: 6px 9px;
    font-weight: 700;
}

.pill.green {
    background: #eaf8f1;
    color: #16845a;
}

.feedback {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
}

.circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef0f7;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}

.feedback p {
    margin: 5px 0;
    color: #5b6478;
}

.feedback small,
.muted {
    color: var(--muted);
    font-size: 12px;
}

.stars {
    color: #f5a623;
    letter-spacing: 2px;
    margin: 4px 0;
}

/* QR Code */
.qrplaceholder {
    height: 180px;
    width: 180px;
    border: 0;
    background: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    font-size: 0;
}

.qrplaceholder img,
.qrplaceholder canvas {
    max-width: 100%;
    height: auto;
}

.qrlarge {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px auto;
    min-height: 220px;
}

.qrlarge img,
.qrlarge canvas {
    max-width: 100%;
    height: auto;
}

.btn,
button {
    display: inline-block;
    border: 0;
    background: var(--purple);
    color: #fff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    margin: 7px 5px 7px 0;
}

.btn.secondary {
    background: #f0f0ff;
    color: #5253cb;
}

.alert {
    padding: 12px;
    background: #f0f0ff;
    color: #5253cb;
    border-radius: 10px;
    margin: 12px 0;
    font-size: 13px;
}

.alert.error {
    background: #fff0f0;
    color: #b33;
}

.alert.success {
    background: #eaf8f1;
    color: #16845a;
}

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

.mt {
    margin-top: 18px;
}

.narrow {
    max-width: 650px;
}

.panel form label,
.auth label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 17px 0 7px;
}

.panel input,
.panel textarea,
.auth input,
.auth select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe4ee;
    border-radius: 9px;
    font: inherit;
    background: #fff;
}

.panel form button {
    margin-top: 20px;
}

.center {
    text-align: center;
}

/* Login / cadastro */
.authbg {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 20% 20%, #e7e7ff, transparent 35%), #f5f7fb;
}

.auth {
    width: min(440px, 100%);
    background: white;
    border: 1px solid var(--line);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 20px 60px #20244a12;
}

.auth .logo {
    margin: 0 0 22px;
    color: #182033;
}

.auth h1 {
    font-size: 25px;
}

.auth p {
    color: var(--muted);
    margin-bottom: 22px;
}

.auth button {
    width: 100%;
    margin-top: 22px;
}

.authfoot {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
}

.authfoot a {
    color: var(--purple);
    font-weight: 700;
}

/* Tabelas */
.tablewrap {
    overflow: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
}

th,
td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-weight: 600;
}

/* Impressão do QR Code */
@media print {
    body {
        background: #fff !important;
    }

    .side,
    header,
    .btn,
    button {
        display: none !important;
    }

    .main {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .panel {
        border: 0 !important;
        box-shadow: none !important;
    }

    .qrlarge {
        margin: 20px auto;
    }
}

/* Tablet */
@media (max-width: 1050px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Mobile */
@media (max-width: 700px) {
    .side {
        width: 68px;
        padding: 20px 8px;
    }

    .side .logo {
        font-size: 0;
        margin: 0 10px 25px;
    }

    .side .logo:after {
        content: 'A';
        font-size: 23px;
        color: #898bff;
    }

    .side small,
    .sidebottom {
        display: none;
    }

    .side a {
        font-size: 0;
        text-align: center;
        padding: 13px 3px;
    }

    .side a:first-letter {
        font-size: 18px;
    }

    .main {
        padding: 18px;
        margin-left: 68px;
    }

    h1 {
        font-size: 21px;
    }

    .stats {
        gap: 9px;
    }

    .stats article {
        padding: 13px;
    }

    .stats strong {
        font-size: 24px;
    }

    .stats small {
        font-size: 10px;
    }

    .stats span {
        font-size: 10px;
    }

    .panel {
        padding: 15px;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .main {
        padding: 12px;
    }

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

    .stats strong {
        font-size: 21px;
    }

    .auth {
        padding: 25px 20px;
    }

    .userbadge {
        padding: 8px 10px;
        font-size: 12px;
    }
}
