:root {
    --ink: #0f1117;
    --ink-lt: #3d4152;
    --ink-muted: #8b90a0;
    --cream: #faf8f3;
    --cream-dk: #f0ece1;
    --gold: #c8a84b;
    --gold-pale: #fdf8e8;
    --teal: #1a6b5e;
    --rose: #c0392b;
    --sky: #1a4a7a;
    --sh: 0 2px 20px rgba(15, 17, 23, .08);
    --sh-lg: 0 8px 40px rgba(15, 17, 23, .14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 252px;
    background: var(--ink);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .3s
}

.sl {
    padding: 26px 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.sl h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2
}

.sl span {
    font-size: .65rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: .12em;
    text-transform: uppercase;
    display: block;
    margin-top: 3px
}

.sl-back {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: rgba(255, 255, 255, .4);
    font-size: .75rem;
    text-decoration: none;
    transition: color .15s
}

.sl-back:hover {
    color: var(--gold)
}

.sn {
    flex: 1;
    overflow-y: auto;
    padding: 14px 0
}

.ns {
    padding: 7px 22px 3px;
    font-size: .62rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .28);
    font-weight: 600
}

.ni {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 22px;
    cursor: pointer;
    transition: background .15s, color .15s;
    color: rgba(255, 255, 255, .55);
    font-size: .86rem;
    border-left: 3px solid transparent;
    user-select: none
}

.ni:hover {
    background: rgba(255, 255, 255, .05);
    color: #fff
}

.ni.active {
    background: rgba(200, 168, 75, .12);
    color: var(--gold);
    border-left-color: var(--gold)
}

.ni svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0
}

.sf {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.sa {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .78rem;
    color: rgba(255, 255, 255, .45)
}

.sav {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-weight: 700;
    font-size: .75rem;
    flex-shrink: 0
}

/* MAIN */
.main {
    margin-left: 252px;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.topbar {
    height: 62px;
    background: #fff;
    border-bottom: 1px solid rgba(15, 17, 23, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 50
}

.topbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px
}

.content {
    flex: 1;
    padding: 30px
}

.page {
    display: none
}

.page.active {
    display: block;
    animation: fadeIn .3s ease
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(7px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* DEMO BANNER */
.demo-banner {
    background: linear-gradient(135deg, var(--gold), #e8b84b);
    color: var(--ink);
    padding: 9px 24px;
    font-size: .78rem;
    font-weight: 500;
    text-align: center
}

/* STATS */
.sg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px
}

.sc {
    background: #fff;
    border-radius: 11px;
    padding: 22px;
    box-shadow: var(--sh);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: transform .2s, box-shadow .2s
}

.sc:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-lg)
}

.sc-lbl {
    font-size: .75rem;
    color: var(--ink-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em
}

.sc-val {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 5px
}

.sc-ico {
    width: 46px;
    height: 46px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem
}

.ic-g {
    background: var(--gold-pale)
}

.ic-t {
    background: #e6f4f1
}

.ic-s {
    background: #e6eef6
}

.ic-r {
    background: #fce8e6
}

/* SECTION HEADER */
.sh2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px
}

.sh2-t {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700
}

.sh2-sub {
    font-size: .83rem;
    color: var(--ink-muted);
    margin-top: 2px
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 17px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all .15s;
    font-family: 'DM Sans', sans-serif
}

.btn-p {
    background: var(--ink);
    color: #fff
}

.btn-p:hover {
    background: var(--ink-lt)
}

.btn-g {
    background: var(--gold);
    color: var(--ink)
}

.btn-g:hover {
    background: #b89a3d
}

.btn-o {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid rgba(15, 17, 23, .18)
}

.btn-o:hover {
    background: var(--cream-dk)
}

.btn-d {
    background: transparent;
    color: var(--rose);
    border: 1.5px solid rgba(192, 57, 43, .22)
}

.btn-d:hover {
    background: #fce8e6
}

.btn-sm {
    padding: 5px 11px;
    font-size: .77rem
}

/* CARDS */
.card {
    background: #fff;
    border-radius: 11px;
    box-shadow: var(--sh);
    overflow: hidden
}

.cb {
    padding: 22px
}

.ch {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(15, 17, 23, .06);
    font-weight: 600;
    font-size: .93rem
}

/* NOTICE GRID */
.ng {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px
}

.nc {
    background: #fff;
    border-radius: 11px;
    padding: 18px;
    box-shadow: var(--sh);
    border-left: 4px solid var(--gold);
    transition: transform .2s, box-shadow .2s;
    position: relative
}

.nc:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-lg)
}

.nc.exam {
    border-left-color: #e67e22
}

.nc.meeting {
    border-left-color: var(--teal)
}

.nc.finance {
    border-left-color: var(--rose)
}

.nc.event {
    border-left-color: var(--sky)
}

.ncat {
    display: inline-block;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
    margin-bottom: 6px
}

.ncat.exam {
    background: #fef3e2;
    color: #e67e22
}

.ncat.meeting {
    background: #e6f4f1;
    color: var(--teal)
}

.ncat.finance {
    background: #fce8e6;
    color: var(--rose)
}

.ncat.event {
    background: #e6eef6;
    color: var(--sky)
}

.ncat.general {
    background: var(--gold-pale);
    color: var(--gold)
}

.nt {
    font-weight: 600;
    font-size: .93rem;
    margin-bottom: 5px
}

.nb {
    font-size: .81rem;
    color: var(--ink-lt);
    line-height: 1.5
}

.nd {
    font-size: .72rem;
    color: var(--ink-muted);
    margin-top: 8px;
    font-family: 'DM Mono', monospace
}

.ndel {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: opacity .15s
}

.nc:hover .ndel {
    opacity: 1
}

/* EVENTS LIST */
.el {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.ei {
    background: #fff;
    border-radius: 11px;
    padding: 18px 22px;
    box-shadow: var(--sh);
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: transform .2s, box-shadow .2s
}

.ei:hover {
    transform: translateX(4px);
    box-shadow: var(--sh-lg)
}

.edb {
    min-width: 56px;
    text-align: center;
    background: var(--ink);
    border-radius: 9px;
    padding: 9px 7px;
    color: #fff
}

.edd {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: var(--gold)
}

.edm {
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: 2px;
    color: rgba(255, 255, 255, .55)
}

.einfo {
    flex: 1
}

.etitle {
    font-weight: 600;
    font-size: .97rem;
    margin-bottom: 3px
}

.emeta {
    font-size: .78rem;
    color: var(--ink-muted);
    display: flex;
    gap: 14px;
    flex-wrap: wrap
}

.edesc {
    font-size: .81rem;
    color: var(--ink-lt);
    line-height: 1.5;
    margin-top: 5px
}

.edel {
    opacity: 0;
    transition: opacity .15s;
    flex-shrink: 0
}

.ei:hover .edel {
    opacity: 1
}

/* GALLERY */
.gfilters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.fc {
    padding: 5px 14px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid rgba(15, 17, 23, .13);
    background: transparent;
    color: var(--ink-lt);
    transition: all .15s;
    font-family: 'DM Sans', sans-serif
}

.fc:hover {
    border-color: var(--ink);
    color: var(--ink)
}

.fc.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink)
}

.gg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px
}

.gi {
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    background: var(--cream-dk);
    cursor: pointer;
    box-shadow: var(--sh)
}

.gi img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease
}

.gi:hover img {
    transform: scale(1.07)
}

.gov {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 17, 23, .85) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px
}

.gi:hover .gov {
    opacity: 1
}

.got {
    color: #fff;
    font-weight: 600;
    font-size: .87rem
}

.goc {
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 2px
}

.gdel {
    position: absolute;
    top: 9px;
    right: 9px;
    background: rgba(192, 57, 43, .85);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 4px 7px;
    font-size: .72rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s
}

.gi:hover .gdel {
    opacity: 1
}

/* TABLE */
.tw {
    overflow-x: auto;
    border-radius: 11px;
    box-shadow: var(--sh)
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: .86rem
}

thead th {
    background: var(--ink);
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
    font-size: .73rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 12px 15px;
    text-align: left
}

tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(15, 17, 23, .05)
}

tbody tr:hover td {
    background: var(--cream)
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 600
}

.ba {
    background: #e6f4f1;
    color: var(--teal)
}

.bi {
    background: #f0f0f0;
    color: var(--ink-muted)
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1.5px solid rgba(15, 17, 23, .11);
    border-radius: 8px;
    padding: 7px 13px;
    width: 270px
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: .86rem;
    width: 100%
}

/* MODAL */
.mb {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 23, .48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s
}

.mb.open {
    opacity: 1;
    pointer-events: all
}

.modal {
    background: #fff;
    border-radius: 15px;
    width: min(520px, 95vw);
    box-shadow: var(--sh-lg);
    transform: scale(.96);
    transition: transform .2s
}

.mb.open .modal {
    transform: none
}

.mh {
    padding: 20px 26px 16px;
    border-bottom: 1px solid rgba(15, 17, 23, .06);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.mh h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem
}

.mbody {
    padding: 22px 26px
}

.mf {
    padding: 14px 26px 20px;
    display: flex;
    gap: 9px;
    justify-content: flex-end
}

.fr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.fg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px
}

.fg:last-child {
    margin-bottom: 0
}

.fg label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-lt)
}

.fg input,
.fg select,
.fg textarea {
    border: 1.5px solid rgba(15, 17, 23, .13);
    border-radius: 7px;
    padding: 8px 11px;
    font-family: 'DM Sans', sans-serif;
    font-size: .86rem;
    outline: none;
    transition: border-color .15s;
    background: #fff;
    color: var(--ink)
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
    border-color: var(--gold)
}

.fg textarea {
    resize: vertical;
    min-height: 75px
}

.upload-area {
    border: 2px dashed rgba(15, 17, 23, .18);
    border-radius: 9px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s
}

.upload-area:hover {
    border-color: var(--gold);
    background: var(--gold-pale)
}

.upload-area input {
    display: none
}

.upload-area p {
    font-size: .83rem;
    color: var(--ink-muted);
    margin-top: 6px
}

/* LOGIN */
.lo {
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s
}

.lo.open {
    opacity: 1;
    pointer-events: all
}

.lbox {
    background: #fff;
    border-radius: 18px;
    padding: 38px 34px;
    width: min(400px, 90vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3)
}

.lbox h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    margin-bottom: 5px
}

.lbox p {
    font-size: .83rem;
    color: var(--ink-muted);
    margin-bottom: 26px
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 14, .92);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s
}

.lightbox.open {
    opacity: 1;
    pointer-events: all
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px
}

.lb-close {
    position: absolute;
    top: 22px;
    right: 26px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: #fff;
    border-radius: 7px;
    padding: 7px 13px;
    cursor: pointer;
    font-size: .83rem;
    font-family: 'DM Sans', sans-serif
}

/* DASHBOARD QUICK */
.dg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px
}

.ql {
    display: flex;
    flex-direction: column;
    gap: 9px
}

.qi {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(15, 17, 23, .055)
}

.qi:last-child {
    border-bottom: none
}

.qdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0
}

.qit {
    font-size: .86rem;
    font-weight: 500
}

.qis {
    font-size: .76rem;
    color: var(--ink-muted);
    margin-top: 2px
}

@media(max-width:768px) {
    .sidebar {
        transform: translateX(-252px)
    }

    .sidebar.open {
        transform: none
    }

    .main {
        margin-left: 0
    }

    .content {
        padding: 18px
    }

    .fr {
        grid-template-columns: 1fr
    }

    .topbar {
        padding: 0 14px
    }

    .dg {
        grid-template-columns: 1fr
    }
}

.ham {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink)
}

@media(max-width:768px) {
    .ham {
        display: flex
    }
}

/* =========================
   COURSES ADMIN UI
========================= */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

/* Card */
.course-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  border-left: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0,0,0,.08);
}

/* Header */
.course-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.course-head h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.course-grade {
  background: var(--cream-dk);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Description */
.course-desc {
  font-size: .85rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Meta blocks */
.course-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.course-meta strong {
  font-size: .72rem;
  color: var(--ink);
}

.course-meta p {
  font-size: .8rem;
  color: var(--ink-muted);
  margin: 3px 0 0;
}

/* Actions */
.course-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

/* Empty */
.empty-state {
  color: var(--ink-muted);
  font-size: .9rem;
  padding: 40px 0;
}
/* =============================
   MOBILE SIDEBAR FIX
============================= */

/* Close button */
.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 200;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* Mobile behavior */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 100;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-close {
    display: block;
  }
}