/* CSS Document for SKRU Internship Management System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   Design Tokens & Variables
   ========================================== */
:root {
    --font-primary: 'Sarabun', 'Inter', sans-serif;
    
    /* HSL Colors - Light Mode Default */
    --hue-primary: 220; /* Deep Royal Blue */
    --hue-accent: 38;   /* Warm Gold */
    
    --primary: hsl(var(--hue-primary), 85%, 45%);
    --primary-hover: hsl(var(--hue-primary), 85%, 35%);
    --primary-light: hsl(var(--hue-primary), 85%, 95%);
    
    --accent: hsl(var(--hue-accent), 95%, 50%);
    --accent-hover: hsl(var(--hue-accent), 95%, 40%);
    
    --bg-main: hsl(220, 30%, 97%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-sidebar: hsl(var(--hue-primary), 70%, 15%);
    
    --text-main: hsl(220, 40%, 15%);
    --text-muted: hsl(220, 20%, 45%);
    --text-white: hsl(0, 0%, 100%);
    
    --border-color: hsl(220, 25%, 90%);
    --border-focus: hsl(var(--hue-primary), 85%, 65%);
    
    /* Status Colors */
    --status-pending-bg: hsl(45, 100%, 92%);
    --status-pending-text: hsl(35, 90%, 35%);
    --status-fix-bg: hsl(25, 100%, 93%);
    --status-fix-text: hsl(15, 90%, 40%);
    --status-approved-bg: hsl(140, 75%, 92%);
    --status-approved-text: hsl(140, 80%, 25%);
    --status-rejected-bg: hsl(0, 100%, 94%);
    --status-rejected-text: hsl(0, 80%, 35%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-sidebar: 4px 0 15px rgba(0, 0, 0, 0.15);
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition-speed: 0.3s;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-main: hsl(220, 25%, 10%);
    --bg-card: hsl(220, 25%, 14%);
    --bg-sidebar: hsl(220, 30%, 8%);
    --text-main: hsl(220, 20%, 90%);
    --text-muted: hsl(220, 15%, 65%);
    --border-color: hsl(220, 20%, 20%);
    
    --primary-light: hsl(var(--hue-primary), 50%, 15%);
    
    --status-pending-bg: hsl(45, 60%, 15%);
    --status-pending-text: hsl(45, 95%, 70%);
    --status-fix-bg: hsl(25, 65%, 17%);
    --status-fix-text: hsl(25, 95%, 70%);
    --status-approved-bg: hsl(140, 50%, 14%);
    --status-approved-text: hsl(140, 80%, 70%);
    --status-rejected-bg: hsl(0, 50%, 15%);
    --status-rejected-text: hsl(0, 90%, 75%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   CSS Resets & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   Layout Wrapper
   ========================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sidebar);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--primary-hover));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.menu-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin: 16px 0 8px 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
    background-color: var(--primary);
    border-left: 4px solid var(--accent);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background-color: rgba(0, 0, 0, 0.2);
}

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

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
}

/* Navbar */
.navbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.page-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

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

/* Role Switcher styling */
.role-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Content Body */
.content-body {
    padding: 32px;
    flex: 1;
}

/* ==========================================
   Common Components & UI Elements
   ========================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(var(--hue-primary), 85%, 45%, 0.2);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--text-muted);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.btn-danger {
    background-color: hsl(0, 85%, 60%);
    color: var(--text-white);
}

.btn-danger:hover {
    background-color: hsl(0, 85%, 50%);
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending-text);
}

.badge-fix {
    background-color: var(--status-fix-bg);
    color: var(--status-fix-text);
}

.badge-approved {
    background-color: var(--status-approved-bg);
    color: var(--status-approved-text);
}

.badge-rejected {
    background-color: var(--status-rejected-bg);
    color: var(--status-rejected-text);
}

/* ==========================================
   Steppers & Forms (Student view)
   ========================================== */
.stepper-container {
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 40px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 40px;
    right: 40px;
    height: 3px;
    background-color: var(--border-color);
    z-index: 1;
}

.stepper-progress {
    position: absolute;
    top: 25px;
    left: 40px;
    width: 0%;
    height: 3px;
    background-color: var(--primary);
    z-index: 2;
    transition: width 0.4s ease;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    width: 80px;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-node.active .step-circle {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--text-white);
    box-shadow: 0 0 0 5px var(--primary-light);
}

.step-node.completed .step-circle {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--text-white);
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.step-node.active .step-label, .step-node.completed .step-label {
    color: var(--text-main);
    font-weight: 700;
}

/* Wizard Form Cards */
.form-card {
    max-width: 800px;
    margin: 0 auto;
    display: none; /* Controlled by JS */
    animation: fadeIn 0.4s ease;
}

.form-card.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-label span.required {
    color: hsl(0, 85%, 60%);
}

.form-control {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Form controls selection and custom styles */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* File Upload drag-drop area */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    background-color: var(--bg-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-zone:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.file-upload-zone svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--text-muted);
}

.file-upload-text b {
    color: var(--primary);
}

.file-preview {
    margin-top: 15px;
    display: none;
    position: relative;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.file-preview img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.file-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: hsl(0, 85%, 60%);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

/* Dynamic rows (Student Members) */
.student-row {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    background-color: var(--bg-main);
    margin-bottom: 12px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.student-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 14px;
}

.remove-student-btn {
    background: none;
    border: none;
    color: hsl(0, 85%, 60%);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

/* Form Action Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   Dashboard Module (Admin view)
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-val {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-lbl {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(var(--hue-primary), 85%, 45%, 0.2);
}

.stat-icon-wrapper.blue { background: linear-gradient(135deg, hsl(210, 85%, 55%), hsl(220, 85%, 45%)); }
.stat-icon-wrapper.yellow { background: linear-gradient(135deg, hsl(45, 95%, 55%), hsl(35, 90%, 45%)); }
.stat-icon-wrapper.green { background: linear-gradient(135deg, hsl(140, 75%, 50%), hsl(140, 80%, 40%)); }
.stat-icon-wrapper.orange { background: linear-gradient(135deg, hsl(25, 95%, 55%), hsl(15, 90%, 45%)); }

/* Filter Container & Table */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    outline: none;
    font-size: 14px;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.filter-groups {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    outline: none;
    font-size: 14px;
    cursor: pointer;
}

/* Custom Data Table */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-card);
    font-size: 14px;
}

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

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.data-table tbody tr:hover {
    background-color: var(--primary-light);
}

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

/* Automation deadlines notifier inside dashboard */
.notification-banner {
    background-color: var(--primary-light);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-banner svg {
    color: var(--primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-content h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

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

/* ==========================================
   Details Slide-In Panel (Drawer)
   ========================================== */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    max-width: 100%;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 1001;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.active {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 18px;
    font-weight: 700;
}

.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.info-value {
    font-size: 14px;
    font-weight: 600;
}

.student-list-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    background-color: var(--bg-main);
}

.student-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.student-list-item:last-child {
    border-bottom: none;
}

.map-thumbnail {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* Review / Approval Form inside Panel */
.review-form {
    background-color: var(--primary-light);
    border: 1px solid var(--border-focus);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.review-row {
    margin-bottom: 16px;
}

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

/* ==========================================
   Letter and Response Tracking (Actions)
   ========================================== */
.action-box {
    display: flex;
    gap: 12px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 10px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 3px solid var(--primary);
    z-index: 2;
}

.timeline-icon.completed {
    background-color: var(--primary);
}

.timeline-icon.pending {
    border-color: var(--accent);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

/* Toasts styling */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-left-color: hsl(140, 75%, 50%); }
.toast-error { border-left-color: hsl(0, 85%, 60%); }
.toast-warning { border-left-color: hsl(38, 95%, 50%); }

/* Role indicator selector page (entry point) */
.entry-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, var(--primary-light), var(--bg-main));
    padding: 20px;
}

.entry-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 700px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.entry-logo {
    font-size: 54px;
    margin-bottom: 12px;
}

.entry-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.entry-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.role-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--bg-main);
}

.role-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-light);
}

.role-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.role-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.role-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================
   Responsive breakpoints
   ========================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    .sidebar .logo-text,
    .sidebar .menu-label,
    .sidebar .menu-item span,
    .sidebar .user-info {
        display: none;
    }
    .sidebar-header {
        justify-content: center;
        padding: 15px 0;
    }
    .sidebar-menu {
        padding: 16px 8px;
    }
    .menu-item {
        justify-content: center;
        padding: 12px;
    }
    .sidebar-footer {
        padding: 10px;
    }
    .user-profile {
        justify-content: center;
        padding: 6px;
    }
    .main-wrapper {
        margin-left: var(--sidebar-collapsed-width);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
    .role-cards {
        grid-template-columns: 1fr;
    }
    .drawer {
        width: 100%;
        right: -100%;
    }
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        max-width: 100%;
    }
    .filter-groups {
        flex-direction: column;
    }
}

/* Searchable Company Dropdown for Student Step 2 */
.company-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px 0;
}

.company-search-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.company-search-item:last-child {
    border-bottom: none;
}

.company-search-item:hover, .company-search-item.highlighted {
    background-color: #f0fdf4;
}

.company-search-item-main {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-search-item-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.company-search-province-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}

.company-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

