/* ============================================================
   Student Portal Styles
   ============================================================ */

.portal-body {
    font-family: 'Inter', sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
    display: flex;
}

/* ── Sidebar ── */
.portal-sidebar {
    width: 260px;
    background: var(--blue-dark, #071a48);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo-icon {
    width: 38px; height: 38px;
    background: #d4a017;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.1rem; color: #0a2463;
}
.sidebar-logo-text .logo-name { color: #fff; font-size: 0.95rem; font-weight: 700; }
.sidebar-logo-text .logo-tag  { color: rgba(255,255,255,0.5); font-size: 0.68rem; }

.sidebar-nav { flex: 1; padding: 20px 12px; overflow-y: auto; }
.sidebar-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
    padding: 0 8px;
    margin: 20px 0 8px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    text-decoration: none;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.sidebar-link.active {
    background: rgba(212,160,23,0.15);
    color: #d4a017;
    font-weight: 600;
}
.sidebar-link .icon { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-link .badge {
    margin-left: auto;
    background: #d4a017;
    color: #0a2463;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a017, #0a2463);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.9rem;
}
.sidebar-user-name  { color: #fff; font-size: 0.85rem; font-weight: 600; }
.sidebar-user-role  { color: rgba(255,255,255,0.5); font-size: 0.72rem; }
.sidebar-logout { margin-left: auto; color: rgba(255,255,255,0.4); font-size: 1rem; transition: color 0.2s; text-decoration: none; }
.sidebar-logout:hover { color: #d4a017; }

/* ── Main Content ── */
.portal-main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.portal-topbar {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 8px rgba(10,36,99,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title h2 { font-size: 1.15rem; color: #0a2463; margin: 0; }
.topbar-title p  { font-size: 0.78rem; color: #6c757d; margin: 0; }
.topbar-actions  { display: flex; align-items: center; gap: 16px; }
.topbar-btn {
    width: 38px; height: 38px;
    background: #f0f4ff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    position: relative;
    text-decoration: none;
    color: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.topbar-btn:hover { background: #e0e8ff; }
.topbar-btn .notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
}

.portal-content { padding: 32px; flex: 1; }

/* ── Dashboard Cards ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(10,36,99,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    border: 1px solid #f0f4ff;
}
.stat-card:hover { box-shadow: 0 8px 24px rgba(10,36,99,0.1); transform: translateY(-2px); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(10,36,99,0.1);  }
.stat-icon.gold   { background: rgba(212,160,23,0.12); }
.stat-icon.green  { background: rgba(40,167,69,0.1);  }
.stat-icon.red    { background: rgba(220,53,69,0.1);  }
.stat-card h3 { font-size: 1.6rem; font-weight: 800; color: #0a2463; margin: 0; }
.stat-card p  { font-size: 0.78rem; color: #6c757d; margin: 2px 0 0; }

/* ── Application Progress ── */
.progress-stepper { display: flex; align-items: flex-start; position: relative; padding: 24px 0; }
.progress-stepper::before {
    content: '';
    position: absolute;
    top: 36px; left: 0; right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}
.stepper-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.stepper-circle {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.stepper-step.completed .stepper-circle { background: #28a745; border-color: #28a745; }
.stepper-step.active    .stepper-circle { background: #0a2463; border-color: #0a2463; box-shadow: 0 0 0 4px rgba(10,36,99,0.15); }
.stepper-step.completed .stepper-circle::after { content: '✓'; font-size: 1rem; color: #fff; font-weight: 700; }
.stepper-label { font-size: 0.75rem; font-weight: 600; color: #adb5bd; }
.stepper-step.completed .stepper-label { color: #28a745; }
.stepper-step.active    .stepper-label { color: #0a2463; }
.stepper-step.active .stepper-circle svg,
.stepper-step.active .stepper-circle .icon { color: #fff; }

/* ── Cards / Panels ── */
.panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(10,36,99,0.06);
    border: 1px solid #f0f4ff;
    overflow: hidden;
}
.panel-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f4ff;
    display: flex; align-items: center; justify-content: space-between;
}
.panel-header h3 { font-size: 0.95rem; color: #0a2463; margin: 0; }
.panel-body { padding: 24px; }

/* ── Documents ── */
.doc-checklist { list-style: none; padding: 0; }
.doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f4ff;
    font-size: 0.875rem;
}
.doc-item:last-child { border-bottom: none; }
.doc-status { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
.doc-status.done    { background: #d4edda; color: #155724; }
.doc-status.pending { background: #fff3cd; color: #856404; }
.doc-status.missing { background: #f8d7da; color: #721c24; }

/* ── Upload Zone ── */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #0a2463;
    background: rgba(10,36,99,0.03);
}
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.upload-zone h4 { color: #0a2463; margin-bottom: 6px; }
.upload-zone p  { font-size: 0.85rem; color: #6c757d; margin-bottom: 16px; }
.uploaded-files { margin-top: 24px; }
.uploaded-file {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: #f8f9ff;
    border-radius: 8px; margin-bottom: 8px; font-size: 0.85rem;
}
.uploaded-file .file-icon { font-size: 1.3rem; }
.uploaded-file .file-name { flex: 1; font-weight: 600; color: #0a2463; }
.uploaded-file .file-size { color: #adb5bd; font-size: 0.75rem; }
.uploaded-file .file-remove { color: #dc3545; cursor: pointer; margin-left: auto; transition: transform 0.2s; }
.uploaded-file .file-remove:hover { transform: scale(1.2); }
.file-progress { height: 4px; background: #e9ecef; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.file-progress-bar { height: 100%; background: #0a2463; border-radius: 2px; transition: width 0.4s; }

/* ── Messages ── */
.message-list { height: 400px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
}
.message-bubble.sent {
    align-self: flex-end;
    background: #0a2463;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.message-bubble.received {
    align-self: flex-start;
    background: #f0f4ff;
    color: #343a40;
    border-bottom-left-radius: 4px;
}
.message-time { font-size: 0.68rem; opacity: 0.7; margin-top: 4px; }
.message-input-bar {
    padding: 16px;
    border-top: 1px solid #f0f4ff;
    display: flex;
    gap: 10px;
    align-items: center;
}
.message-input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.message-input:focus { border-color: #0a2463; }

/* ── Notifications ── */
.notif-list { list-style: none; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f4ff;
    align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.notif-icon.info    { background: #cce5ff; }
.notif-icon.success { background: #d4edda; }
.notif-icon.warning { background: #fff3cd; }
.notif-body h5 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.notif-body p  { font-size: 0.78rem; color: #6c757d; margin: 0; }
.notif-time    { font-size: 0.72rem; color: #adb5bd; margin-left: auto; white-space: nowrap; }
.notif-item.unread .notif-body h5::before { content: '•'; color: #0a2463; margin-right: 4px; }

/* ── Auth Pages ── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-family: 'Inter', sans-serif;
}
.auth-visual {
    background: linear-gradient(135deg, #071a48, #0a2463);
    display: flex; align-items: center; justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212,160,23,0.1), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
.auth-visual-content { position: relative; z-index: 1; text-align: center; color: #fff; }
.auth-visual-icon { font-size: 4rem; margin-bottom: 24px; display: block; }
.auth-visual h2 { font-size: 1.8rem; margin-bottom: 12px; color: #fff; }
.auth-visual p  { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; }
.auth-features  { margin-top: 36px; text-align: left; }
.auth-feature   { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-feature .check { color: #d4a017; font-size: 1rem; }
.auth-feature p { color: rgba(255,255,255,0.8); font-size: 0.875rem; margin: 0; }

.auth-form-side {
    display: flex; align-items: center; justify-content: center;
    padding: 60px; background: #fff;
}
.auth-form-box { width: 100%; max-width: 420px; }
.auth-form-box h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-form-box .subtitle { color: #6c757d; font-size: 0.9rem; margin-bottom: 32px; }
.auth-link { color: #0a2463; font-weight: 600; }
.auth-divider { text-align: center; margin: 20px 0; font-size: 0.8rem; color: #adb5bd; position: relative; }
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: #dee2e6;
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Alerts ── */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }

/* ── Status badges ── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
}
.status-badge.applied,
.status-badge.pending      { background: #fff3cd; color: #856404; }
.status-badge.under-review { background: #cce5ff; color: #004085; }
.status-badge.offer-letter { background: #d4edda; color: #155724; }
.status-badge.visa-applied { background: #e2d9f3; color: #491c86; }
.status-badge.enrolled     { background: #d4edda; color: #155724; }
.status-badge.rejected     { background: #f8d7da; color: #721c24; }
.status-badge.approved     { background: #d4edda; color: #155724; }

/* ── Admin table (used in portal upload history) ── */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 16px; text-align: left; font-size: 0.78rem; color: #6c757d; font-weight: 600; background: #f8f9ff; border-bottom: 2px solid #f0f4ff; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f0f4ff; font-size: 0.86rem; vertical-align: middle; }
.admin-table tr:hover td { background: #fafbff; }
.admin-table tr:last-child td { border-bottom: none; }

/* ── Form helpers ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Responsive ── */
@media (max-width: 992px) {
    .portal-sidebar { transform: translateX(-260px); }
    .portal-sidebar.open { transform: translateX(0); }
    .portal-main  { margin-left: 0; }
    .stats-row    { grid-template-columns: 1fr 1fr; }
    .auth-page    { grid-template-columns: 1fr; }
    .auth-visual  { display: none; }
}

@media (max-width: 576px) {
    .portal-content { padding: 16px; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .progress-stepper { overflow-x: auto; }
}
