/* ==========================================================================
   CSS GLOBAL TOKENS & SYSTEM DEFINITIONS
   ========================================================================== */
:root {
    /* Color Palette (HSL Tailored for Premium Dark Mode) */
    --bg-main: hsl(224, 25%, 7%);
    --bg-sidebar: hsl(224, 30%, 4%);
    --bg-panel: hsla(224, 20%, 13%, 0.45);
    --bg-panel-solid: hsl(224, 20%, 13%);
    --bg-card: hsla(224, 20%, 18%, 0.35);
    --bg-card-hover: hsla(224, 20%, 22%, 0.5);
    --border-glass: hsla(224, 20%, 90%, 0.07);
    --border-focus: hsla(245, 80%, 65%, 0.5);
    
    /* Accents & Signals */
    --color-primary: hsl(245, 82%, 67%); /* Neon Indigo */
    --color-primary-glow: hsla(245, 82%, 67%, 0.3);
    --color-emerald: hsl(150, 84%, 48%); /* Emerald Green */
    --color-emerald-glow: hsla(150, 84%, 48%, 0.25);
    --color-violet: hsl(265, 85%, 66%); /* Radiant Violet */
    --color-danger: hsl(355, 84%, 60%); /* Ruby Red */
    --color-warning: hsl(38, 92%, 52%); /* Amber Yellow */
    --color-success: hsl(142, 70%, 45%); /* Success Mint */
    
    /* Typography & Text */
    --text-pure: hsl(0, 0%, 100%);
    --text-bright: hsl(210, 40%, 98%);
    --text-regular: hsl(215, 20%, 82%);
    --text-muted: hsl(218, 16%, 60%);
    
    /* Transitions & Shadows */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow-emerald: 0 0 20px hsla(150, 84%, 48%, 0.2);
    --shadow-glow-primary: 0 0 20px hsla(245, 82%, 67%, 0.2);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

/* ==========================================================================
   CSS BASE & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-glow) transparent;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-regular);
    overflow-hidden: hidden;
    min-height: 100vh;
    display: flex;
    background-image: 
        radial-gradient(at 10% 10%, hsla(245, 82%, 67%, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 85%, hsla(150, 84%, 48%, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 50%, hsla(265, 85%, 66%, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar for Webkit browsers */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsla(224, 20%, 40%, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

input, textarea, select, button {
    font-family: inherit;
    color: inherit;
}

/* ==========================================================================
   APP LAYOUT CONTAINER
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR NAVIGATION SYSTEM
   ========================================================================== */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 4px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-bright);
    box-shadow: var(--shadow-glow-primary);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

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

/* Navigation items */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    width: 100%;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: var(--transition-smooth);
}

.nav-item i {
    font-size: 18px;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--text-bright);
    background-color: var(--bg-card);
}

.nav-item.active {
    color: var(--text-bright);
    background: linear-gradient(90deg, var(--bg-panel-solid), var(--bg-card));
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-item.active i {
    color: var(--color-primary);
    transform: scale(1.15);
}

/* Student Quick Info widget */
.student-quick-info {
    margin-top: auto;
    margin-bottom: 24px;
    background: linear-gradient(135deg, hsla(245, 82%, 67%, 0.05), hsla(150, 84%, 48%, 0.03));
}

.student-quick-info h3 {
    font-size: 12px;
    color: var(--text-bright);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.student-quick-info h3 i {
    color: var(--color-primary);
}

.student-quick-info .info-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.student-quick-info .info-group:last-child {
    margin-bottom: 0;
}

.student-quick-info .info-group label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.student-quick-info .info-group span {
    font-size: 13px;
    color: var(--text-regular);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer .version {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 700;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Header Bar */
.top-header {
    height: 80px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: rgba(10, 11, 16, 0.5);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.header-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2px;
}

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

/* Live indicators */
.theme-status {
    display: flex;
    align-items: center;
}

.status-badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-emerald);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Content Wrapper */
.content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px 40px;
}

/* ==========================================================================
   GLASSMORPHISM & PREMIUM UI PANELS
   ========================================================================== */
.glass-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    transition: transform var(--transition-smooth), border var(--transition-fast), box-shadow var(--transition-smooth);
}

@media (max-width: 768px) {
    .glass-panel {
        width: 100%;
        height: 100dvh;      /* Menggunakan 'dvh' agar ukuran pas tanpa terpotong address bar browser HP */
        border-radius: 0;    /* Opsional: Menghilangkan sudut membulat agar menempel rata di tepi layar */
        border: none;        /* Opsional: Menghilangkan border agar tidak ada garis di ujung layar */
        
        /* Jika panel ini bertindak sebagai overlay penuh, tambahkan posisi: */
        /* position: fixed; */
        /* top: 0; */
        /* left: 0; */
        /* z-index: 999; */
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition-smooth);
}

.card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Tab panes handling */
.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   FORM CONTROLS & IDENTITY PANEL
   ========================================================================== */
.student-form-panel {
    margin-bottom: 24px;
    background: linear-gradient(135deg, hsla(245, 82%, 67%, 0.04) 0%, hsla(224, 20%, 13%, 0.45) 100%);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.panel-header i {
    font-size: 20px;
    color: var(--color-primary);
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group label .required {
    color: var(--color-danger);
}

input[type="text"], textarea, select {
    background-color: rgba(10, 11, 16, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-fast);
}

input[type="text"]:focus, textarea:focus, select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    background-color: rgba(10, 11, 16, 0.6);
}

textarea {
    resize: none;
}

/* ==========================================================================
   TAB 1: SCORING PAGE LAYOUT
   ========================================================================== */
.scoring-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

/* Examiner selection menu */
.examiner-selector-container {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.examiner-tabs {
    display: flex;
    gap: 8px;
}

.examiner-tab {
    flex-grow: 1;
    border: 1px solid var(--border-glass);
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.examiner-tab .ex-num {
    width: 22px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.examiner-tab .ex-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.examiner-tab:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.examiner-tab.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
    border-color: transparent;
    box-shadow: var(--shadow-glow-primary);
}

.examiner-tab.active .ex-num {
    background-color: var(--text-bright);
    color: var(--color-primary);
}

.examiner-tab.active .ex-label {
    color: var(--text-bright);
}

/* Scoring cards list grid */
.components-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.component-card {
    position: relative;
    border-left: 4px solid rgba(255, 255, 255, 0.1);
    transition: border-left var(--transition-smooth), transform var(--transition-smooth);
}

/* Border shifts dynamically when scored or hovered */
.component-card:hover {
    transform: translateX(4px);
    border-color: var(--color-primary);
}

.component-card.filled {
    border-left-color: var(--color-emerald);
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.comp-title-group {
    display: flex;
    gap: 14px;
    align-items: center;
}

.comp-icon {
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-bright);
}

.comp-title-group h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2px;
}

.comp-title-group p {
    font-size: 11px;
    color: var(--text-muted);
}

.comp-weight {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.weight-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.weight-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Component inputs sync styling */
.comp-control {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 20px;
    align-items: center;
    margin-bottom: 14px;
}

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

.slider-wrapper .min-limit, .slider-wrapper .max-limit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    width: 10px;
}

/* Custom premium slider range */
.score-slider {
    -webkit-appearance: none;
    appearance: none;
    flex-grow: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.score-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
}

/* Slider Webkit Thumb */
.score-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--text-bright) 0%, #cbd5e1 100%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5), 0 0 0 3px var(--color-primary);
    margin-top: -6px;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.score-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--text-pure);
    box-shadow: 0 0 12px rgba(0,0,0,0.6), 0 0 0 4px var(--color-primary);
}

/* Slider Mozilla Firefox Thumb */
.score-slider::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border: none;
    border-radius: 50%;
    background: var(--text-bright);
    box-shadow: 0 0 10px rgba(0,0,0,0.5), 0 0 0 3px var(--color-primary);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.score-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(0,0,0,0.6), 0 0 0 4px var(--color-primary);
}

/* Number input styling */
.number-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(10, 11, 16, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0 12px;
}

.score-num-input {
    width: 60px;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    outline: none;
    text-align: right;
    -moz-appearance: textfield; /* Remove spinner firefox */
}

/* Remove spinner chrome */
.score-num-input::-webkit-outer-spin-button,
.score-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-limit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 6px;
}

.number-input-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    background-color: rgba(10, 11, 16, 0.6);
}

/* Qualitative rating feedback indicators */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator .status-bar {
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255,255,255,0.06);
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.status-indicator .status-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: inherit; /* bound to element width set via JS */
    background: linear-gradient(90deg, var(--color-danger), var(--color-warning), var(--color-emerald));
    background-size: 200px 100%;
    transition: width var(--transition-smooth);
}

.status-text {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    width: 90px;
    text-align: right;
}

/* Status colors */
.status-text.bad { color: var(--color-danger); }
.status-text.ok { color: var(--color-warning); }
.status-text.good { color: var(--color-emerald); }

/* Sticky Summary Card on the Right */
.stick-on-scroll {
    position: sticky;
    top: 24px;
}

.summary-card {
    display: flex;
    flex-direction: column;
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.summary-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
}

.active-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    background-color: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Big Radial Score Gauge */
.big-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.score-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.radial-gauge-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.score-circle-outer {
    position: relative;
    width: 100%;
    height: 100%;
}

.score-circle-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 8;
}

.score-circle-progress {
    fill: none;
    stroke: url(#emerald-grad); /* Dynamic color mapping or standard gradient fallback */
    stroke: var(--color-emerald);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.6s ease;
}

.score-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-big-val {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
}

.score-max-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Score breakdown formula */
.score-breakdown {
    background-color: rgba(10, 11, 16, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 24px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 6px;
}

.breakdown-row:last-child {
    margin-bottom: 0;
}

.breakdown-row.title {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.breakdown-formula {
    font-family: monospace;
    font-size: 10px;
    color: var(--color-primary);
    text-align: center;
    padding: 6px;
    background-color: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.status-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.status-tag.empty {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-tag.filled {
    background-color: var(--color-emerald-glow);
    color: var(--color-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* BUTTONS PRESET */
.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
    color: var(--text-bright);
    box-shadow: var(--shadow-glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-bright);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

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

/* ==========================================================================
   TAB 2: RECAPITULATION & DASHBOARD
   ========================================================================== */
.student-info-banner {
    margin-bottom: 24px;
    background: linear-gradient(135deg, hsla(245, 82%, 67%, 0.05), hsla(150, 84%, 48%, 0.05));
    border-left: 4px solid var(--color-primary);
}

.student-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.student-info-banner h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.recap-student-desc {
    font-size: 13px;
    color: var(--text-regular);
}

.recap-student-desc span {
    font-weight: 600;
}

/* Recap Dashboard Stat Widgets */
.recap-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-bright);
    flex-shrink: 0;
}

.stat-icon.purple {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.stat-icon.emerald {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-icon.glow-effect {
    background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
    color: var(--text-bright);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.stat-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.stat-number-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.1;
}

.stat-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Glowing stats for high letter grades */
.stat-box.main-score {
    background: linear-gradient(135deg, hsla(150, 84%, 48%, 0.05) 0%, rgba(10,11,16,0.3) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-box.grade-result {
    background: linear-gradient(135deg, hsla(245, 82%, 67%, 0.06) 0%, rgba(10,11,16,0.3) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.glow-text {
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
    color: var(--text-bright);
    font-size: 32px;
}

/* Premium Data Table */
.table-panel {
    background-color: var(--bg-panel);
}

.table-header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    gap: 10px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

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

.premium-table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-bright);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-glass);
}

.premium-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-regular);
}

.premium-table tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}

.premium-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.col-highlight {
    font-weight: 700;
    color: var(--color-emerald) !important;
}

/* Filled / Unfilled indicators in table */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
}

.status-pill.empty {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-pill.filled {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Action button inside table */
.btn-table-action {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.btn-table-action:hover {
    text-decoration: underline;
    color: var(--color-violet);
}

/* ==========================================================================
   TAB 3: STANDAR SETTINGS PAGE
   ========================================================================== */
.settings-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.settings-desc-panel {
    display: flex;
    flex-direction: column;
}

.settings-intro {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.presets-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.presets-section p {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-buttons button {
    text-align: left;
    justify-content: flex-start;
    font-size: 12px;
    padding: 10px 14px;
}

.alert-box {
    margin-top: auto;
    padding: 14px;
    border-radius: var(--radius-md);
    display: flex;
    gap: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.alert-box.success {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-emerald);
}

.alert-box.danger {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Range configuration editor table */
.settings-editor-panel {
    display: flex;
    flex-direction: column;
}

.rules-editor-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background-color: rgba(0,0,0,0.15);
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.settings-table th {
    background-color: rgba(0, 0, 0, 0.25);
    color: var(--text-bright);
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
}

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

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

/* Small inputs in table */
.grade-input-short {
    width: 60px;
    font-weight: 700;
    text-align: center;
    background-color: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 6px;
}

.grade-input-num {
    width: 80px;
    font-weight: 700;
    text-align: right;
    background-color: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.grade-input-text {
    width: 100%;
    background-color: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}

.grade-input-short:focus, .grade-input-num:focus, .grade-input-text:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Status colors select dropdown in rules */
.grade-select-status {
    background-color: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.grade-select-status:focus {
    border-color: var(--color-primary);
    outline: none;
}

.settings-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Delete button inside config rules */
.btn-delete-rule {
    width: 28px;
    height: 28px;
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-sm);
    color: var(--color-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-delete-rule:hover {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: var(--color-danger);
}

/* ==========================================================================
   NOTIFICATION SYSTEM (TOAST)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: var(--bg-panel-solid);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: var(--text-bright);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    transform: translateX(120%);
    transition: transform var(--transition-smooth);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--color-success);
}
.toast.success i {
    color: var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}
.toast.error i {
    color: var(--color-danger);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}
.toast.warning i {
    color: var(--color-warning);
}

.toast-body {
    flex-grow: 1;
}

.toast-body strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.toast-body span {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS (MOBILE/TABLET)
   ========================================================================== */
@media (max-width: 1200px) {
    .scoring-layout {
        grid-template-columns: 1fr;
    }
    
    .stick-on-scroll {
        position: static;
    }
}

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        padding: 16px 24px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-area {
        margin-bottom: 0;
    }
    
    .nav-menu {
        flex-direction: row;
        margin-left: 20px;
        gap: 4px;
    }
    
    .nav-item {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .student-quick-info {
        display: none;
    }
    
    .main-content {
        height: calc(100vh - 80px);
    }
    
    .recap-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .nav-menu {
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    
    .top-header {
        padding: 0 20px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .comp-control {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .number-input-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    
    .score-num-input {
        width: 100%;
    }
}

/* ==========================================================================
   BERITA ACARA PREVIEW MODAL STYLING
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 7, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

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

.modal-card {
    background-color: var(--bg-panel-solid);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transform: translateY(30px);
    transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    height: 70px;
    border-bottom: 1px solid var(--border-glass);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--color-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}

.modal-body-wrapper {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar settings inside modal */
.print-settings {
    width: 320px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--border-glass);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    flex-shrink: 0;
    background-color: rgba(10, 11, 16, 0.2);
}

.print-settings h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-settings h4 i {
    color: var(--color-primary);
}

.modal-actions-sidebar {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

/* Paper Preview Area on the Right */
.paper-preview-container {
    flex-grow: 1;
    background-color: hsl(224, 20%, 9%);
    overflow-y: auto;
    padding: 30px;
    display: flex;
    justify-content: center;
}

/* Standard A4 Paper Style Mockup */
.paper {
    width: 210mm;
    min-height: 297mm;
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 25mm 20mm;
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-sizing: border-box;
}

/* Document Kop Surat (Header) */
.doc-kop {
    text-align: center;
    margin-bottom: 20px;
}

.doc-kop h4 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.doc-kop h5 {
    font-size: 13px;
    font-weight: 700;
    margin: 2px 0 0 0;
    letter-spacing: 0.5px;
}

.doc-address {
    font-size: 10px;
    margin: 4px 0 0 0;
    font-style: italic;
}

.doc-double-line {
    border: none;
    border-top: 2px solid #000000;
    border-bottom: 0.5px solid #000000;
    height: 4px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.doc-title {
    text-align: center;
    margin-bottom: 30px;
}

.doc-title h3 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    text-decoration: underline;
    letter-spacing: 0.5px;
}

.doc-title h3 + h3 {
    text-decoration: none;
    margin-top: 4px;
}

.doc-intro {
    margin-bottom: 16px;
    text-align: justify;
}

/* Student detail table on paper */
.doc-student-table {
    width: 100%;
    margin-bottom: 24px;
    border-collapse: collapse;
}

.doc-student-table td {
    padding: 4px 0;
    vertical-align: top;
}

.doc-table-intro {
    margin-bottom: 12px;
}

/* Score recap table on paper */
.doc-score-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.doc-score-table th, .doc-score-table td {
    border: 1px solid #000000;
    padding: 8px 12px;
    text-align: left;
}

.doc-score-table th {
    background-color: #f2f2f2;
    font-weight: 700;
    text-align: center;
}

.doc-score-table tbody td:first-child,
.doc-score-table tbody td:nth-child(3),
.doc-score-table tbody td:nth-child(4) {
    text-align: center;
}

/* Summary table */
.doc-summary-table {
    width: 100%;
    margin-bottom: 35px;
    border-collapse: collapse;
}

.doc-summary-table td {
    padding: 6px 0;
}

.doc-status-badge {
    border: 1px solid #000000;
    padding: 2px 10px;
    font-weight: 700;
    display: inline-block;
    border-radius: 4px;
}

/* Document signatures layout */
.doc-signatures {
    margin-top: 40px;
}

.sig-row {
    display: flex;
    justify-content: space-between;
}

.sig-col {
    width: 45%;
    display: flex;
    flex-direction: column;
}

.sig-col:last-child {
    align-items: flex-start;
    padding-left: 30px;
}

.sig-space {
    height: 75px;
}

/* ==========================================================================
   PRINT MEDIA STYLE OVERRIDES
   ========================================================================== */
#printable-berita-acara {
    display: none;
}

@media print {
    /* Hide everything on screen */
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .app-container, 
    .modal-overlay, 
    .toast-container,
    header,
    aside {
        display: none !important;
    }
    
    /* Show print section only */
    #printable-berita-acara {
        display: block !important;
        width: 100% !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Times New Roman', Times, serif !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #printable-berita-acara .paper {
        box-shadow: none !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    #printable-berita-acara * {
        background: transparent !important;
        color: #000000 !important;
        border-color: #000000 !important;
    }
    
    /* Prevent page break inside table rows or signature blocks */
    tr, .doc-signatures {
        page-break-inside: avoid;
    }
}

