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

:root {
    --primary: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #3385d6;
    --primary-50: #e8f1fb;
    --secondary: #00a8e8;
    --dark: #1a1a1a;
    --gray-900: #2d2d2d;
    --gray-800: #424242;
    --gray-700: #616161;
    --gray-600: #757575;
    --gray-500: #9e9e9e;
    --gray-400: #bdbdbd;
    --gray-300: #e0e0e0;
    --gray-200: #eeeeee;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: #f4f6f9;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== NAVBAR ========== */
.navbar-delta {
    background: var(--white) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.4rem 0;
    border-bottom: 2px solid var(--primary);
}

.navbar-delta .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-dark);
    padding: 0;
}

.navbar-delta .navbar-brand img {
    height: 28px;
    width: auto;
}

.navbar-delta .navbar-brand span {
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.navbar-delta .nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.3rem 0.7rem !important;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.navbar-delta .nav-link:hover {
    color: var(--primary) !important;
    background: var(--primary-50);
}

.navbar-delta .nav-link.active {
    color: var(--white) !important;
    background: var(--primary);
}

.navbar-delta .nav-item.dropdown {
    position: relative;
}

.navbar-delta .dropdown-menu {
    position: absolute;
    z-index: 1050;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius);
}

.navbar-delta .dropdown-menu .dropdown-item {
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
}

.navbar-delta .dropdown-menu .dropdown-item.active {
    background: var(--primary-50);
    color: var(--primary) !important;
}

/* ========== PAGE HEADER (compacto) ========== */
.page-header-delta {
    background: var(--white);
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-header-delta h4 {
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0;
}

.page-header-delta p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin: 0.15rem 0 0;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--white);
    margin-bottom: 1.25rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-900);
}

.card-body {
    padding: 1.25rem;
}

/* ========== STAT CARDS (Dashboard) ========== */
.stat-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: var(--primary-50); color: var(--primary); }
.stat-card .stat-icon.yellow { background: #fff8e1; color: #f9a825; }
.stat-card .stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.stat-card .stat-icon.teal { background: #e0f7fa; color: #00838f; }
.stat-card .stat-icon.red { background: #fbe9e7; color: #d32f2f; }

.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-card.border-blue { border-left-color: var(--primary); }
.stat-card.border-yellow { border-left-color: #f9a825; }
.stat-card.border-green { border-left-color: #2e7d32; }
.stat-card.border-teal { border-left-color: #00838f; }
.stat-card.border-red { border-left-color: #d32f2f; }

/* ========== BUTTONS ========== */
.btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-success {
    background: #2e7d32;
    border: 1px solid #2e7d32;
}

.btn-info {
    background: var(--secondary);
    border: 1px solid var(--secondary);
    color: var(--white);
}

.btn-danger {
    background: #d32f2f;
    border: 1px solid #d32f2f;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
}

/* ========== FORMS ========== */
.form-control, .form-select {
    border: 1.5px solid var(--gray-300);
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.form-label {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

/* ========== TABLES ========== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--gray-300);
    padding: 0.75rem 1rem;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: var(--primary-50);
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-200);
    font-size: 0.88rem;
}

/* ========== BADGES ========== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.7em;
    border-radius: 50px;
    font-size: 0.78rem;
}

/* ========== HERO LANDING ========== */
.hero-delta {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #003d80 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-delta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 90%, rgba(255,255,255,0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(255,255,255,0.06) 0%, transparent 45%);
    pointer-events: none;
}

.hero-delta .hero-content {
    position: relative;
    z-index: 1;
}

.hero-delta h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-delta .hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    font-weight: 400;
}

.hero-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--white);
}

.hero-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-4px);
    color: var(--white);
}

.hero-card .hero-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.hero-card .hero-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.hero-card .hero-card-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ========== AUTH LOGIN ========== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #003d80 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card .auth-logo img {
    max-width: 200px;
}

/* ========== QUESTIONARIO ========== */
.questionario-container {
    max-width: 680px;
    margin: 2rem auto;
}

.questionario-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.questionario-card .card-header {
    background: var(--primary);
    color: var(--white);
    padding: 1.25rem 1.5rem;
    border: none;
}

.questionario-card .card-header h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.questionario-card .card-body {
    padding: 1.75rem;
}

.timer-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    border: 3px solid var(--primary);
    color: var(--primary);
    margin: 0 auto 1.25rem;
    transition: all 0.3s ease;
}

.timer-warning { border-color: #f9a825; color: #f9a825; }
.timer-danger { border-color: #d32f2f; color: #d32f2f; }

.pergunta-texto {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 1.75rem;
    text-align: center;
    line-height: 1.6;
}

.btn-resposta {
    min-width: 140px;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-resposta-sim { background: #2e7d32; color: var(--white); }
.btn-resposta-sim:hover { background: #1b5e20; transform: translateY(-2px); }
.btn-resposta-nao { background: #d32f2f; color: var(--white); }
.btn-resposta-nao:hover { background: #b71c1c; transform: translateY(-2px); }

/* ========== SUB-RESPOSTA ========== */
.sub-resposta-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.sub-resposta-container .sub-item {
    background: var(--bg-light, #f8f9fa);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sub-resposta-container .form-check {
    padding: 0.5rem 1rem;
    background: var(--bg-light, #f8f9fa);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.sub-resposta-container .form-check-input {
    margin-right: 0.5rem;
}

/* ========== FOOTER ========== */
.footer-delta {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 0.6rem 0;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.page-wrapper {
    flex: 1;
}

/* ========== ALERTS ========== */
.alert {
    border: none;
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
}

.alert-success { background: #e8f5e9; color: #1b5e20; }
.alert-danger { background: #fbe9e7; color: #b71c1c; }

/* ========== UTILITIES ========== */
.text-primary { color: var(--primary) !important; }
.bg-primary { background: var(--primary) !important; }

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .hero-delta h1 { font-size: 1.75rem; }
    .hero-card { padding: 1.25rem 1rem; }
    .auth-card { padding: 1.5rem; }
    .btn-resposta { min-width: 0; width: 100%; padding: 0.9rem 1.25rem; font-size: 1.1rem; }
    .btn-resposta + .btn-resposta { margin-top: 0.5rem; }
    .stat-card { padding: 1.1rem; }
    .stat-card .stat-number { font-size: 1.35rem; }
    .table thead th { font-size: 0.72rem; padding: 0.6rem; }
    .table td { padding: 0.6rem; font-size: 0.82rem; }
    .navbar-delta .navbar-brand span { display: none; }
    .timer-circle { width: 56px; height: 56px; font-size: 1rem; }
    .pergunta-texto { font-size: 1rem; }
    .questionario-card .card-body { padding: 1.25rem; }
    .questionario-card .card-header { padding: 1rem 1.25rem; }
    .questionario-card .card-header h3 { font-size: 1rem; }
    .sub-resposta-container .sub-item { padding: 0.75rem; }
    .questionario-container { margin: 1rem auto; }
}

@media (max-width: 480px) {
    .questionario-container { margin: 0.5rem auto; padding-left: 8px; padding-right: 8px; }
    .questionario-card .card-body { padding: 1rem; }
    .questionario-card .card-header { padding: 0.75rem 1rem; }
    .timer-circle { width: 48px; height: 48px; font-size: 0.9rem; }
    .pergunta-texto { font-size: 0.95rem; }
    .sub-resposta-container { max-width: 100%; }
    .btn { font-size: 0.85rem; }
    .form-control, .form-select { font-size: 0.85rem; padding: 0.5rem 0.7rem; }
}
