* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #050816;
    color: #f9fafb;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
}

.wrapper {
    width: 100%;
    max-width: 1080px;
    margin: auto;
}

.card {
    background: #0b1220;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(148,163,184,0.3);
}

.logo-container {
    text-align: center;
    margin-bottom: 16px;
}

.logo-container img {
    max-width: 120px;
    height: auto;
}

.title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    color: #e5e7eb;
}

.title span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    color: #9ca3af;
}

input, select {
    background: #020617;
    border-radius: 10px;
    border: 1px solid #1f2937;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #f9fafb;
    outline: none;
    text-transform: uppercase;
}

input::placeholder {
    color: #6b7280;
}

input:focus, select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 1px rgba(249,115,22,0.4);
}

.actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(90deg, #f97316, #f59e0b);
    color: #111827;
    box-shadow: 0 12px 25px rgba(249,115,22,0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.6);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.meta-info {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
    justify-content: space-between;
}

.footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer a {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.footer .instagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #f97316;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.instagram-icon {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

/* Toast / aviso */
.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: #111827;
    color: #f9fafb;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid #f97316;
    box-shadow: 0 18px 30px rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ADMIN */

.admin-wrapper {
    width: 100%;
    max-width: 1180px;
    margin: auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 18px;
}

.admin-header img {
    max-width: 110px;
}

.admin-header h1 {
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-top: 8px;
    color: #e5e7eb;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-topbar .btn {
    font-size: 0.7rem;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

.admin-topbar .btn.logout {
    border-color: #ef4444;
    color: #fecaca;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tab-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.75rem;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tab-btn.active {
    background: linear-gradient(90deg, #f97316, #f59e0b);
    color: #111827;
    border-color: transparent;
}

.table-wrapper {
    background: #020617;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,0.3);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #1f2937;
}

th {
    font-weight: 600;
    letter-spacing: 0.09em;
    color: #9ca3af;
}

tr:nth-child(even) td {
    background: rgba(15,23,42,0.6);
}

.badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    border: 1px solid #4b5563;
}

/* Login admin */
.login-container {
    max-width: 420px;
    margin: 60px auto;
}

.login-title {
    text-align: center;
    font-size: 1rem;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form .btn {
    width: 100%;
}

.alert {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.alert-error {
    background: rgba(248,113,113,0.08);
    border: 1px solid #ef4444;
    color: #fecaca;
}

.alert-success {
    background: rgba(34,197,94,0.08);
    border: 1px solid #22c55e;
    color: #bbf7d0;
}

@media (max-width: 640px) {
    .card {
        padding: 18px 14px;
    }
    .title {
        font-size: 0.9rem;
    }
}


/* Contadores do painel administrativo - cards premium */
.quote-dashboard {
    margin: 18px 0 18px;
    padding: 20px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 18%, rgba(59,130,246,0.14), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(249,115,22,0.10), transparent 32%),
        linear-gradient(180deg, rgba(15,23,42,0.78), rgba(2,6,23,0.92));
    border: 1px solid rgba(148,163,184,0.22);
    box-shadow: 0 22px 55px rgba(0,0,0,0.42);
}

.quote-dashboard-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(148,163,184,0.18);
}

.quote-dashboard-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(15,23,42,0.86);
    border: 1px solid rgba(148,163,184,0.20);
}

.quote-dashboard-icon span {
    width: 5px;
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: 0 0 12px rgba(255,255,255,0.45);
}

.quote-dashboard-icon span:nth-child(1) { height: 10px; }
.quote-dashboard-icon span:nth-child(2) { height: 16px; }
.quote-dashboard-icon span:nth-child(3) { height: 23px; }

.quote-dashboard-title h2 {
    font-size: 1.28rem;
    letter-spacing: 0.06em;
    color: #f8fafc;
    line-height: 1.1;
}

.quote-dashboard-title p {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.9rem;
}

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

.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(2,6,23,0.94));
    border: 1px solid rgba(148,163,184,0.20);
    border-radius: 15px;
    padding: 18px;
    min-height: 132px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 28px rgba(0,0,0,0.25);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 18%, rgba(96,165,250,0.10), transparent 32%);
    pointer-events: none;
}

.stat-total {
    grid-column: span 2;
    min-height: 146px;
    border-color: rgba(59,130,246,0.34);
    background:
        radial-gradient(circle at 8% 20%, rgba(37,99,235,0.25), transparent 38%),
        linear-gradient(145deg, rgba(15,23,42,0.98), rgba(7,17,36,0.98));
}

.stat-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.35rem;
    background: rgba(37,99,235,0.18);
    color: #60a5fa;
    box-shadow: 0 12px 30px rgba(0,0,0,0.26);
}

.stat-icon-total {
    flex-basis: 70px;
    width: 70px;
    height: 70px;
    font-size: 2rem;
    background: rgba(37,99,235,0.30);
}

.stat-card > div:not(.stat-icon) {
    position: relative;
    z-index: 1;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    line-height: 1.25;
}

.stat-number {
    color: #ffffff;
    font-size: 2.35rem;
    font-weight: 950;
    line-height: 1;
    margin-top: 10px;
    text-shadow: 0 8px 22px rgba(0,0,0,0.40);
}

.stat-total .stat-number {
    font-size: 3.1rem;
}

.stat-caption,
.stat-empty {
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    margin-top: 10px;
}

.stat-color-1 .stat-icon, .stat-color-1 .stat-caption { color: #60a5fa; }
.stat-color-1 .stat-icon { background: rgba(37,99,235,0.22); }
.stat-color-2 .stat-icon, .stat-color-2 .stat-caption { color: #8b5cf6; }
.stat-color-2 .stat-icon { background: rgba(124,58,237,0.22); }
.stat-color-3 .stat-icon, .stat-color-3 .stat-caption { color: #34d399; }
.stat-color-3 .stat-icon { background: rgba(16,185,129,0.20); }
.stat-color-4 .stat-icon, .stat-color-4 .stat-caption { color: #fb923c; }
.stat-color-4 .stat-icon { background: rgba(249,115,22,0.20); }
.stat-color-5 .stat-icon, .stat-color-5 .stat-caption { color: #facc15; }
.stat-color-5 .stat-icon { background: rgba(234,179,8,0.18); }
.stat-color-6 .stat-icon, .stat-color-6 .stat-caption { color: #22d3ee; }
.stat-color-6 .stat-icon { background: rgba(6,182,212,0.18); }

@media (max-width: 980px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-total {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 18px 14px;
    }
    .title {
        font-size: 0.9rem;
    }
    .quote-dashboard {
        padding: 14px;
    }
    .quote-dashboard-title h2 {
        font-size: 1rem;
    }
    .quote-dashboard-title p {
        font-size: 0.78rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-total {
        grid-column: span 1;
    }
    .stat-card {
        min-height: 112px;
        padding: 14px;
    }
    .stat-number,
    .stat-total .stat-number {
        font-size: 2rem;
    }
}
