/**
 * tema.css - Full Premium Suite (Dashboard & Survey Wizard)
 */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;
    --accent: #f59e0b;
    --bg-main: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', 'Inter', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* LAYOUT: Sidebar & Main */
.sidebar {
    width: 280px; height: 100vh; background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color); position: fixed;
    padding: 2.5rem 1.5rem; z-index: 100; display: flex; flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.02);
}
.main-content { margin-left: 280px; padding: 3rem; min-height: 100vh; }

/* NAVIGATION */
.nav-group { margin-bottom: 2rem; }
.nav-label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; padding-left: 1rem; }
.nav-link {
    display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.2rem;
    border-radius: var(--radius-md); color: var(--text-muted); text-decoration: none;
    font-weight: 600; transition: all 0.3s ease; margin-bottom: 0.4rem;
}
.nav-link:hover { background: var(--bg-main); color: var(--primary); transform: translateX(5px); }
.nav-link.active { background: var(--primary); color: #fff; box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25); }

/* CARDS */
.card {
    background: var(--white); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
    padding: 2.5rem; transition: all 0.3s ease; position: relative;
}
@media (min-width: 1024px) { .card { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); } }

/* SURVEY WIZARD & PROGRESS */
.progress-container { width: 100%; height: 10px; background: #e2e8f0; border-radius: 10px; margin-bottom: 2.5rem; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
.progress-bar { height: 100%; background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%); transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1); }

.question-step { display: none; }
.question-step.active { display: block; animation: slideIn 0.5s ease forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* FORM ELEMENTS */
.form-group { margin-bottom: 1.5rem; }
label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.6rem; color: var(--text-main); }
input, select, textarea {
    width: 100%; padding: 0.9rem 1.25rem; border-radius: 12px;
    border: 2px solid #f1f5f9; background: #f8fafc; font-size: 1rem; font-weight: 500;
    transition: all 0.3s ease;
}
input:focus, select:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }

/* CHOICE BUTTONS (E/H) */
.choice-box { display: flex; gap: 0.75rem; justify-content: center; }
.choice-item input { display: none; }
.choice-label {
    width: 54px; height: 54px; border-radius: 16px; 
    border: 2px solid var(--border-color); background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.1rem; cursor: pointer; transition: all 0.3s ease;
}
.choice-item input:checked + .choice-label { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 8px 15px rgba(79, 70, 229, 0.2); }
.choice-item input:checked + .choice-label.no { background: #ef4444; border-color: #ef4444; box-shadow: 0 8px 15px rgba(239, 68, 68, 0.2); }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
    padding: 0.9rem 1.8rem; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; transition: all 0.3s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3); }

/* TABLES & STATS */
.table-container { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; padding: 1.2rem; text-align: left; font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
td { padding: 1.2rem; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
.sticky-col { position: sticky; left: 0; background: #fff; z-index: 10; border-right: 2px solid #f8fafc; min-width: 300px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { background: #fff; padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.stat-value { font-size: 2.5rem; font-weight: 900; line-height: 1; }

.badge { padding: 0.4rem 0.8rem; border-radius: 50px; font-size: 0.75rem; font-weight: 800; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* MOBILE RESPONSIVE (MAGIC) */
@media (max-width: 768px) {
    .sidebar { width: 0; padding: 0; overflow: hidden; }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .container { padding: 0; }
    .card { padding: 1.5rem !important; border-radius: var(--radius-lg); }
    .table-wrapper { display: none; }
    .mobile-survey-view { display: block !important; }
    
    .question-card {
        background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-lg);
        margin-bottom: 2rem; overflow: hidden; box-shadow: var(--shadow-md);
    }
    .mobile-question-header {
        background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%); color: #fff;
        padding: 1.5rem; font-weight: 800; font-size: 1.1rem; line-height: 1.4; text-align: center;
    }
    .mobile-branch-list { padding: 1rem; }
    .mobile-branch-row {
        display: flex; align-items: center; justify-content: space-between;
        padding: 1rem 0.5rem; border-bottom: 1px solid #f1f5f9; gap: 10px;
    }
    .mobile-branch-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); flex: 1; }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar { width: 80px; padding: 2rem 0.5rem; }
    .nav-label, .nav-link span { display: none; }
    .main-content { margin-left: 80px; }
}
