:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card */
.card {
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    width: 100%;
}

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

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: none;
}

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

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

/* Navbar */
.navbar {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    opacity: 0.9;
}

.nav-links a:hover {
    opacity: 1;
}

/* Evaluate Layout */
.evaluate-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar-nav {
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 2rem;
}

.school-select-wrapper {
    margin-bottom: 1.5rem;
}

.section-list {
    list-style: none;
}

.section-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-muted);
}

.section-item:hover {
    background: var(--bg);
    color: var(--text);
}

.section-item.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.section-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent !important;
    color: var(--text-muted) !important;
}

/* Rubric */
.rubric-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rubric-level {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.rubric-level:hover:not(.disabled) {
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.rubric-level.selected {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
    border-width: 2px;
}

.level-badge {
    background: var(--bg);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: bold;
    color: var(--text-muted);
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.rubric-level.selected .level-badge {
    background: var(--primary);
    color: white;
}

.level-desc {
    flex-grow: 1;
    white-space: pre-line;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background-color: var(--bg);
    font-weight: 600;
}

.score-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: bold;
}
.score-5 { background: #d1fae5; color: #065f46; }
.score-4 { background: #e0e7ff; color: #3730a3; }
.score-3 { background: #fef3c7; color: #92400e; }
.score-2 { background: #ffedd5; color: #9a3412; }
.score-1 { background: #fee2e2; color: #991b1b; }
.score-null { background: #f3f4f6; color: #9ca3af; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

 . b t n - l o g o u t   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
         p a d d i n g :   0 . 5 r e m   1 r e m ; 
         b o r d e r - r a d i u s :   4 p x ; 
 } 
 . b t n - l o g o u t : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 } 
 
 / *   M o b i l e   R e s p o n s i v e n e s s   * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . c o n t a i n e r   { 
                 p a d d i n g :   1 r e m ; 
         } 
         . n a v b a r   . c o n t a i n e r   { 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
                 g a p :   1 r e m ; 
         } 
         . n a v - l i n k s   { 
                 d i s p l a y :   f l e x ; 
                 f l e x - w r a p :   w r a p ; 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
                 g a p :   0 . 5 r e m ; 
         } 
         . n a v - l i n k s   a   { 
                 m a r g i n - l e f t :   0 ; 
         } 
         . u s e r - n a m e - l a b e l   { 
                 w i d t h :   1 0 0 % ; 
                 t e x t - a l i g n :   c e n t e r ; 
                 m a r g i n - b o t t o m :   0 . 5 r e m ; 
         } 
         . e v a l u a t e - l a y o u t   { 
                 g r i d - t e m p l a t e - c o l u m n s :   1 f r ; 
         } 
         . s i d e b a r - n a v   { 
                 p o s i t i o n :   s t a t i c ; 
                 m a r g i n - b o t t o m :   1 r e m ; 
         } 
         . r u b r i c - l e v e l   { 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
         } 
         . l e v e l - b a d g e   { 
                 m a r g i n - r i g h t :   0 ; 
                 m a r g i n - b o t t o m :   0 . 5 r e m ; 
         } 
 } 
  
 