/* ==========================================
   CHI Student Portal — Dedicated Stylesheet
   Brand: Community Health Institute
   ========================================== */

/* ── CSS Variables ──────────────────────────── */
:root {
    --chi-primary: #146912;
    --chi-secondary: #107D0A;
    --chi-dark: #0a3d09;
    --chi-danger: #AE0306;
    --chi-primary-light: rgba(20, 105, 18, 0.08);
    --chi-primary-lighter: rgba(20, 105, 18, 0.05);
    --chi-gold: #f59e0b;
    --chi-success: #22c55e;
    --gray-50: #f9fafb;
    --gray-100: #f4f6f9;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.1);

    /* Override Bootstrap blue → CHI green */
    --bs-primary: #146912;
    --bs-primary-rgb: 20, 105, 18;
    --bs-link-color: #146912;
    --bs-link-hover-color: #107D0A;
    --bs-info: #146912;
    --bs-info-rgb: 20, 105, 18;
}

/* ── Base ───────────────────────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-100);
    min-height: 100vh;
}

a {
    color: var(--chi-primary);
    transition: color 0.2s;
}
a:hover {
    color: var(--chi-secondary);
}

/* ══════════════════════════════════════════════
   SIDEBAR LAYOUT
   ══════════════════════════════════════════════ */

/* ── Shared sidebar styles (desktop + drawer) ── */
.sidebar-desktop,
.sidebar-drawer {
    width: 260px;
    background: #ffffff;
    color: var(--gray-700);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--gray-200);
}

/* ── Desktop: fixed on the left ─────────────── */
.sidebar-desktop {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

/* ── Mobile drawer (slide in) ───────────────── */
.sidebar-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-drawer.open {
    left: 0;
}

.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}
.drawer-overlay.open {
    display: block;
}

/* ── Brand / Logo ───────────────────────────── */
.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
}
.sidebar-brand-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.sidebar-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}
.sidebar-brand-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}
.sidebar-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}
.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

/* ── User Block ─────────────────────────────── */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
    background: var(--gray-50);
}
.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-email {
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

/* ── Nav Links ──────────────────────────────── */
.sidebar-nav {
    flex: 1;
    padding: 12px 12px 8px;
    overflow-y: auto;
}
.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    padding: 4px 10px 8px;
}
.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.18s;
    margin-bottom: 2px;
    position: relative;
}
.sidebar-nav-link:hover {
    background: var(--chi-primary-lighter);
    color: var(--chi-primary);
}
.sidebar-nav-link.active {
    background: var(--chi-primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20,105,18,0.35);
}
.sidebar-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.18s;
    color: var(--gray-500);
}
.sidebar-nav-link:hover .sidebar-nav-icon {
    background: #dcfce7;
    color: var(--chi-primary);
}
.sidebar-nav-link.active .sidebar-nav-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}
.sidebar-apply-link {
    color: var(--chi-primary) !important;
    font-weight: 600;
}
.sidebar-apply-link:hover {
    background: #dcfce7 !important;
    color: var(--chi-dark) !important;
}
.sidebar-apply-link .sidebar-nav-icon {
    background: #dcfce7;
    color: var(--chi-primary);
}

/* ── Footer / Logout ────────────────────────── */
.sidebar-footer {
    padding: 12px 12px 20px;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: var(--chi-danger);
    border: 1px solid #fecaca;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}
.sidebar-logout-btn:hover {
    background: #fee2e2;
    color: #991b1b;
}
.sidebar-logout-btn i {
    font-size: 0.9rem;
}

/* ── Portal Wrapper (content area) ─────────── */
.portal-wrapper {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
@media (min-width: 992px) {
    .portal-wrapper {
        margin-left: 260px;
    }
}

/* ── Mobile Top Header ──────────────────────── */
.mobile-header {
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    line-height: 1;
}
.hamburger-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* ── Portal Main Content ────────────────────── */
.portal-main {
    flex: 1;
    padding: 28px 28px 40px;
}

/* ── Profile Mini Card (shared across pages) ── */
.profile-mini-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.profile-mini-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chi-primary), var(--chi-secondary));
}
.avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    flex-shrink: 0;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}
@media (max-width: 991px) {
    .portal-main {
        padding: 20px 16px 90px;
    }
}

/* ── Mobile Bottom Navigation ───────────────── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 997;
    padding: 4px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--gray-200);
    display: flex;
}
.mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 6px 4px 4px;
    gap: 2px;
    transition: color 0.2s;
    position: relative;
}
.mobile-bottom-nav a i {
    font-size: 1.15rem;
    margin-bottom: 1px;
}
.mobile-bottom-nav a.active {
    color: var(--chi-primary);
}
.mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--chi-primary);
    border-radius: 0 0 4px 4px;
}
.mobile-bottom-nav a:hover {
    color: var(--chi-primary);
}

/* ── Dropdowns ────────────────────────────────── */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 10px;
}

/* ── Alerts ──────────────────────────────────── */
.alert {
    border-radius: 10px;
    border: none;
}

/* ── Buttons ─────────────────────────────────── */
.btn-chi {
    background: var(--chi-primary);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    transition: background 0.2s, transform 0.15s;
}
.btn-chi:hover {
    background: var(--chi-secondary);
    color: white;
    transform: translateY(-1px);
}

.btn-chi-outline {
    background: white;
    color: var(--chi-primary);
    border: 1.5px solid var(--gray-300);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-chi-outline:hover {
    border-color: var(--chi-primary);
    background: #f0fdf4;
    color: var(--chi-primary);
}

.btn-sm-chi {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

/* ── Download Letter Buttons ────────────────── */
.btn-download-letter {
    background: var(--chi-primary);
    color: white;
    padding: 7px 16px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.82rem;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-download-letter:hover {
    background: var(--chi-dark);
    color: white;
}

.btn-download-letter-lg {
    background: var(--chi-primary);
    color: white;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-download-letter-lg:hover {
    background: var(--chi-dark);
    color: white;
}

/* ── Status Badges ──────────────────────────── */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.pending,
.status-pending,
.status-payment_pending,
.status-draft {
    background: #fef3c7;
    color: #92400e;
}
.status-badge.approved,
.status-approved,
.status-admitted,
.status-paid {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.rejected,
.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}
.status-under_review {
    background: #e0e7ff;
    color: #3730a3;
}

/* ── Welcome Banner ─────────────────────────── */
.welcome-banner {
    background: linear-gradient(135deg, var(--chi-dark) 0%, var(--chi-primary) 40%, var(--chi-secondary) 100%);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Admission Ready Banner ─────────────────── */
.admission-ready-banner {
    background: linear-gradient(135deg, var(--chi-primary) 0%, var(--chi-secondary) 50%, var(--chi-primary) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: white;
    box-shadow: 0 4px 20px rgba(20, 105, 18, 0.25);
    margin-bottom: 28px;
    border-left: 5px solid #34d399;
}

/* ── Stat Cards ─────────────────────────────── */
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 22px 18px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 14px 0 0 14px;
}
.stat-card.primary-accent::after { background: var(--chi-primary); }
.stat-card.warning-accent::after { background: var(--chi-gold); }
.stat-card.success-accent::after { background: var(--chi-success); }
.stat-card.danger-accent::after  { background: var(--chi-danger); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.primary { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: var(--chi-primary); }
.stat-icon.warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.stat-icon.success { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.stat-icon.danger  { background: linear-gradient(135deg, #fee2e2, #fecaca); color: var(--chi-danger); }

/* ── Application Cards ──────────────────────── */
.application-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.application-header {
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.application-body {
    padding: 20px;
}

/* ── App Cards (compact list style) ─────────── */
.app-card {
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

.app-card-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.app-card-body {
    padding: 16px 20px;
}

.app-type-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}
.app-type-course   { background: #dcfce7; color: #065f46; }
.app-type-fellow   { background: #fef3c7; color: #92400e; }
.app-type-topup    { background: #dbeafe; color: #1e40af; }

/* ── Meta Row (applications list) ───────────── */
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}
.meta-item {
    font-size: 0.82rem;
}
.meta-label {
    color: var(--gray-400);
    font-size: 0.72rem;
}

/* ── Detail Cards (application show) ────────── */
.detail-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.detail-card .card-header {
    background: var(--gray-50);
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-card .card-header h5 {
    margin: 0;
    color: var(--chi-primary);
    font-weight: 600;
}

.detail-card .card-body {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: var(--gray-700);
}

/* ── Payment Summary Box ────────────────────── */
.payment-summary {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid var(--chi-primary);
    border-radius: var(--radius);
    padding: 25px;
}

/* ── Payment Table Card ─────────────────────── */
.payment-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.payment-card .table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border: none;
}

.payment-card .table td {
    vertical-align: middle;
    border-color: #f3f4f6;
}

/* ── Timeline ───────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--chi-primary);
}

.timeline-item.pending::before {
    background: var(--chi-gold);
}

.timeline-item.completed::before {
    background: var(--chi-success);
}

/* ══════════════════════════════════════════════
   PROFILE PAGE
   ══════════════════════════════════════════════ */

/* ── Profile Header Card ────────────────────── */
.profile-header-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chi-primary), var(--chi-secondary));
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Profile Stat Mini Cards ────────────────── */
.profile-stat-mini {
    text-align: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.profile-stat-mini:hover {
    background: var(--chi-primary-lighter);
}
.profile-stat-mini .stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--chi-primary);
}
.profile-stat-mini .stat-label-text {
    font-size: 0.72rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ── Profile Tabs ───────────────────────────── */
.profile-tabs {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-tabs .nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    padding: 0;
    background: var(--gray-50);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.profile-tabs .nav-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tabs .nav-tabs .nav-link {
    color: var(--gray-600);
    border: none;
    padding: 15px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s;
    background: transparent;
}

.profile-tabs .nav-tabs .nav-link:hover {
    color: var(--chi-primary);
    background: var(--chi-primary-lighter);
}

.profile-tabs .nav-tabs .nav-link.active {
    color: var(--chi-primary);
    border-bottom-color: var(--chi-primary);
    background: white;
}

.profile-tabs .tab-content {
    padding: 28px 24px;
}

/* ── Profile Form ───────────────────────────── */
.profile-form .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.profile-form .form-control {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: all 0.2s;
}

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

.profile-form .form-control:read-only {
    background: var(--gray-50);
    cursor: not-allowed;
}

/* ══════════════════════════════════════════════
   AUTH PAGES (Login / Register)
   ══════════════════════════════════════════════ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.auth-card-header {
    background: linear-gradient(135deg, var(--chi-primary), var(--chi-secondary));
    padding: 28px 30px;
    text-align: center;
    color: white;
}

.auth-card-header img {
    height: 44px;
    width: auto;
    margin-bottom: 10px;
}

.auth-card-header h4 {
    margin: 0;
    font-weight: 700;
}

.auth-card-body {
    padding: 30px;
}

.auth-card-body .form-control {
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: all 0.2s;
}

.auth-card-body .form-control:focus {
    border-color: var(--chi-primary);
    box-shadow: 0 0 0 3px var(--chi-primary-lighter);
}

.auth-card-body .input-group-text {
    background: var(--gray-50);
    border: 2px solid #e0e0e0;
    border-right: none;
    color: var(--gray-500);
}

.auth-card-body .input-group .form-control {
    border-left: none;
}

.auth-card-body .input-group .form-control:focus {
    border-left: none;
}

.auth-card-body .input-group:focus-within .input-group-text {
    border-color: var(--chi-primary);
}

.password-toggle {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-left: none;
    background: white;
    color: var(--gray-500);
    padding: 0 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.2s;
}
.input-group:focus-within .password-toggle {
    border-color: var(--chi-primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--gray-400);
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}
.auth-divider span {
    padding: 0 16px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS (consolidated)
   ══════════════════════════════════════════════ */

@media (max-width: 991px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    /* Welcome banner */
    .welcome-banner {
        padding: 20px 15px;
        border-radius: var(--radius);
        margin-bottom: 18px;
    }
    .welcome-banner h2 {
        font-size: 1.2rem;
    }
    .welcome-banner .col-md-4 {
        margin-top: 12px;
    }
    .welcome-banner .btn {
        width: 100%;
    }

    /* Admission banner */
    .admission-ready-banner {
        padding: 16px 15px;
        border-radius: var(--radius);
    }
    .admission-ready-banner .col-md-4 {
        margin-top: 12px;
    }
    .admission-ready-banner .btn-download-letter-lg,
    .admission-ready-banner .btn {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Stats: 2 per row */
    .stat-col {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
    .stat-card {
        padding: 14px 12px;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Application cards */
    .app-action-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px;
        margin-top: 6px;
    }

    .application-body {
        padding: 14px;
    }
    .application-header {
        padding: 14px;
    }

    /* App cards (list style) */
    .app-card-header {
        flex-direction: column;
        padding: 14px 16px;
    }
    .app-card-body {
        padding: 12px 16px;
    }
    .meta-row {
        gap: 12px;
    }
    .action-row {
        flex-direction: column;
        gap: 8px;
    }
    .btn-sm-chi {
        font-size: 0.78rem;
        padding: 6px 12px;
        width: 100%;
        justify-content: center;
    }

    /* Profile tabs */
    .profile-tabs .nav-tabs .nav-link {
        padding: 12px 16px;
        font-size: 0.82rem;
    }
    .profile-tabs .tab-content {
        padding: 20px 16px;
    }

    /* Payment receipt */
    .receipt-print-btn {
        display: none !important;
    }
}

/* ── Print Styles ───────────────────────────── */
@media print {
    body {
        background: white !important;
    }
    .sidebar-desktop,
    .sidebar-drawer,
    .drawer-overlay,
    .mobile-header,
    .mobile-bottom-nav,
    .hamburger-btn,
    .receipt-print-btn {
        display: none !important;
    }
    .portal-wrapper {
        margin-left: 0 !important;
    }
}
