/* ============================================================
   KCMCU DIGITAL PORTAL — STYLESHEET
   ============================================================ */

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

/* ------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------ */
:root {
  --blue:        #1a3fad;
  --blue-dark:   #0e2878;
  --blue-mid:    #2355c8;
  --blue-light:  #3a6ee0;
  --teal:        #00a878;
  --teal-dark:   #007a58;
  --gold:        #e8b800;
  --gold-dark:   #c49a00;
  --gold-light:  #f5d040;
  --cream:       #f2f4fa;
  --cream-dark:  #e2e6f0;
  --white:       #ffffff;
  --text:        #0e1e4a;
  --text-mid:    #2a3d6a;
  --text-light:  #5a6e8a;
  --green-live:  #22c55e;
  --shadow:      0 4px 24px rgba(14, 40, 120, 0.10);
  --shadow-lg:   0 12px 48px rgba(14, 40, 120, 0.20);
  --radius:      14px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --header-h:      144px;  /* top bar row height */
  --catnav-h:      50px;   /* category pills row height */
  --gold-strip-h:  4px;
  --header-full:   198px;  /* 144 + 4 + 50 — expanded height */
  --drawer-w:      260px;
  --content-max:   1300px;
}

/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Source Sans 3", sans-serif;
  background: #f0f8ff;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ------------------------------------------------------------
   3. LAYOUT
   ------------------------------------------------------------ */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: var(--header-full);
  flex: 1;
}

/* ------------------------------------------------------------
   4. HEADER
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-full);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0e2878;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.hdr-slim {
  height: 72px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.4);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  flex-shrink: 0;
  padding: 0 24px;
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.site-header.hdr-slim .header-inner {
  height: 72px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.16); }
.hamburger span {
  width: 18px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.logo-wrap { display: flex; align-items: center; flex-shrink: 0; }
.logo-wrap img {
  height: 96px; width: auto; object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.35));
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.hdr-slim .logo-wrap img {
  height: 44px;
}

.hdr-divider {
  width: 1px; height: 60px;
  background: rgba(255,255,255,0.15); flex-shrink: 0;
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.hdr-slim .hdr-divider { height: 32px; }

.hdr-title { flex: 1; min-width: 0; }
.hdr-title strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 28px; color: #fff;
  letter-spacing: 0.4px; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: font-size 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.hdr-title span {
  font-size: 13px; color: rgba(255,255,255,0.55);
  letter-spacing: 2px; text-transform: uppercase;
  transition: font-size 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.38s ease;
}
.site-header.hdr-slim .hdr-title strong { font-size: 15px; }
.site-header.hdr-slim .hdr-title span   { font-size: 10px; opacity: 0.42; }

.hdr-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  padding: 8px 16px;
  width: 220px; flex-shrink: 0;
  transition: background 0.25s var(--ease),
              border-color 0.25s var(--ease),
              width 0.25s var(--ease),
              padding 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              font-size 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.hdr-search:focus-within {
  background: rgba(255,255,255,0.14);
  border-color: rgba(232,184,0,0.55);
  width: 250px;
}
.hdr-search svg { flex-shrink: 0; opacity: 0.5; color: #fff; }
.hdr-search input {
  background: none; border: none; outline: none;
  color: #fff; font-size: 13px; font-family: inherit; width: 100%;
  transition: font-size 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.hdr-search input::placeholder { color: rgba(255,255,255,0.38); }

.site-header.hdr-slim .hdr-search { padding: 6px 14px; }
.site-header.hdr-slim .hdr-search input { font-size: 12px; }

.hdr-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-admin {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 28px;
  font-size: 12.5px; font-weight: 700;
  background: transparent;
  border: 1.5px solid rgba(232,184,0,0.55);
  color: var(--gold-light);
  letter-spacing: 0.3px;
  transition: background 0.25s var(--ease),
              border-color 0.25s var(--ease),
              color 0.25s var(--ease),
              padding 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              font-size 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-admin:hover { background: rgba(232,184,0,0.15); border-color: var(--gold); color: var(--gold); }
.site-header.hdr-slim .btn-admin { padding: 6px 14px; font-size: 12px; }

/* ------------------------------------------------------------
   5. GOLD STRIP  (now lives inside .site-header as a flex row)
   ------------------------------------------------------------ */
.gold-strip {
  height: var(--gold-strip-h);
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--blue-light), var(--gold), var(--teal));
  background-size: 300% 100%;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

/* ------------------------------------------------------------
   6. CATEGORY NAV BAR
   ------------------------------------------------------------ */
.cat-nav {
  height: var(--catnav-h);
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.10);
  opacity: 1;
  transition: opacity 0.22s ease;
}
.site-header.hdr-slim .cat-nav {
  opacity: 0;
  pointer-events: none;
}
.cat-nav-inner {
  display: flex; align-items: center; gap: 4px;
  height: 100%;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  border: none;
  background: transparent; color: rgba(255,255,255,0.65);
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}
.cat-tab:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cat-tab.active {
  background: rgba(255,255,255,0.18); color: #fff;
  box-shadow: none;
}
.tab-count {
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  background: rgba(255,255,255,0.18); color: inherit;
}
.cat-tab:not(.active) .tab-count { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.55); }

/* ------------------------------------------------------------
   7. SIDE DRAWER
   ------------------------------------------------------------ */

/* Overlay — light dimming only, does not cover header */
.drawer-overlay {
  position: fixed;
  top: var(--header-full); left: 0; right: 0; bottom: 0;
  background: rgba(4, 10, 38, 0.25);
  z-index: 110;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.drawer-overlay.visible { opacity: 1; pointer-events: auto; }

/* Drawer — auto-height, wraps its content, sits below header */
.side-drawer {
  position: fixed;
  left: 0;
  top: var(--header-full);
  /* No bottom: auto height that fits content */
  height: auto;
  max-height: calc(100vh - var(--header-full) - 20px);
  width: var(--drawer-w);
  z-index: 120;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s var(--ease);
  border-radius: 0 0 16px 0;
  /* Glassmorphism */
  background: rgba(8, 18, 62, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-right: 1px solid rgba(232,184,0,0.3);
  border-bottom: 1px solid rgba(232,184,0,0.2);
  box-shadow: 6px 6px 40px rgba(0,0,0,0.45),
              0 0 0 1px rgba(255,255,255,0.05) inset;
}
.side-drawer.open { transform: translateX(0); }

/* Header strip */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  height: 56px;
  background: rgba(232,184,0,0.10);
  border-bottom: 2px solid rgba(232,184,0,0.45);
  flex-shrink: 0;
}
.drawer-title {
  font-family: "Playfair Display", serif;
  font-size: 15px; font-weight: 600;
  color: var(--gold-light); letter-spacing: 0.5px;
}
.drawer-close {
  width: 30px; height: 30px; border-radius: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.drawer-close:hover {
  background: rgba(232,184,0,0.18);
  border-color: rgba(232,184,0,0.5);
  color: var(--gold-light);
  transform: scale(0.93);
}

/* Links area — height driven by content, scrolls only if too tall */
.drawer-links {
  overflow-y: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,184,0,0.25) transparent;
}
.drawer-links::-webkit-scrollbar { width: 4px; }
.drawer-links::-webkit-scrollbar-thumb {
  background: rgba(232,184,0,0.25); border-radius: 4px;
}

/* Category label */
.drw-cat-label {
  padding: 16px 16px 5px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

/* System link */
.drw-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.72);
  font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-right: 10px;
  position: relative;
  transition: background 0.22s var(--ease),
              color 0.22s var(--ease),
              border-color 0.22s var(--ease),
              transform 0.22s var(--ease),
              box-shadow 0.22s var(--ease),
              font-size 0.22s var(--ease);
  user-select: none;
}

/* Hover — shrink + gold left border */
.drw-link:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-left-color: var(--gold);
  transform: scale(0.95);
  font-size: 12.5px;
}

/* Click / active */
.drw-link:active {
  background: rgba(255,255,255,0.16);
  border-left-color: var(--gold-light);
  transform: scale(0.91);
}

.drw-link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.drw-icon {
  font-size: 18px;
  width: 24px; text-align: center; flex-shrink: 0;
  transition: transform 0.18s var(--ease);
}
.drw-link:hover .drw-icon { transform: scale(1.12); }

.drw-name { flex: 1; }

/* Footer */
.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.drawer-footer p { font-size: 11px; color: rgba(255,255,255,0.3); line-height: 1.5; }

/* Floating toggle tab */
.drawer-toggle {
  position: fixed;
  left: 0;
  top: calc(var(--header-full) + 60px);
  z-index: 109;
  background: rgba(8,18,62,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-radius: 0 10px 10px 0;
  border-top: 1px solid rgba(232,184,0,0.35);
  border-right: 1px solid rgba(232,184,0,0.35);
  border-bottom: 1px solid rgba(232,184,0,0.35);
  width: 26px; height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 3px 0 14px rgba(0,0,0,0.35);
}
.drawer-toggle:hover {
  background: rgba(232,184,0,0.15);
  width: 32px;
  box-shadow: 3px 0 20px rgba(232,184,0,0.25);
}
.drawer-toggle.open { left: var(--drawer-w); }
.drawer-toggle svg { color: var(--gold-light); transition: transform 0.3s var(--ease); }
.drawer-toggle.open svg { transform: scaleX(-1); }
.drawer-toggle-label {
  writing-mode: vertical-rl; font-size: 8px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: rgba(232,184,0,0.7);
}

/* ------------------------------------------------------------
   8. VIDEO BACKGROUND
   ------------------------------------------------------------ */

/* Fixed full-viewport container — sits behind everything */
.video-bg {
  display: none;
}

/* YouTube iframe — sized like background-size: cover */
#ytPlayer {
  position: absolute;
  top: 50%; left: 50%;
  /* 16:9: width = 177.78vh  /  height = 56.25vw */
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Overlay — strong enough to read in bright afternoon light */
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 40, 0.62);
}

/* ------------------------------------------------------------
   9. SITE CARDS
   ------------------------------------------------------------ */
.card-section { padding: 24px 20px 80px; }
.site-grid {
  max-width: var(--content-max); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

/* ---- card shell ---- */
.site-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #dde3f0;
  box-shadow: 0 2px 8px rgba(14,40,120,0.10);
  display: flex; flex-direction: column;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  animation: cardIn 0.4s ease backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; }
}

/* ---- hover: shrink + gold ring ---- */
.site-card:hover {
  transform: scale(0.93);
  box-shadow: 0 12px 36px rgba(14,40,120,0.22),
              0 0 0 2px var(--gold);
  border-color: var(--gold);
}
.site-card:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

/* ---- ripple element (injected by JS) ---- */
.card-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,0,0.5) 0%, rgba(232,184,0,0) 70%);
  transform: scale(0);
  animation: rippleOut 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}
@keyframes rippleOut {
  0%   { transform: scale(0);   opacity: 1; }
  100% { transform: scale(4);   opacity: 0; }
}

/* ---- image area ---- */
.card-visual {
  height: 100px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 12px 12px 0 0;  /* clip only the image corners */
}
.card-visual-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.4s var(--ease);
}
.site-card:hover .card-visual-bg { transform: scale(1.06); }
.card-visual-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.04), rgba(0,0,0,0.32));
}
.card-icon {
  font-size: 36px; position: relative; z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.28));
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.card-logo {
  max-width: 72%; max-height: 72%; object-fit: contain;
  position: relative; z-index: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.22));
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.site-card:hover .card-icon,
.site-card:hover .card-logo { transform: scale(1.18) rotate(-3deg); }

/* ---- text area ---- */
.card-body { padding: 10px 13px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.card-category { font-size: 9px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #7a8eb0; }
.card-name { font-family: "Playfair Display", serif; font-size: 17px; font-weight: 700; color: #0e1e4a; line-height: 1.2; }
.card-desc { font-size: 13px; color: #2a3d6a; line-height: 1.55; flex: 1; }

/* ---- footer ---- */
.card-footer {
  padding: 7px 13px 10px;
  border-top: 1px solid #edf0f8;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.card-status { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: #007a58; }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-live); animation: blink 2.5s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.card-cta {
  width: 26px; height: 26px; border-radius: 50%;
  background: #edf0f8;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 12px;
  transition: background 0.2s, color 0.2s;
}
.site-card:hover .card-cta { background: var(--blue-dark); color: #fff; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 24px; color: rgba(255,255,255,0.45); }
.empty-state .empty-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.empty-state h3 { font-family: "Playfair Display", serif; font-size: 22px; color: rgba(255,255,255,0.75); margin-bottom: 6px; }

/* ------------------------------------------------------------
   10. MODALS
   ------------------------------------------------------------ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(4, 10, 38, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 60px rgba(8,18,60,0.35);
  animation: modalIn 0.28s cubic-bezier(0.34,1.2,0.64,1);
  overflow: hidden; max-height: 90vh;
  display: flex; flex-direction: column;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-head {
  background: var(--blue-dark);
  padding: 22px 26px 18px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  flex-shrink: 0; border-bottom: 3px solid var(--gold);
}
.modal-head h2 { font-family: "Playfair Display", serif; font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; }
.modal-head p  { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 3px; }
.modal-close {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px; width: 32px; height: 32px;
  color: rgba(255,255,255,0.65); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.18s, color 0.18s;
}
.modal-close:hover { background: rgba(255,255,255,0.22); color: #fff; }

.modal-body { padding: 22px 26px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 4px; }

.modal-foot { padding: 0 26px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 7px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--cream-dark); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--cream); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.form-control::placeholder { color: #9aa8c0; }
.form-control:focus {
  border-color: var(--blue-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(58,110,224,0.12);
}
select.form-control option { background: #fff; color: var(--text); }
textarea.form-control { resize: vertical; min-height: 75px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 10px; line-height: 1.5; }
.form-hint strong { color: var(--text-mid); }
.form-control--readonly { opacity: 0.6; cursor: default; }

.form-error {
  background: #fff2f2; border: 1px solid #fca5a5;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #dc2626;
  margin-bottom: 14px; display: none;
}
.form-error.show { display: block; }

.upload-zone {
  border: 2px dashed var(--cream-dark); border-radius: 10px;
  padding: 18px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--cream); position: relative; overflow: hidden;
}
.upload-zone:hover { border-color: var(--blue-light); background: rgba(26,63,173,0.03); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon  { font-size: 24px; display: block; margin-bottom: 4px; }
.upload-label { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.upload-hint  { font-size: 11px; color: var(--text-light); margin-top: 3px; }
.upload-preview {
  width: 100%; height: 80px; object-fit: contain;
  border-radius: 8px; margin-top: 10px;
  display: none; border: 1px solid var(--cream-dark);
}

/* Buttons */
.btn {
  padding: 10px 22px; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-secondary { background: var(--cream-dark); color: var(--text-mid); }
.btn-secondary:hover { background: #cdd4e8; transform: scale(0.96); }
.btn-primary { background: var(--blue-dark); color: #fff; box-shadow: 0 2px 8px rgba(14,40,120,0.2); }
.btn-primary:hover { background: var(--blue-mid); transform: scale(0.96); box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(14,40,120,0.28); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; transform: scale(0.96); }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.confirm-text { font-size: 15px; color: var(--text-mid); line-height: 1.7; }

/* ------------------------------------------------------------
   11. ADMIN PANEL
   ------------------------------------------------------------ */
.admin-panel {
  position: fixed; inset: 0; z-index: 150;
  display: none; flex-direction: column; overflow: hidden;
  background: var(--cream);
}
.admin-panel.open { display: flex; }

.admin-bar {
  background: var(--blue-dark);
  border-bottom: 3px solid var(--gold);
  padding: 0 28px; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.admin-bar-title {
  font-family: "Playfair Display", serif; font-size: 20px;
  color: #fff; display: flex; align-items: center; gap: 10px;
}
.admin-badge {
  background: var(--gold); color: var(--blue-dark);
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.admin-bar-actions { display: flex; gap: 8px; }

.admin-body {
  flex: 1; overflow-y: auto; padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,184,0,0.25) transparent;
}
.admin-body::-webkit-scrollbar { width: 5px; }
.admin-body::-webkit-scrollbar-thumb { background: rgba(232,184,0,0.25); border-radius: 4px; }
.admin-inner { max-width: 1100px; margin: 0 auto; }

.admin-section-title { font-family: "Playfair Display", serif; font-size: 26px; font-weight: 600; color: var(--blue-dark); margin-bottom: 4px; }
.admin-section-sub   { font-size: 13px; color: var(--text-light); margin-bottom: 24px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--cream-dark); padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(14,40,120,0.08);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(14,40,120,0.14); }
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-light); margin-bottom: 8px; }
.stat-value { font-family: "Playfair Display", serif; font-size: 36px; font-weight: 600; color: var(--blue-dark); line-height: 1; }
.stat-note  { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.admin-table-wrap {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  box-shadow: 0 2px 10px rgba(14,40,120,0.08);
  overflow: hidden; margin-bottom: 26px;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--blue-dark); color: rgba(255,255,255,0.65);
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 12px 18px; text-align: left; white-space: nowrap;
}
.admin-table td {
  padding: 13px 18px; border-bottom: 1px solid var(--cream-dark);
  font-size: 13.5px; color: var(--text-mid); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f5f7fd; }

.tbl-app-cell { display: flex; align-items: center; gap: 12px; }
.tbl-thumb {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--cream-dark);
}
.tbl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-app-name { display: block; font-weight: 600; color: var(--text); }
.tbl-app-desc { font-size: 11.5px; color: var(--text-light); display: block; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.tbl-link { color: var(--blue); font-size: 12px; max-width: 200px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-link:hover { text-decoration: underline; }
.tbl-actions { display: flex; gap: 7px; }
.act-btn {
  padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit; transition: background 0.18s, transform 0.18s;
}
.act-btn.edit { background: rgba(26,63,173,0.09); color: var(--blue-dark); }
.act-btn.edit:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.act-btn.del  { background: rgba(220,38,38,0.09); color: #dc2626; }
.act-btn.del:hover  { background: #dc2626; color: #fff; transform: translateY(-1px); }

/* ------------------------------------------------------------
   12. TOAST
   ------------------------------------------------------------ */
.toast {
  position: fixed; bottom: 26px; right: 26px;
  background: #0e2878; color: #fff;
  padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500;
  border-left: 4px solid var(--gold);
  box-shadow: 0 8px 28px rgba(14,40,120,0.35);
  z-index: 999;
  transform: translateY(70px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.2,0.64,1);
  max-width: 300px; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ------------------------------------------------------------
   13. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  position: relative; z-index: 1;
  background: rgba(6, 14, 48, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.3);
  text-align: center; padding: 22px 24px;
  font-size: 12px; border-top: 3px solid var(--gold); letter-spacing: 0.3px;
}
.site-footer strong { color: var(--gold-light); }
.site-footer em     { font-style: italic; color: rgba(255,255,255,0.45); }

/* ------------------------------------------------------------
   14. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1280px) {
  .site-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
  .site-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --header-h:    110px;
    --catnav-h:    44px;
    --gold-strip-h: 3px;
    --header-full: 157px; /* 110 + 3 + 44 */
    --drawer-w:    260px;
  }
  .hamburger { display: flex; }
  .hdr-search { display: none; }
  .hdr-title span { display: none; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .logo-wrap img { height: 44px; }
  .drawer-toggle { display: none; }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .card-section { padding: 20px 16px 60px; }
  .admin-body { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row   { grid-template-columns: 1fr; }
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  :root {
    --header-h:    90px;
    --catnav-h:    42px;
    --header-full: 135px; /* 90 + 3 + 42 */
  }
  .btn-admin span { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .modal { border-radius: 16px; }
  .modal-head { padding: 18px 20px 14px; }
  .modal-body { padding: 18px 20px; }
  .modal-foot { padding: 0 20px 18px; }
  .admin-bar  { padding: 0 16px; }
  .admin-bar-title { font-size: 16px; }
  .site-grid { grid-template-columns: 1fr; }
}
