/* ═══════════════════════════════════════════════════════════
   STUDENT AREA STYLES
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #023a49;
    /* SEDA Dark Blue */
    --primary-dark: #012a36;
    --primary-light: #e6eef0;
    --accent: #ffcb05;
    /* SEDA Primary Yellow */
    --accent-light: #fff9db;
    --secondary: #e28e26;
    /* SEDA Secondary Yellow */
    --danger: #dc3545;
    --danger-light: #fce8e6;
    --warning: #ffc107;
    --warning-light: #fff8e1;
    --text: #212529;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Layout ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--primary);
    /* SEDA Dark Blue */
    color: white;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.sidebar-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.sidebar-logo h2 {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-logo span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    margin-bottom: 4px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav a .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

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

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.sidebar-footer .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    /* Yellow */
    color: var(--primary);
    /* Dark Text */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-footer .user-name {
    font-size: 13px;
    font-weight: 500;
}

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

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 1200px;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

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

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

/* ── Metrics Grid ── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
}

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

.metric-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.metric-card .change {
    font-size: 12px;
    margin-top: 4px;
}

.metric-card .change.positive {
    color: var(--accent);
}

.metric-card .change.negative {
    color: var(--danger);
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.new_application {
    background: var(--primary-light);
    color: var(--primary);
}

.status-badge.under_analysis {
    background: var(--warning-light);
    color: #e37400;
}

.status-badge.pending_documentation {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.approved {
    background: var(--accent-light);
    color: var(--accent);
}

.status-badge.denied {
    background: var(--danger-light);
    color: var(--danger);
}

.status-badge.contract_signed {
    background: #e8eaf6;
    color: #3f51b5;
}

.status-badge.payment_confirmed {
    background: #e0f2f1;
    color: #00695c;
}

.status-badge.PRE_APPROVED_UNDER_REVIEW {
    background: var(--accent-light);
    color: var(--accent);
}

.status-badge.UNDER_ANALYSIS {
    background: var(--warning-light);
    color: #e37400;
}

.status-badge.OUT_OF_PROFILE {
    background: var(--danger-light);
    color: var(--danger);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-1px);
}

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

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

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

.btn-danger:hover {
    background: #c62828;
}

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

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--surface);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ── Login Page ── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--primary);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-card .error-message {
    background: var(--danger-light);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

/* ── Upload Area ── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}

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

.upload-zone .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-zone p {
    color: var(--text-secondary);
    font-size: 14px;
}

.upload-zone .formats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ── Document List ── */
.doc-list {
    list-style: none;
}

.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.doc-item:hover {
    background: var(--bg);
}

.doc-item .doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-item .doc-icon {
    font-size: 24px;
}

.doc-item .doc-name {
    font-weight: 500;
    font-size: 14px;
}

.doc-item .doc-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Notification List ── */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

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

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.notification-text {
    font-size: 14px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Language Switcher ── */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
}

.lang-switcher button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.lang-switcher.light-theme button {
    color: var(--text-secondary);
}

.lang-switcher button.active {
    background: white;
    color: var(--text);
}

.lang-switcher.light-theme button.active {
    background: var(--primary);
    color: white;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

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

    .login-card {
        padding: 32px 24px;
    }
}

/* ── Loading & Skeletons ── */
.skeleton {
    animation: skeleton-loading 1.2s ease-in-out infinite;
    background-color: #eee;
    background-image: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    background: var(--surface);
    color: var(--text);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--primary);
    font-size: 14px;
    font-weight: 500;
}

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

.toast.success {
    border-left-color: var(--accent);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.info {
    border-left-color: var(--primary);
}

/* ── Progress Bar ── */
.upload-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
    display: none;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* ── Loading Spinner ── */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
}