/* =====================================================
   OXQC System - Pure CSS (Navy Blue Corporate Theme)
   ===================================================== */

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

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

:root {
    --navy-900: #0F2847;
    --navy-800: #1A3A5F;
    --navy-700: #1E3A5F;
    --navy-600: #2C4F7C;
    --navy-500: #3D6494;
    --navy-100: #E8EEF5;
    --navy-50: #F4F7FB;
    
    --gray-900: #1A202C;
    --gray-700: #4A5568;
    --gray-500: #718096;
    --gray-300: #CBD5E0;
    --gray-200: #E2E8F0;
    --gray-100: #EDF2F7;
    --gray-50: #F7FAFC;
    
    --green-500: #10B981;
    --green-100: #D1FAE5;
    --yellow-500: #F59E0B;
    --yellow-100: #FEF3C7;
    --red-500: #EF4444;
    --red-100: #FEE2E2;
    
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 14px;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-900); }

/* =====================================================
   GURU-SIDE (Public form)
   ===================================================== */

.guru-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy-50) 0%, var(--gray-50) 100%);
    padding: 30px 20px;
}

.guru-container {
    max-width: 800px;
    margin: 0 auto;
}

.guru-header {
    text-align: center;
    margin-bottom: 30px;
}

.guru-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.guru-header .logo-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guru-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-900);
}

.guru-header p {
    color: var(--gray-500);
    font-size: 13px;
    margin-top: 4px;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-500);
    font-size: 13px;
    transition: all 0.3s;
}

.step.active .step-circle {
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15);
}

.step.completed .step-circle {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
}

.step-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
    text-align: center;
    max-width: 80px;
}

.step.active .step-label { color: var(--navy-900); font-weight: 600; }

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.card-subtitle {
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-label .required { color: var(--red-500); }

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background: var(--white);
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-textarea { resize: vertical; min-height: 90px; }

.form-help {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Radio & Checkbox */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.radio-item:hover,
.checkbox-item:hover {
    border-color: var(--navy-500);
    background: var(--navy-50);
}

.radio-item input,
.checkbox-item input {
    accent-color: var(--navy-700);
    width: 16px;
    height: 16px;
}

.radio-item.checked,
.checkbox-item.checked {
    border-color: var(--navy-700);
    background: var(--navy-50);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--navy-700);
    color: white;
}
.btn-primary:hover {
    background: var(--navy-900);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--navy-700);
    border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover {
    border-color: var(--navy-700);
    background: var(--navy-50);
}

.btn-success { background: var(--green-500); color: white; }
.btn-success:hover { background: #059669; color: white; }

.btn-danger { background: var(--red-500); color: white; }
.btn-danger:hover { background: #DC2626; color: white; }

.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-block { width: 100%; }

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 25px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    border-left: 4px solid;
}

.alert-info {
    background: var(--navy-50);
    border-color: var(--navy-700);
    color: var(--navy-900);
}
.alert-success {
    background: var(--green-100);
    border-color: var(--green-500);
    color: #065F46;
}
.alert-warning {
    background: var(--yellow-100);
    border-color: var(--yellow-500);
    color: #92400E;
}
.alert-danger {
    background: var(--red-100);
    border-color: var(--red-500);
    color: #991B1B;
}

/* Video container */
.video-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-100);
}

.video-item:last-child { border-bottom: none; padding-bottom: 0; }

.video-title {
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.video-status.pending {
    background: var(--gray-100);
    color: var(--gray-700);
}

.video-status.watching {
    background: var(--yellow-100);
    color: #92400E;
}

.video-status.done {
    background: var(--green-100);
    color: #065F46;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: black;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Quiz */
.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--navy-50);
    border-radius: var(--radius-md);
}

.quiz-progress-text {
    font-weight: 600;
    color: var(--navy-900);
}

.quiz-question {
    background: var(--gray-50);
    padding: 18px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
}

.quiz-question-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 6px;
}

.quiz-question-text {
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--gray-900);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* File Upload */
.file-upload {
    display: block;
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
    box-sizing: border-box;
    width: 100%;
}

.file-upload:hover {
    border-color: var(--navy-700);
    background: var(--navy-50);
}

.file-upload input[type="file"] { 
    display: none !important;
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-icon {
    font-size: 36px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.file-upload-text {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--gray-500);
}

.file-selected {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--navy-50);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--navy-900);
    font-weight: 500;
}

/* Time slots */
.slot-day {
    margin-bottom: 20px;
}

.slot-day-title {
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 10px;
    padding: 8px 14px;
    background: var(--navy-700);
    color: white;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.slot-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    background: var(--white);
}

.slot-item:hover { border-color: var(--navy-500); }
.slot-item.checked { background: var(--navy-50); border-color: var(--navy-700); }

/* =====================================================
   ADMIN-SIDE (Dashboard)
   ===================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

.sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 25px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 25px 25px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 20px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    padding: 3px;
}

.sidebar-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-900);
}

.sidebar-brand-sub {
    font-size: 11px;
    color: var(--gray-500);
}

.sidebar-section {
    padding: 0 15px;
    margin-bottom: 5px;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--navy-50);
    color: var(--navy-700);
}

.sidebar-link.active {
    background: var(--navy-700);
    color: white;
}

.sidebar-link .icon {
    width: 18px; text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 0; right: 0;
    padding: 0 25px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
}

.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--navy-700);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.sidebar-user-name {
    font-size: 12px; font-weight: 600;
}

.sidebar-user-role {
    font-size: 10px; color: var(--gray-500);
}

/* Main content */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 30px;
}

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

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-900);
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 13px;
    margin-top: 3px;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.stat-card.primary {
    background: var(--navy-700);
    color: white;
    border: none;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-card.primary .stat-label { color: rgba(255,255,255,0.8); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-900);
}

.stat-card.primary .stat-value { color: white; }

.stat-icon {
    float: right;
    width: 38px; height: 38px;
    background: var(--navy-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-700);
    font-size: 16px;
}

.stat-card.primary .stat-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Table */
.table-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
}

.table-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-900);
}

.table-tools {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    min-width: 220px;
}

.search-input:focus {
    outline: none;
    border-color: var(--navy-700);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--gray-50);
    padding: 12px 18px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-700);
}

.data-table tr:hover { background: var(--gray-50); }

.data-table tr:last-child td { border-bottom: none; }

.table-empty {
    padding: 50px;
    text-align: center;
    color: var(--gray-500);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-gray { background: var(--gray-100); color: var(--gray-700); }
.badge-green { background: var(--green-100); color: #065F46; }
.badge-yellow { background: var(--yellow-100); color: #92400E; }
.badge-red { background: var(--red-100); color: #991B1B; }
.badge-blue { background: var(--navy-50); color: var(--navy-700); }

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-header h1 {
    font-size: 20px;
    color: var(--navy-900);
    margin-top: 12px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 13px;
}

/* Detail page */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-section {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    padding: 8px 0;
    font-size: 13px;
}

.detail-label {
    color: var(--gray-500);
    font-weight: 500;
}

.detail-value {
    color: var(--gray-900);
    font-weight: 500;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.show { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    padding: 25px;
    box-shadow: var(--shadow-xl);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-brand-name, .sidebar-brand-sub,
    .sidebar-link span:not(.icon),
    .sidebar-user-name, .sidebar-user-role,
    .sidebar-label { display: none; }
    
    .main-content { margin-left: 70px; padding: 20px; }
    .detail-grid { grid-template-columns: 1fr; }
    .stepper { padding: 0; }
    .step-label { display: none; }
    .card { padding: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
