/* ==============================================================================
   E-Penilaian KIK SMK (Kelas XI AK 3) - Tema Fresh & Elegan
   Desain Responsif untuk HP / Tablet / Laptop / PC / Macbook / iOS / Android
   ============================================================================== */

:root {
    --primary: #0f766e;
    --primary-hover: #115e59;
    --primary-light: #ccfbf1;
    --primary-dark: #134e4a;
    --accent: #06b6d4;
    --accent-light: #cffafe;
    --secondary: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    --border-focus: #14b8a6;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ==============================================================================
   HEADER & NAVBAR
   ============================================================================== */
.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
}

.brand-text h1 {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.brand-text p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==============================================================================
   HERO BANNER
   ============================================================================== */
.hero-banner {
    background: linear-gradient(135deg, #042f2e 0%, #0f766e 50%, #0e7490 100%);
    color: white;
    padding: 48px 20px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.15) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 16px);
    color: #ccfbf1;
    max-width: 780px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Stats Row in Hero */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5eead4;
}

.stat-info .stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-info .stat-label {
    font-size: 12px;
    color: #99f6e4;
    font-weight: 500;
}

/* ==============================================================================
   CONTAINER & LAYOUT
   ============================================================================== */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title-wrap h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-wrap p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Kriteria KIK 3 Pilar Cards */
.rubric-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
}

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

.pillar-card.packaging {
    border-top-color: var(--accent);
}

.pillar-card.marketing {
    border-top-color: #8b5cf6;
}

.pillar-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.pillar-card.packaging .pillar-icon {
    background: var(--accent-light);
    color: var(--accent);
}

.pillar-card.marketing .pillar-icon {
    background: #ede9fe;
    color: #8b5cf6;
}

.pillar-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pillar-badge {
    font-size: 11px;
    background: var(--bg-surface);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.pillar-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.pillar-list {
    list-style: none;
    font-size: 12px;
}

.pillar-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.pillar-list li svg {
    color: var(--success);
    flex-shrink: 0;
}

/* ==============================================================================
   9 KELOMPOK SHOWCASE CARDS (GRID)
   ============================================================================== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #99f6e4;
}

.group-card-header {
    padding: 18px 20px;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-number-pill {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status.graded {
    background: #dcfce7;
    color: #15803d;
}

.badge-status.pending {
    background: #fef3c7;
    color: #b45309;
}

.group-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-tag {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.group-product-name {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
}

.group-theme {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
    background: var(--bg-surface);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.students-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.students-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.students-list-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.student-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.student-chip-name {
    font-weight: 600;
    color: var(--text-main);
}

.student-chip-role {
    font-size: 10.5px;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Group Card Score Summary (If Graded) */
.group-score-box {
    margin-top: auto;
    background: linear-gradient(135deg, #f0fdfa, #e6fffa);
    border: 1px solid #99f6e4;
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.score-col .score-lbl {
    font-size: 10.5px;
    color: var(--primary-dark);
    font-weight: 600;
    display: block;
}

.score-col .score-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.score-col .score-pred {
    font-size: 11px;
    font-weight: 700;
    color: #047857;
}

.score-grade-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 8px rgba(15, 118, 110, 0.2);
}

.group-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ==============================================================================
   BUTTONS
   ============================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0d9488);
    color: white;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.35);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

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

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

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #0284c7);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-block {
    width: 100%;
}

/* ==============================================================================
   LEADERBOARD / REKAP TABEL
   ============================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.custom-table th {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.custom-table tr:hover {
    background: #f8fafc;
}

/* ==============================================================================
   MODAL DIALOGS
   ============================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--danger);
    background: #fee2e2;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
}

/* ==============================================================================
   BACKEND / ADMIN DASHBOARD STYLES
   ============================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.admin-sidebar {
    width: 260px;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 11px;
    color: #38bdf8;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-link:hover {
    color: #ffffff;
    background: #1e293b;
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0d9488);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #1e293b;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

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

.teacher-text .t-name {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.teacher-text .t-role {
    font-size: 10.5px;
    color: #94a3b8;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar-title h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.admin-topbar-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-body {
    padding: 28px;
    flex: 1;
    max-width: 1300px;
}

/* ==============================================================================
   FORM PENILAIAN GURU (BACKEND)
   ============================================================================== */
.assessment-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.card-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.card-form-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.rubric-dimension-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

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

.dimension-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
}

.dimension-weight-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.rubric-item {
    margin-bottom: 12px;
}

.rubric-item-label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.rubric-score-display {
    color: var(--primary);
    font-weight: 700;
}

.range-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-range {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    outline: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.number-input-score {
    width: 60px;
    padding: 4px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-dark);
}

.number-input-score:focus {
    border-color: var(--primary);
    outline: none;
}

/* AI Assistant Box */
.ai-assistant-card {
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
    border: 1.5px solid #2dd4bf;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.15);
}

.ai-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ai-assistant-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f766e;
}

.ai-badge {
    background: #0d9488;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ai-content-box {
    background: white;
    border: 1px solid #ccfbf1;
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #134e4a;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 12px;
}

/* Sticky Calculation Sidebar */
.sticky-calc-sidebar {
    position: sticky;
    top: 90px;
}

.calc-summary-card {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.calc-summary-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.calc-main-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin: 8px 0;
}

.calc-badges-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.badge-calc-grade {
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: var(--radius-full);
}

.badge-calc-pred {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.calc-breakdown-list {
    text-align: left;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 12px;
    margin-bottom: 20px;
}

.calc-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.calc-breakdown-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
    padding-top: 8px;
}

/* ==============================================================================
   LOGIN SCREEN
   ============================================================================== */
.login-body {
    background: linear-gradient(135deg, #042f2e 0%, #0f766e 40%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

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

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

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

.class-pill {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 18px;
}

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

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    color: var(--text-light);
}

.input-with-icon input,
.form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-control.no-icon {
    padding-left: 14px;
}

.input-with-icon input:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
    outline: none;
}

.login-hint {
    background: #f0fdfa;
    border: 1px dashed #5eead4;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 11.5px;
    color: #115e59;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.back-link {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.back-link:hover {
    color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ==============================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ============================================================================== */
@media (max-width: 1024px) {
    .assessment-container {
        grid-template-columns: 1fr;
    }

    .sticky-calc-sidebar {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 12px;
    }

    .sidebar-link {
        white-space: nowrap;
        font-size: 12px;
        padding: 8px 12px;
    }

    .admin-body {
        padding: 16px;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }

    .group-card-actions {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        padding: 32px 16px;
    }

    .stat-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .brand-text h1 {
        font-size: 15px;
    }

    .brand-text p {
        display: none;
    }

    .hero-title {
        font-size: 22px;
    }

    .card-form {
        padding: 16px;
    }

    .range-slider-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .number-input-score {
        width: 100%;
    }
}

/* ==============================================================================
   UPLOAD DROPZONE & FILE ATTACHMENTS
   ============================================================================== */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background: #f0fdfa;
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.file-chip {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* ==============================================================================
   RESPONSIVE GALLERY GRID & THUMBNAILS (MENYESUAIKAN KOTAK RAPI)
   ============================================================================== */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.gallery-thumb-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.thumb-img-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #f1f5f9;
}

.thumb-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.thumb-img-box:hover img {
    transform: scale(1.08);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.thumb-img-box:hover .thumb-overlay {
    opacity: 1;
}

.thumb-footer {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid var(--border);
    gap: 6px;
}

.thumb-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.thumb-delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.thumb-delete-btn:hover {
    background: #fee2e2;
}

/* ==============================================================================
   RESPONSIVE IMAGE LIGHTBOX POP-UP (HP / Android / iOS / Tablet / Mac / PC)
   ============================================================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.lightbox-img-wrapper {
    max-width: 88vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    background: #0f172a;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-md);
}

.lightbox-caption {
    margin-top: 10px;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    max-width: 80vw;
    background: rgba(15, 23, 42, 0.7);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
    .lightbox-close {
        top: -40px;
        right: 4px;
        width: 32px;
        height: 32px;
    }

    .lightbox-img-wrapper {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-img-wrapper img {
        max-height: 75vh;
    }
}
