:root {
    --omk-primary: #1e3a5f;
    --omk-secondary: #2d6a4f;
    --omk-accent: #4f46e5;
    --omk-sidebar-width: 260px;
    --omk-navbar-height: 62px;
    --sidebar-bg: linear-gradient(180deg, #1e3a5f 0%, #16304f 100%);
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f1f4f9; overflow-x: hidden; }

/* ── Navbar ── */
.omk-navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    height: var(--omk-navbar-height);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    z-index: 1050;
}
.brand-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    backdrop-filter: blur(10px);
}
.small-icon { width:30px;height:30px;border-radius:8px;font-size:14px; }
.brand-text { font-weight: 800; color: #fff; font-size: 18px; line-height: 1; }
.brand-sub  { font-size: 10px; color: rgba(255,255,255,0.6); display: block; letter-spacing: 2px; text-transform: uppercase; }
.btn-icon { background: transparent; border: none; padding: 8px; border-radius: 10px; transition: background .2s; }
.btn-icon:hover { background: rgba(255,255,255,0.1); }

/* ── Wrapper Layout ── */
.omk-wrapper {
    display: flex;
    margin-top: var(--omk-navbar-height);
    min-height: calc(100vh - var(--omk-navbar-height));
}

/* ── Sidebar ── */
.omk-sidebar {
    width: var(--omk-sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--omk-navbar-height);
    left: 0;
    height: calc(100vh - var(--omk-navbar-height));
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform .3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.omk-sidebar::-webkit-scrollbar { width: 4px; }
.omk-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.omk-offcanvas { background: var(--sidebar-bg); width: 260px !important; }

.sidebar-user-info {
    display: flex; align-items: center;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}
.user-avatar-sm {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-avatar-lg {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-avatar-xl {
    width: 80px; height: 80px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: #fff;
}

.sidebar-nav { padding: 8px 0; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13.5px; font-weight: 500;
    border-radius: 0;
    transition: all .2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-link.active { color: #fff; background: rgba(79,70,229,0.35); border-left-color: #818cf8; }
.sidebar-link i { font-size: 16px; flex-shrink: 0; }
.sidebar-sublink {
    display: block; padding: 7px 14px 7px 42px;
    color: rgba(255,255,255,0.55); font-size: 12.5px;
    text-decoration: none; transition: all .2s;
}
.sidebar-sublink:hover, .sidebar-sublink.active { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar-footer { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.08); }

/* ── Main Content ── */
.main-content {
    margin-left: var(--omk-sidebar-width);
    flex: 1;
    padding: 24px;
    min-width: 0;
    transition: margin .3s;
}
@media (max-width: 991px) { .main-content { margin-left: 0; padding: 16px; } }

/* ── Page Header ── */
.page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff; border-radius: 16px; padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(30,58,95,0.25);
}
.page-header h4 { margin: 0; font-weight: 700; font-size: 20px; }
.page-header p  { margin: 4px 0 0; opacity: 0.8; font-size: 13px; }

/* ── Cards ── */
.omk-card {
    background: #fff;
    border-radius: 14px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow .2s;
    overflow: hidden;
}
.omk-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.omk-card .card-header {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    font-weight: 600; font-size: 14px;
}

/* ── Stat Cards ── */
.stat-card {
    border-radius: 14px; padding: 20px;
    color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.stat-card .stat-icon { font-size: 40px; opacity: 0.3; position: absolute; right: 15px; bottom: 10px; }
.stat-card .stat-num { font-size: 32px; font-weight: 800; }
.stat-card .stat-label { font-size: 12px; opacity: 0.85; text-transform: uppercase; letter-spacing: 1px; }

/* ── Tables ── */
.omk-table { font-size: 13.5px; }
.omk-table thead th { background: #f8fafc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; border-bottom: 2px solid #e2e8f0; padding: 12px 16px; }
.omk-table tbody td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #f0f4f8; }
.omk-table tbody tr:hover { background: #f8fafc; }
.omk-table tbody tr:last-child td { border-bottom: none; }

/* ── Forms ── */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    padding: 10px 14px;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.input-group-text { border: 1.5px solid #e2e8f0; background: #f8fafc; border-radius: 10px 0 0 10px; }

/* ── Buttons ── */
.btn { border-radius: 10px; font-size: 13.5px; font-weight: 500; padding: 9px 18px; transition: all .2s; }
.btn-primary { background: #4f46e5; border-color: #4f46e5; }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; border-radius: 8px; display:inline-flex;align-items:center;justify-content:center; }

/* ── Badges ── */
.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

/* ── Notification Dropdown ── */
.notif-dropdown { width: 320px; max-height: 400px; overflow-y: auto; border-radius: 14px; border: none; }
.notif-header { background: #f8fafc; font-size: 13px; border-radius: 14px 14px 0 0; border-bottom: 1px solid #e2e8f0; }
.notif-item { border-bottom: 1px solid #f0f0f0; transition: background .2s; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0f4ff; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.smaller { font-size: 11px; }

/* ── Calendar ── */
.fc { font-family: 'Inter', sans-serif; font-size: 13px; }
.fc .fc-toolbar-title { font-size: 16px; font-weight: 700; }
.fc .fc-button { background: #4f46e5; border-color: #4f46e5; border-radius: 8px; font-size: 12px; }
.fc .fc-button:hover { background: #4338ca; border-color: #4338ca; }
.fc .fc-daygrid-day-number { font-size: 12px; }
.fc-event { border-radius: 6px; font-size: 11px; padding: 2px 4px; border: none; }

/* ── Course Card ── */
.course-card {
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none; color: inherit;
    display: block;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); text-decoration: none; color: inherit; }
.course-card-header { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: rgba(255,255,255,0.9); }
.course-card-body { background: #fff; padding: 16px; }

/* ── Login Page ── */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #4f46e5 100%); display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 100%; max-width: 440px; }
.login-logo { width: 64px; height: 64px; background: linear-gradient(135deg, #1e3a5f, #4f46e5); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; margin: 0 auto 20px; }
.role-btn { border: 2px solid #e2e8f0; border-radius: 12px; padding: 12px; cursor: pointer; transition: all .2s; text-align: center; background: #fff; }
.role-btn:hover, .role-btn.selected { border-color: #4f46e5; background: #f0f0ff; }
.role-btn i { font-size: 24px; display: block; margin-bottom: 4px; }
.role-btn span { font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* ── Alert ── */
.omk-alert { border-radius: 12px; border: none; font-size: 13.5px; padding: 12px 16px; }

/* ── Attendance Status ── */
.status-present { color: #10b981; }
.status-absent  { color: #ef4444; }
.status-late    { color: #f59e0b; }
.status-excused { color: #6366f1; }

/* ── Timeline / Posts ── */
.post-item { border-left: 3px solid #4f46e5; padding: 14px 16px; background: #fff; border-radius: 0 12px 12px 0; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.post-item.document { border-left-color: #f59e0b; }
.post-item.announcement { border-left-color: #10b981; }

/* ── Progress bars ── */
.omk-progress { height: 8px; border-radius: 10px; overflow: hidden; background: #e2e8f0; }
.omk-progress-bar { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #4f46e5, #818cf8); transition: width .6s; }

/* ── Responsive tweaks ── */
@media (max-width: 767px) {
    .stat-card .stat-num { font-size: 24px; }
    .page-header { padding: 16px 18px; }
    .login-card { padding: 24px 20px; }
    .omk-table { font-size: 12px; }
}

/* ── Scroll to top ── */
#scrollTop { position: fixed; bottom: 24px; right: 24px; width: 40px; height: 40px; border-radius: 50%; background: #4f46e5; color: #fff; border: none; font-size: 18px; cursor: pointer; opacity: 0; transition: opacity .3s; z-index: 999; display: flex; align-items: center; justify-content: center; }
#scrollTop.visible { opacity: 1; }
