:root {
    --brand: #6366f1;
    --brand-hover: #4f46e5;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Top Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dashboard Metrics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

/* Tabs Interface */
.tabs-nav {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
    width: fit-content;
}

.tab-trigger {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-trigger.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Main Content Card */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Input Controls */
.input-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

select,
input {
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 0.875rem;
    outline: none;
    transition: border 0.2s;
    width: 100%;
}

select:focus,
input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    height: 40px;
}

.btn-primary:hover {
    background: var(--brand-hover);
}

/* Table Design */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

th {
    text-align: left;
    padding: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* Quiz UI */
#quiz-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    place-items: center;
    z-index: 100;
}

.quiz-modal {
    background: white;
    width: 90%;
    max-width: 440px;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.quiz-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
}

.btn-quiz {
    height: 48px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-quiz:active {
    transform: scale(0.98);
}

.btn-quiz-yes {
    background: var(--success);
    color: white;
}

.btn-quiz-no {
    background: var(--danger);
    color: white;
}

/* Validation List */
.validation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: border 0.2s;
}

.validation-item:hover {
    border-color: var(--brand);
}

/* ---------------------------------
    AUTH EXTENSIONS (Mantendo o Padrão)
    --------------------------------- */
#auth-screen {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    max-width: 400px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-tabs {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#main-app {
    display: none;
}
