/* =============================================
   EduManage Pro — Main Stylesheet
   ============================================= */
:root {
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-light: #eff6ff;
    --secondary:     #10b981;
    --accent:        #f59e0b;
    --danger:        #ef4444;
    --dark:          #1e293b;
    --dark-2:        #334155;
    --gray:          #64748b;
    --gray-light:    #f1f5f9;
    --white:         #ffffff;
    --border:        #e2e8f0;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow:        0 4px 6px -1px rgba(0,0,0,.1);
    --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.1);
    --shadow-xl:     0 20px 25px -5px rgba(0,0,0,.1);
    --radius:        12px;
    --radius-sm:     8px;
    --sidebar-w:     260px;
    --topbar-h:      64px;
    --transition:    all .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-light);
    color: var(--dark);
    font-size: 14px;
    line-height: 1.6;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* =============================================
   AUTH
   ============================================= */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    animation: slideUp .35s ease;
}

.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 26px; color: #fff; margin-bottom: 10px;
}
.auth-logo h1 { font-size: 20px; font-weight: 700; }
.auth-logo p  { color: var(--gray); font-size: 13px; }
.auth-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-subtitle { color: var(--gray); font-size: 13px; margin-bottom: 20px; }
.auth-divider  { border-top: 1px solid var(--border); margin: 16px 0; }
.demo-box {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px; color: var(--gray); line-height: 1.9;
}

/* =============================================
   FORMS
   ============================================= */
.form-label { font-weight: 500; font-size: 13px; color: var(--dark-2); margin-bottom: 5px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 13px; font-size: 14px;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    outline: none;
}
.input-group-text {
    background: var(--gray-light);
    border: 1.5px solid var(--border);
    color: var(--gray);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500; font-size: 14px;
    padding: 9px 18px;
    transition: var(--transition);
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #1e40af); transform: translateY(-1px); color: #fff; }
.btn-success { background: linear-gradient(135deg, var(--secondary), #059669); color: #fff; }
.btn-success:hover { transform: translateY(-1px); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-danger:hover  { transform: translateY(-1px); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-warning:hover { transform: translateY(-1px); color: #fff; }
.btn-outline-primary  { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover  { background: var(--primary); color: #fff; }
.btn-outline-secondary { border: 1.5px solid var(--border); color: var(--gray); background: transparent; }
.btn-outline-secondary:hover { background: var(--gray-light); color: var(--dark); }
.btn-outline-warning { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline-warning:hover { background: var(--accent); color: #fff; }
.btn-outline-success { border: 1.5px solid var(--secondary); color: var(--secondary); background: transparent; }
.btn-outline-success:hover { background: var(--secondary); color: #fff; }
.btn-outline-danger { border: 1.5px solid var(--danger); color: var(--danger); background: transparent; }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 12px 26px; font-size: 15px; }

/* =============================================
   ADMIN / STUDENT LAYOUT
   ============================================= */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--dark);
    position: fixed; top: 0; left: 0;
    height: 100vh; overflow-y: auto;
    z-index: 1000;
    transition: transform .3s ease;
    display: flex; flex-direction: column;
}
.sidebar-brand {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.sidebar-brand .brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
}
.brand-name { color: #fff; font-size: 14px; font-weight: 700; display: block; }
.brand-sub  { color: rgba(255,255,255,.4); font-size: 11px; }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-label {
    color: rgba(255,255,255,.3); font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; padding: 10px 8px 4px;
}
.sidebar-nav .nav-link {
    color: rgba(255,255,255,.65);
    padding: 9px 12px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 10px;
    font-size: 13.5px; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px; text-decoration: none;
}
.sidebar-nav .nav-link i { width: 16px; text-align: center; font-size: 13px; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(37,99,235,.5), rgba(37,99,235,.25));
    color: #fff;
}
.sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.logout-link { color: #f87171 !important; }
.logout-link:hover { background: rgba(239,68,68,.15) !important; }

.topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle {
    background: none; border: none; font-size: 18px; color: var(--gray);
    cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm);
    transition: var(--transition); line-height: 1;
}
.sidebar-toggle:hover { background: var(--gray-light); color: var(--dark); }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--dark); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 14px;
    border: none; cursor: pointer;
}
.main-wrapper {
    margin-left: var(--sidebar-w); flex: 1;
    display: flex; flex-direction: column; min-height: 100vh;
    transition: margin .3s ease;
}
.main-content { padding: 24px; flex: 1; }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    background: transparent; border-bottom: 1px solid var(--border);
    padding: 14px 18px; font-weight: 600; font-size: 14px;
}
.card-body   { padding: 18px; }
.card-footer { padding: 12px 18px; background: transparent; border-top: 1px solid var(--border); }

/* Stat Cards */
.stat-card {
    background: var(--white); border-radius: var(--radius);
    padding: 20px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 46px; height: 46px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 12px;
}
.stat-icon.blue  { background: rgba(37,99,235,.1);  color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,.1); color: var(--secondary); }
.stat-icon.amber { background: rgba(245,158,11,.1); color: var(--accent); }
.stat-icon.red   { background: rgba(239,68,68,.1);  color: var(--danger); }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-label { color: var(--gray); font-size: 13px; margin-top: 4px; }

/* =============================================
   TABLES
   ============================================= */
.table thead th {
    background: var(--gray-light); border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 11px; text-transform: uppercase;
    letter-spacing: .5px; color: var(--gray); padding: 11px 14px; white-space: nowrap;
}
.table tbody td {
    padding: 11px 14px; border-bottom: 1px solid var(--border);
    vertical-align: middle; font-size: 13.5px;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: var(--primary-light, #eff6ff); }

/* =============================================
   WELCOME BANNER
   ============================================= */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    border-radius: 14px; padding: 22px 26px; color: #fff;
    display: flex; align-items: center; justify-content: space-between; overflow: hidden;
}
.welcome-banner h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.welcome-banner p  { font-size: 13px; opacity: .85; margin: 0; }
.welcome-icon { font-size: 56px; opacity: .15; }

/* =============================================
   AVATAR
   ============================================= */
.avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px; font-weight: 700;
}

/* =============================================
   PAYMENT STEPS
   ============================================= */
.payment-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.payment-step:last-child { border-bottom: none; }
.step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.bkash-number {
    font-size: 18px; font-weight: 700; color: var(--primary);
    letter-spacing: 1px;
}

/* =============================================
   ADMIT CARD
   ============================================= */
.admit-card-wrapper {
    max-width: 680px; margin: 0 auto;
    background: #fff; border: 2px solid var(--dark);
    border-radius: var(--radius); overflow: hidden;
}
.admit-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 18px 22px; text-align: center;
}
.admit-header h2 { font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.admit-header p  { font-size: 13px; opacity: .85; margin: 0; }
.admit-body   { padding: 22px; }
.admit-footer {
    background: var(--gray-light); padding: 12px 22px;
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--border); font-size: 12px; color: var(--gray);
}
.admit-field { margin-bottom: 10px; }
.admit-field label { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--gray); display: block; }
.admit-field span  { font-size: 14px; font-weight: 500; }
.admit-photo {
    width: 90px; height: 110px; border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-light); font-size: 32px; color: var(--gray);
}

/* =============================================
   MISC
   ============================================= */
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 700; }

.spinner-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,.7);
    display: none; align-items: center; justify-content: center; z-index: 9999;
}
.spinner-overlay.active { display: flex; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
}
@media (max-width: 575.98px) {
    .auth-card { padding: 24px 18px; }
    .main-content { padding: 14px; }
    .stat-value { font-size: 22px; }
    .topbar { padding: 0 14px; }
    .welcome-banner { padding: 16px 18px; }
    .welcome-icon { display: none; }
    .table thead th, .table tbody td { padding: 9px 10px; font-size: 12px; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-wrapper { margin-left: 0 !important; }
    body { background: #fff; }
    .admit-card-wrapper { border: 2px solid #000 !important; }
}
