/* ============================================================
   CHMSUPPORT – Global Stylesheet
   public/assets/css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --cream:        #F5F2DC;
  --light-green:  #B5CC8E;
  --mid-green:    #8DA870;
  --sage:         #6B8C57;
  --dark-sage:    #4A6340;
  --deeper:       #3A4F32;
  --white:        #FFFFFF;
  --off-white:    #FAFAF5;
  --text-dark:    #2C3E25;
  --text-mid:     #4A5E38;
  --text-light:   #7A9060;
  --text-muted:   #A8B89A;
  --border:       #D4DFC4;
  --border-light: #E8EDD8;
  --shadow-sm:    0 2px 8px rgba(74,99,64,.10);
  --shadow-md:    0 6px 24px rgba(74,99,64,.14);
  --shadow-lg:    0 16px 48px rgba(74,99,64,.18);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --nav-height:   70px;
  --sidebar-width:260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--deeper); color: var(--text-dark); line-height: 1.6; font-size: 15px; min-height: 100vh; -webkit-text-size-adjust:100%; touch-action:manipulation; }
* { box-sizing:border-box; } 
html { scroll-behavior:smooth; -webkit-overflow-scrolling:touch; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; outline: none; }

h1,h2,h3,h4 { font-family: 'Playfair Display', serif; line-height: 1.2; color: var(--text-dark); }
h1 { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 900; }
h2 { font-size: clamp(1.3rem,2.5vw,1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 600; }
p  { color: var(--text-mid); line-height: 1.7; }

.container         { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-body         { padding-top: var(--nav-height); min-height: 100vh; }
.layout-with-sidebar { display: flex; padding-top: var(--nav-height); min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background-color: rgba(14, 35, 20, 0.82);
  background-image: url('../img/chmsu_campus.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  border-right: none;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  padding-top: calc(var(--nav-height) + 16px);
  padding-bottom: 24px;
  isolation: auto;
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 35, 20, 0.72);
  z-index: 0;
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.main-content { margin-left: var(--sidebar-width); flex: 1; padding: 32px; }

/* ── Navbar ── */
.navbar { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; height: var(--nav-height); background: var(--dark-sage); z-index: 99999 !important; display: flex; align-items: center; box-shadow: 0 2px 16px rgba(0,0,0,.25); transform: translateZ(0); will-change: transform; }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 32px; }
.navbar__brand { display: flex; align-items: center; gap: 12px; }
.navbar__logo  { width: 40px; height: 40px; background: linear-gradient(135deg,var(--mid-green),var(--sage)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.navbar__name  { font-family: 'Playfair Display',serif; font-weight: 900; font-size: 1.25rem; color: var(--cream); letter-spacing: -.5px; }
.navbar__name span { color: var(--light-green); }
.navbar__links { display: flex; align-items: center; gap: 4px; }
.navbar__link  { color: rgba(255,255,255,.7); padding: 8px 14px; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500; transition: background .2s,color .2s; }
.navbar__link:hover, .navbar__link.active { background: rgba(181,204,142,.15); color: var(--cream); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.navbar__notif   { position: relative; color: rgba(255,255,255,.7); font-size: 1.2rem; cursor: pointer; padding: 6px; border-radius: 8px; transition: background .2s; }
.navbar__notif:hover { background: rgba(255,255,255,.1); color: var(--cream); }
.navbar__notif .badge { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; background: #E07070; border-radius: 50%; border: 2px solid var(--dark-sage); }
.navbar__user   { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 12px; border-radius: var(--radius-sm); transition: background .2s; }
.navbar__user:hover { background: rgba(255,255,255,.1); }
.navbar__avatar { width: 34px; height: 34px; background: linear-gradient(135deg,var(--light-green),var(--mid-green)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--white); }
.navbar__username { color: var(--cream); font-size: .85rem; font-weight: 500; }

/* ── Sidebar ── */
.sidebar__section-label { padding: 6px 20px; font-size: .68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 16px; }
.sidebar__link { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: rgba(255,255,255,0.88); font-size: .88rem; font-weight: 500; transition: background .2s,color .2s; border-left: 3px solid transparent; }
.sidebar__link:hover  { background: rgba(255,255,255,0.15); color: #fff; }
.sidebar__link.active { background: rgba(255,255,255,0.22); color: #fff; border-left-color: var(--light-green); font-weight: 700; }
.sidebar__icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }

/* ── Page Header ── */
.page-header { background: linear-gradient(135deg,var(--dark-sage) 0%,var(--sage) 100%); padding: 48px 0; position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; width: 400px; height: 400px; background: rgba(255,255,255,.04); border-radius: 50%; top: -150px; right: -80px; }
.page-header__inner  { position: relative; z-index: 1; }
.page-header__eyebrow{ font-size: .75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--light-green); margin-bottom: 10px; }
.page-header h1 { color: var(--cream); }
.page-header p  { color: rgba(245,242,220,.7); margin-top: 10px; font-size: 1rem; }

/* ── Cards ── */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: visible; }
.card--bordered { border: 1px solid var(--border); box-shadow: none; }
.card__header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card__title  { font-family: 'Playfair Display',serif; font-size: 1.05rem; font-weight: 700; }
.card__body   { padding: 24px; }
.card__footer { padding: 16px 24px; border-top: 1px solid var(--border-light); background: var(--off-white); }

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--white); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); position: relative; overflow: hidden; }
.stat-card__icon  { font-size: 1.5rem; margin-bottom: 12px; }
.stat-card__value { font-family: 'Playfair Display',serif; font-size: 1.9rem; font-weight: 700; color: var(--dark-sage); line-height: 1; }
.stat-card__label { font-size: .78rem; color: var(--text-light); margin-top: 6px; font-weight: 500; }
.stat-card__change { font-size: .72rem; margin-top: 8px; font-weight: 600; }
.stat-card__change.up { color: var(--sage); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: .88rem; transition: all .2s; cursor: pointer; white-space: nowrap; border: 2px solid transparent; }
.btn--primary { background: var(--sage);  color: var(--white); border-color: var(--sage); }
.btn--primary:hover { background: var(--dark-sage); border-color: var(--dark-sage); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--outline { background: transparent; color: var(--sage); border-color: var(--sage); }
.btn--outline:hover { background: var(--sage); color: var(--white); }
.btn--ghost   { background: transparent; color: var(--text-mid); border-color: var(--border); }
.btn--ghost:hover  { background: var(--border-light); color: var(--text-dark); }
.btn--danger  { background: #C0392B; color: var(--white); border-color: #C0392B; }
.btn--sm  { padding: 7px 16px; font-size: .8rem; }
.btn--lg  { padding: 14px 32px; font-size: 1rem; }
.btn--full{ width: 100%; justify-content: center; }

/* ── Tags ── */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.tag--green  { background: #E0EDD4; color: var(--dark-sage); }
.tag--yellow { background: #FFF3CD; color: #856404; }
.tag--red    { background: #FFE0E0; color: #A00; }
.tag--blue   { background: #E0EAFF; color: #2255AA; }
.tag--sage   { background: var(--sage); color: var(--white); }
.tag--gray   { background: #F0F0F0; color: #666; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.form-label .required { color: #C0392B; margin-left: 3px; }
.form-control { width: 100%; padding: 11px 15px; background: var(--off-white); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-dark); transition: border-color .2s,box-shadow .2s; }
.form-control:focus { border-color: var(--mid-green); background: var(--white); box-shadow: 0 0 0 3px rgba(141,168,112,.15); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A9060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Choice Cards ── */
.choice-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 2px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: border-color .2s,background .2s; margin-bottom: 12px; }
.choice-card:hover    { border-color: var(--mid-green); background: #F8FBF4; }
.choice-card.selected { border-color: var(--sage); background: #F0F5EA; }
.choice-card__radio   { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--border); flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; }
.choice-card.selected .choice-card__radio { border-color: var(--sage); background: var(--sage); }
.choice-card.selected .choice-card__radio::after { content: ''; width: 8px; height: 8px; background: white; border-radius: 50%; }
.choice-card__content h4 { font-size: .9rem; margin-bottom: 3px; }
.choice-card__content p  { font-size: .78rem; color: var(--text-light); margin: 0; }

/* ── Tables ── */
.table-wrap { overflow-x: scroll; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); display: block; width: 100%; }
.table-wrap table { min-width: 620px; }
.table { width: 100%; border-collapse: collapse; background: var(--white); }
.table th { background: var(--dark-sage); color: var(--cream); padding: 13px 16px; text-align: left; font-size: .78rem; font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); font-size: .87rem; color: var(--text-dark); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover   { background: #FAFDF7; }

/* ── Progress ── */
.progress { background: var(--border); border-radius: 10px; height: 8px; overflow: hidden; }
.progress__fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg,var(--mid-green),var(--dark-sage)); transition: width .5s ease; }
.progress--sm     { height: 5px; }
.progress--danger .progress__fill { background: linear-gradient(90deg,#E07070,#C0392B); }
.progress--warn   .progress__fill { background: linear-gradient(90deg,#F0C060,#E07020); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 24px; }
.tl-dot  { position: absolute; left: -23px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; font-size: .65rem; z-index: 1; }
.tl-dot--done    { background: var(--sage);        border-color: var(--sage);      color: var(--white); }
.tl-dot--active  { background: var(--light-green); border-color: var(--mid-green); }
.tl-dot--pending { background: var(--white);        border-color: var(--border);    color: var(--text-muted); }
.tl-content h4   { font-size: .88rem; margin-bottom: 2px; }
.tl-content p    { font-size: .78rem; color: var(--text-light); margin: 0; }

/* ── Alerts ── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .88rem; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; border: 1px solid; }
.alert--success { background: #EEF7E8; border-color: var(--light-green); color: var(--dark-sage); }
.alert--warning { background: #FFF8E8; border-color: #F0C060; color: #856404; }
.alert--danger  { background: #FEF0F0; border-color: #F0A0A0; color: #A00; }
.alert--info    { background: #EEF2FF; border-color: #A0B4E0; color: #334; }

/* ── Steps ── */
.steps { display: flex; gap: 0; margin-bottom: 32px; }
.step  { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step + .step::before { content: ''; position: absolute; left: -50%; top: 18px; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.step.done + .step::before { background: var(--mid-green); }
.step__circle { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; z-index: 1; color: var(--text-muted); transition: all .3s; }
.step.done   .step__circle { background: var(--sage);  border-color: var(--sage);  color: var(--white); }
.step.active .step__circle { background: var(--white); border-color: var(--sage);  color: var(--sage); box-shadow: 0 0 0 4px rgba(107,140,87,.15); }
.step__label { font-size: .7rem; color: var(--text-muted); margin-top: 6px; text-align: center; font-weight: 500; }
.step.active .step__label { color: var(--sage); font-weight: 600; }

/* ── Chips ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { padding: 7px 16px; border: 1.5px solid var(--border); border-radius: 20px; font-size: .82rem; color: var(--text-mid); cursor: pointer; transition: all .2s; background: var(--white); font-weight: 500; }
.chip:hover    { border-color: var(--mid-green); color: var(--sage); }
.chip.selected { border-color: var(--sage); background: var(--sage); color: var(--white); }

/* ── Tab Group ── */
.tab-group { display: flex; background: var(--border-light); border-radius: var(--radius-sm); padding: 4px; gap: 2px; width: fit-content; margin-bottom: 24px; }
.tab-btn   { padding: 8px 20px; border-radius: 6px; font-size: .85rem; font-weight: 500; color: var(--text-mid); cursor: pointer; transition: all .2s; }
.tab-btn.active { background: var(--white); color: var(--dark-sage); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ── Auth ── */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-left  { background: linear-gradient(150deg,var(--deeper),var(--sage)); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 60px; position: relative; overflow: hidden; }
.auth-right { background: var(--white); display: flex; flex-direction: column; justify-content: center; padding: 60px 80px; overflow-y: auto; }

/* ── Hero ── */
.hero { min-height: 100vh; background: linear-gradient(150deg,var(--deeper) 0%,var(--dark-sage) 40%,var(--sage) 100%); display: flex; align-items: center; position: relative; overflow: hidden; }
.hero__inner  { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero__title  { font-family: 'Playfair Display',serif; font-size: clamp(2.4rem,5vw,3.8rem); font-weight: 900; color: var(--cream); line-height: 1.1; margin-bottom: 20px; }
.hero__title span { color: var(--light-green); }
.hero__text   { color: rgba(245,242,220,.75); font-size: 1.05rem; line-height: 1.7; margin-bottom: 32px; }

/* ── Amount Grid ── */
.amount-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.amount-btn  { padding: 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); text-align: center; font-weight: 600; font-size: .9rem; color: var(--text-mid); cursor: pointer; transition: all .2s; background: var(--white); }
.amount-btn:hover    { border-color: var(--mid-green); color: var(--sage); }
.amount-btn.selected { border-color: var(--sage); background: var(--sage); color: var(--white); }

/* ── Pay Method ── */
.pay-method { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 2px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: border-color .2s,background .2s; margin-bottom: 12px; }
.pay-method:hover    { border-color: var(--mid-green); }
.pay-method.selected { border-color: var(--sage); background: #F0F5EA; }
.pay-method__icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.pay-method__name { font-weight: 600; font-size: .9rem; color: var(--text-dark); }
.pay-method__desc { font-size: .78rem; color: var(--text-light); }
.pay-method__check { font-size: 1.1rem; color: var(--sage); }

/* ── Notifications ── */
.notif-item { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); transition: background .15s; }
.notif-item:hover  { background: #FAFDF7; }
.notif-item.unread { background: #F4F8EE; border-left: 3px solid var(--mid-green); }
.notif-item__icon  { width: 40px; height: 40px; border-radius: 50%; background: var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.notif-item__title { font-size: .88rem; font-weight: 600; color: var(--text-dark); margin-bottom: 3px; }
.notif-item__text  { font-size: .82rem; color: var(--text-mid); line-height: 1.5; }
.notif-item__time  { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* ── Inventory ── */
.inv-item { margin-bottom: 18px; }
.inv-item__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.inv-item__name   { font-size: .88rem; font-weight: 600; color: var(--text-dark); }

/* ── Footer ── */
.footer { background: transparent !important; color: rgba(245,242,220,.9); padding: 32px 0; font-size: .82rem; margin-top: 60px; margin-left: 0; border-top: 1px solid rgba(255,255,255,0.2); position: relative; z-index: 2; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 40px; box-sizing: border-box; }
.footer__brand { font-family: 'Playfair Display',serif; color: var(--cream); font-weight: 700; }

/* ── Utilities ── */
.text-center  { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.divider      { height: 1px; background: var(--border-light); margin: 20px 0; }
.section-title { font-family: 'Playfair Display',serif; font-size: 1.15rem; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.avatar     { border-radius: 50%; background: linear-gradient(135deg,var(--light-green),var(--mid-green)); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--white); flex-shrink: 0; }
.avatar--sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar--md { width: 44px; height: 44px; font-size: 1rem; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.3rem; }
.dash-grid  { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* Mobile logout btn — hidden on desktop */
.mobile-logout-btn { display: none; }

@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.anim-fade-up { animation: fadeInUp .5s ease forwards; }
.delay-1 { animation-delay:.1s; opacity:0; }
.delay-2 { animation-delay:.2s; opacity:0; }
.delay-3 { animation-delay:.3s; opacity:0; }

@media (max-width:1024px) {
  .layout-with-sidebar .sidebar { display:none; }
  .layout-with-sidebar .main-content { margin-left:0; }
  .footer { margin-left: 0; }
  .hero__inner { grid-template-columns:1fr; }
  .auth-split  { grid-template-columns:1fr; }
  .auth-left   { display:none; }
  .auth-right  { padding:40px; }
  .dash-grid   { grid-template-columns:1fr; }
  .form-row    { grid-template-columns:1fr; }
}

@media (max-width:768px) {

  /* ── Hamburger ── */
  .hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 8px;
  }

  /* ── Sidebar slides in from left ── */
  .layout-with-sidebar .sidebar {
    display: block !important;
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 999999;
    transition: left .28s ease;
    padding-top: 60px;
    overflow-y: auto;
  }
  .layout-with-sidebar .sidebar.sidebar--open { left: 0; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999998; }
  .sidebar-overlay.active { display: block; }

  /* ── Main content ── */
  .layout-with-sidebar .main-content { margin-left: 0 !important; padding: 16px 12px; }

  /* ── Navbar ── */
  .navbar__inner { padding: 0 10px; }
  .navbar__username { display: none !important; }
  .mobile-admin-badge { display: none !important; }
  .navbar__name { font-size: .95rem; }

  /* ── Mobile logout ── */
  .mobile-logout-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
  }

  /* ── Profile dropdown ── */
  .profile-dropdown { right: 0; left: auto; width: 260px; }

  /* ── Admin stat cards: 2x2 ── */
  .grid-4, .admin-stat-grid { grid-template-columns: 1fr 1fr !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; }

  /* ── User dashboard stat + profile grid ── */
  .dash-stat-grid { grid-template-columns: 1fr 1fr !important; }
  .dash-stat-grid .profile-full-card { grid-column: 1 / -1; }

  /* ── Dashboard header ── */
  .flex-between { flex-direction: column; align-items: flex-start; gap: 12px; }
  .flex-between > div:last-child { width: 100%; display: flex; gap: 8px; }
  .flex-between > div:last-child .btn { flex: 1; font-size: .78rem; padding: 8px 10px; }

  /* ── Cards ── */
  .card__body { padding: 14px; }
  .card__footer { padding: 12px 14px; }
  .stat-card__value { font-size: 1.6rem; }

  /* ── Admin header box ── */
  .admin-header-box { padding: 16px !important; }
  .admin-header-box h1 { font-size: 1.3rem !important; }

  /* ── Auth ── */
  .auth-right { padding: 24px 16px; }

  /* ── Active request banner ── */
  .active-req-banner { padding: 18px 16px !important; }
  .active-req-banner h3 { font-size: 1rem !important; }

  /* ── Profile modal ── */
  #profileModal > div { margin: 16px; max-width: calc(100% - 32px) !important; }
  .profile-form-grid { grid-template-columns: 1fr !important; }

  /* ── Admin form rows ── */
  .form-row-2 { grid-template-columns: 1fr !important; }

  /* ── Landing page ── */
  .hero__cta { flex-direction: column; }
}

/* ── CHMSU Campus Background — Full Page ── */
body.has-chmsu-bg {
  background-image: url('../img/chmsu_campus.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
}
body.has-chmsu-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(16, 38, 22, 0.75);
  z-index: 0;
  pointer-events: none;
}
body.has-chmsu-bg > * { position: relative; z-index: 1; }

/* Sidebar and navbar stay on top */
body.has-chmsu-bg .sidebar { z-index: 110; }
body.has-chmsu-bg .navbar  { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 99999 !important; transform: translateZ(0); }

/* Main content area transparent — bg shows through */
body.has-chmsu-bg .main-content { background: transparent; }

/* Cards stay fully opaque white so text is always readable */
body.has-chmsu-bg .card        { background: rgba(255,255,255,0.97); overflow: visible; }
body.has-chmsu-bg .stat-card   { background: rgba(255,255,255,0.97); }
body.has-chmsu-bg .table-wrap  { background: rgba(255,255,255,0.97); border-radius: var(--radius-md); }

/* Section titles and text inside main content — keep dark on white cards */
/* Text directly in main-content (outside cards) — white on dark bg */
body.has-chmsu-bg .main-content > h1,
body.has-chmsu-bg .main-content > h2,
body.has-chmsu-bg .main-content > h3,
body.has-chmsu-bg .main-content > h4,
body.has-chmsu-bg .main-content > p,
body.has-chmsu-bg .main-content > .section-title,
body.has-chmsu-bg .main-content > .dash-grid > .section-title,
body.has-chmsu-bg .main-content > div > .section-title { color: #fff !important; }

/* Section titles rendered as direct children of main-content divs */
body.has-chmsu-bg .section-title { color: #ffffff !important; }
body.has-chmsu-bg .section-title::after { background: rgba(255,255,255,0.25); }

/* Dashboard welcome text */
body.has-chmsu-bg .main-content .page-eyebrow,
body.has-chmsu-bg .main-content .welcome-name { color: #ffffff !important; }

/* Profile snapshot card — force dark text */
body.has-chmsu-bg .profile-snap span { color: #222222 !important; }

/* Text inside cards stays dark — cards are white */
body.has-chmsu-bg .card span,
body.has-chmsu-bg .card div,
body.has-chmsu-bg .card h1,
body.has-chmsu-bg .card h2,
body.has-chmsu-bg .card h3,
body.has-chmsu-bg .card h4,
body.has-chmsu-bg .card p,
body.has-chmsu-bg .stat-card h1,
body.has-chmsu-bg .stat-card h2,
body.has-chmsu-bg .stat-card p { color: var(--text-dark); }

/* Active request banner — keep cream text */
body.has-chmsu-bg .active-req-banner h1,
body.has-chmsu-bg .active-req-banner h2,
body.has-chmsu-bg .active-req-banner h3,
body.has-chmsu-bg .active-req-banner p { color: var(--cream) !important; }

/* Page header — semi-transparent green over the CHMSU bg */
.page-header {
  background: rgba(20,45,28,0.60) !important;
  backdrop-filter: blur(1px);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  top: -150px; right: -80px;
}
.page-header h1, .page-header p, .page-header__eyebrow { color: var(--cream) !important; }

/* Hero — transparent so body bg shows through */
.hero { background: transparent !important; position: relative; }

/* Auth left panel */
.auth-left { background: rgba(20,45,28,0.65) !important; }

/* Footer — no sidebar offset on landing/auth pages */
.footer { margin-left: 0; }
/* Footer — offset only when inside a sidebar layout page */
.layout-with-sidebar ~ .footer { margin-left: var(--sidebar-width); }
@media (max-width: 1024px) {
  .layout-with-sidebar ~ .footer { margin-left: 0; }
}

/* Profile Dropdown */
.profile-wrap { position: relative; }
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  z-index: 2000;
  overflow: hidden;
}
.profile-dropdown.open { display: block; animation: fadeInUp .2s ease; }
.profile-dropdown__header {
  background: linear-gradient(135deg, var(--dark-sage), var(--sage));
  padding: 20px; text-align: center;
}
.profile-dropdown__avatar {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--white);
  margin: 0 auto 10px;
}
.profile-dropdown__name { color: var(--cream); font-weight: 700; font-size: .95rem; }
.profile-dropdown__role { color: rgba(245,242,220,.7); font-size: .75rem; margin-top: 3px; }
.profile-dropdown__body { padding: 16px 20px; }
.profile-dropdown__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .83rem; color: var(--text-mid);
}
.profile-dropdown__row:last-child { border-bottom: none; }
.profile-dropdown__row strong { color: var(--text-dark); }
.profile-dropdown__footer { padding: 12px 20px; border-top: 1px solid var(--border-light); }

/* Modal overlay — must be above everything */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.65);
}
.modal-overlay.open { display: flex !important; }
.modal-overlay .modal { margin: auto; }

.footer .container { max-width: 100% !important; padding: 0; width: 100%; }

/* Footer visual distinction - lighter overlay than page content */
.footer {
  background: transparent !important;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: -1;
}
