:root{
  --deped-blue:#1f7a45;
  --deped-blue-2:#2d8f56;
  --deped-gold:#f4b400;
  --deped-red:#b3261e;
  --surface:#ffffff;
  --surface-2:#f4faf6;
  --surface-3:#eaf6ee;
  --text:#0f172a;
  --muted:#5f6f66;
}

[data-bs-theme="dark"]{
  --surface:#0b1220;
  --surface-2:#0f1b31;
  --text:#e5e7eb;
  --muted:#94a3b8;
}

body{
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  color: var(--text);
  overflow-x: hidden;
}

/* Pages with fixed bottom copyright bar (public portal, admin app, admin login) */
body.public-site,
body.admin-site,
body.login-site{
  padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
}

footer.site-footer-fixed{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  margin: 0;
  background: var(--surface);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

[data-bs-theme="dark"] footer.site-footer-fixed{
  background: var(--surface);
  border-top-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}

/* Keep last sidebar links above the fixed footer on short viewports */
body.admin-site aside.sidebar{
  padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
}

.brand-bar{
  background: linear-gradient(90deg, #1b6b3d, var(--deped-blue-2));
  color:#fff;
  box-shadow: 0 6px 18px rgba(31,122,69,.24);
}

.brand-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-weight:700;
  letter-spacing:.2px;
}

.brand-mark-img{
  height: 44px;
  width: 44px;
  max-width: none;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-mark-img--sidebar{
  height: 76px;
  width: 76px;
  max-width: none;
  object-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.brand-sidebar-block{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.brand-app-title{
  line-height: 1.15;
}

.card-soft{
  border: 1px solid rgba(28,44,76,.08);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(8,26,58,.08);
  background: #fff;
}

.btn-deped{
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--deped-blue);
  --bs-btn-border-color: var(--deped-blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1b6a3c;
  --bs-btn-hover-border-color: #1b6a3c;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #155832;
  --bs-btn-active-border-color: #155832;
  --bs-btn-focus-shadow-rgb: 31,122,69;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #86b999;
  --bs-btn-disabled-border-color: #86b999;
}

.btn-deped,
.btn-deped:hover,
.btn-deped:focus,
.btn-deped:active,
.btn-deped:focus-visible{
  color: #fff !important;
}

.btn-deped:disabled,
.btn-deped.disabled{
  opacity: 1;
}

.input-group-text{
  background: var(--surface-3);
  border-color: #c4dfcc;
  color: #27563a;
  font-weight: 600;
}

.form-control:focus,
.form-select:focus{
  border-color: #75b086;
  box-shadow: 0 0 0 .2rem rgba(31,122,69,.16);
}

.hero-card{
  background: linear-gradient(135deg, #ffffff 0%, #f3faf5 100%);
}

.icon-chip{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.icon-chip.blue{ background: #dff3e7; color: #1f7a45; }
.icon-chip.green{ background: #d8f0e1; color: #1f7a45; }
.icon-chip.orange{ background: #fde8e6; color: #b3261e; }
.icon-chip.purple{ background: #fde8e6; color: #b3261e; }

.icon-chip.stat-pending{ background: #eef2f7; color: #64748b; }
.icon-chip.stat-processing{ background: #dbeafe; color: #1d4ed8; }
.icon-chip.stat-approved{ background: #d8f0e1; color: #1f7a45; }
.icon-chip.stat-rejected{ background: #fde8e6; color: #b3261e; }

.dashboard-stat-link .dashboard-stat-card{
  transition: transform .15s ease, box-shadow .15s ease;
}
.dashboard-stat-link:hover .dashboard-stat-card{
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(8,26,58,.12);
}

.dashboard-stat-card .icon-chip{
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}

/* Dashboard stat cards — tinted backgrounds + accent bar */
.dashboard-stat-card--pending{
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 55%, #e2e8f0 100%);
  border-left: 4px solid #64748b;
  border-color: rgba(100, 116, 139, 0.28);
}
.dashboard-stat-card--pending .small{ color: #475569 !important; }
.dashboard-stat-card--pending .fs-4{ color: #1e293b !important; }

.dashboard-stat-card--processing{
  background: linear-gradient(145deg, #f0f7ff 0%, #e0efff 50%, #dbeafe 100%);
  border-left: 4px solid #2563eb;
  border-color: rgba(37, 99, 235, 0.28);
}
.dashboard-stat-card--processing .small{ color: #1e40af !important; }
.dashboard-stat-card--processing .fs-4{ color: #1d4ed8 !important; }

.dashboard-stat-card--approved{
  background: linear-gradient(145deg, #f4fbf7 0%, #e8f5ee 50%, #d8f0e1 100%);
  border-left: 4px solid var(--deped-blue);
  border-color: rgba(31, 122, 69, 0.28);
}
.dashboard-stat-card--approved .small{ color: #1b5e3a !important; }
.dashboard-stat-card--approved .fs-4{ color: #145834 !important; }

.dashboard-stat-card--rejected{
  background: linear-gradient(145deg, #fff8f7 0%, #feecea 50%, #fde8e6 100%);
  border-left: 4px solid #b3261e;
  border-color: rgba(179, 38, 30, 0.28);
}
.dashboard-stat-card--rejected .small{ color: #9a3412 !important; }
.dashboard-stat-card--rejected .fs-4{ color: #7f1d1d !important; }

.dashboard-chart-card{
  border-top: 3px solid var(--deped-blue);
  background: linear-gradient(180deg, #f6fbf8 0%, #ffffff 38%);
  border-color: rgba(31, 122, 69, 0.12);
}
.dashboard-chart-card .fw-semibold{
  color: #145834;
}

[data-bs-theme="dark"] .dashboard-stat-card--pending{
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(148, 163, 184, 0.35);
}
[data-bs-theme="dark"] .dashboard-stat-card--pending .small{ color: #94a3b8 !important; }
[data-bs-theme="dark"] .dashboard-stat-card--pending .fs-4{ color: #f1f5f9 !important; }

[data-bs-theme="dark"] .dashboard-stat-card--processing{
  background: linear-gradient(145deg, #172554 0%, #0f172a 100%);
  border-color: rgba(96, 165, 250, 0.35);
}
[data-bs-theme="dark"] .dashboard-stat-card--processing .small{ color: #93c5fd !important; }
[data-bs-theme="dark"] .dashboard-stat-card--processing .fs-4{ color: #bfdbfe !important; }

[data-bs-theme="dark"] .dashboard-stat-card--approved{
  background: linear-gradient(145deg, #0f2918 0%, #0f172a 100%);
  border-color: rgba(74, 222, 128, 0.25);
}
[data-bs-theme="dark"] .dashboard-stat-card--approved .small{ color: #86efac !important; }
[data-bs-theme="dark"] .dashboard-stat-card--approved .fs-4{ color: #bbf7d0 !important; }

[data-bs-theme="dark"] .dashboard-stat-card--rejected{
  background: linear-gradient(145deg, #3f1512 0%, #0f172a 100%);
  border-color: rgba(248, 113, 113, 0.35);
}
[data-bs-theme="dark"] .dashboard-stat-card--rejected .small{ color: #fca5a5 !important; }
[data-bs-theme="dark"] .dashboard-stat-card--rejected .fs-4{ color: #fecaca !important; }

[data-bs-theme="dark"] .dashboard-chart-card{
  background: linear-gradient(180deg, #0f1b14 0%, #0b1220 42%);
  border-color: rgba(74, 222, 128, 0.15);
}
[data-bs-theme="dark"] .dashboard-chart-card .fw-semibold{
  color: #86efac;
}

.icon-accent{
  margin-right: .35rem;
}
.icon-accent.blue{ color: #1f7a45; }
.icon-accent.green{ color: #1f7a45; }
.icon-accent.orange{ color: #b3261e; }
.icon-accent.purple{ color: #b3261e; }

.admin-entry{
  border-color: rgba(255,255,255,.45);
  color: #fff;
}
.admin-entry:hover{
  border-color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.14);
  color: #fff;
}

.btn-outline-secondary{
  border-color: #97b8a2;
  color: #335845;
}
.btn-outline-secondary:hover{
  background: #edf7f0;
  border-color: #6f9c80;
  color: #1f3f2f;
}

.btn-outline-primary{
  border-color: #2d8f56;
  color: #2d8f56;
}
.btn-outline-primary:hover{
  background: #2d8f56;
  border-color: #2d8f56;
  color: #fff;
}

.badge-status{
  font-weight:600;
  border-radius:999px;
  padding:.4rem .6rem;
}

.req-star{
  color:#dc3545;
  font-weight:700;
  margin-left:2px;
}

.link-deped-template{
  color: var(--deped-blue);
  font-weight: 600;
  text-decoration: none;
}
.link-deped-template:hover{
  color: var(--deped-blue-2);
  text-decoration: underline;
}

.loader-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(2,6,23,.45);
  z-index:2000;
}
.loader-overlay.show{ display:flex; }
.spinner-ring{
  width:56px;height:56px;
  border:6px solid rgba(255,255,255,.25);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin 1s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg);} }

/* Home: no page scroll (viewport locked) */
html:has(body.landing-scroll-lock){
  overflow: hidden;
  height: 100%;
}

body.public-site.landing-scroll-lock{
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.public-site.landing-scroll-lock .brand-bar{
  flex-shrink: 0;
}

body.public-site.landing-scroll-lock main.container{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

body.public-site.landing-scroll-lock .landing-wrap{
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  overflow: hidden;
}

/* Home landing: 80% visual zoom (Chromium / Safari / Firefox 126+); fallback below */
.landing-wrap.landing-wrap--scale80{
  zoom: 0.8;
}

@supports not (zoom: 0.8){
  .landing-wrap.landing-wrap--scale80{
    transform: scale(0.8);
    transform-origin: center center;
    width: 125%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Centered landing layout */
.landing-wrap{
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-panel{
  width: 100%;
  max-width: 1120px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(160deg, #222238 0%, #1d1c2f 55%, #242238 100%);
  box-shadow: 0 24px 45px rgba(11,13,28,.34);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 14px;
}

.landing-left{
  container-type: inline-size;
  container-name: landing-aside;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(165deg, rgba(42,76,140,.65) 0%, rgba(20,30,76,.62) 60%, rgba(15,22,58,.75) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 20px;
  position: relative;
  overflow-x: clip;
}

.landing-left-badge{
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  text-align: center;
  white-space: nowrap;
  /* Fallback when container queries unsupported */
  font-size: clamp(0.56rem, 2.1vw, 1.06rem);
  /* Scales with left column width so one line fits without horizontal scroll */
  font-size: clamp(0.56rem, 4.25cqi, 1.06rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  padding: 8px 14px;
  box-sizing: border-box;
}

.landing-logo-wrap{
  width: min(72vw, 360px);
  min-width: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}

.landing-left-logo{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
}

.landing-left-title{
  margin-top: 10px;
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  max-width: 420px;
  line-height: 1.25;
}

.landing-right{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18,18,31,.92);
  padding: 24px 22px;
  color: #f2f4ff;
}

.landing-right-heading{
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.landing-right-sub{
  margin-top: 6px;
  margin-bottom: 14px;
  color: rgba(234,238,255,.72);
}

.landing-actions{
  display: grid;
  gap: 12px;
}

.landing-action-card{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.05);
  padding: 14px;
}

.landing-action-card .title-row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-action-card h5{
  margin: 0;
  color: #fff;
}

.landing-action-card .desc{
  color: rgba(233,238,255,.75);
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: .95rem;
}

.landing-action-card .btn{
  margin-top: 6px;
}

.landing-how{
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.05);
  padding: 14px 16px;
}

.landing-how h6{
  color: #fff;
}

.landing-how .text-secondary{
  color: rgba(233,238,255,.76) !important;
}

@media (max-width: 991.98px){
  .landing-panel{
    grid-template-columns: 1fr;
  }
  .landing-left{
    min-height: 360px;
  }
  .landing-logo-wrap{
    width: min(58vw, 280px);
    min-width: 180px;
  }
}

/* Phones / small tablets: full-size landing (avoid 80% zoom shrinking tap targets) */
@media (max-width: 767.98px){
  .landing-wrap.landing-wrap--scale80{
    zoom: 1;
  }
  @supports not (zoom: 1){
    .landing-wrap.landing-wrap--scale80{
      transform: none;
      width: 100%;
      max-width: 100%;
      margin-left: auto;
      margin-right: auto;
    }
  }
  .landing-panel{
    padding: 10px;
    gap: 10px;
    border-radius: 14px;
  }
  .landing-right{
    padding: 16px 14px;
  }
  .landing-right-heading{
    font-size: 1.45rem;
  }
  .landing-left{
    min-height: 300px;
  }
  .brand-mark-img{
    height: 38px;
    width: 38px;
  }
}

/* Public top bar: long app names wrap instead of forcing horizontal scroll */
.brand-bar-title .brand-badge{
  max-width: 100%;
}

/* Form rows: email local + domain suffix share space on narrow screens */
.input-group > .form-control{
  min-width: 0;
}

/* Account platform (creation / reset): full-width tap targets on small phones */
.account-platform-btns{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 575.98px){
  .account-platform-btns{
    flex-direction: column;
  }
  .account-platform-btns .btn{
    width: 100%;
    justify-content: center;
  }
}

/* Track ticket: QR block stacks under heading on narrow screens */
@media (max-width: 575.98px){
  .track-result-head{
    flex-direction: column;
    align-items: stretch !important;
  }
  .track-result-head .track-qrcode-wrap{
    align-self: center;
    text-align: center;
  }
}

