/* =========================================================
   R²N SOFTWARE SUPPORT CENTER — DESIGN SYSTEM
   Based on uat3.r2nsoftware.com (Official Theme Palette)
   Mobile-First & Fully Responsive
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Official Brand Colors from uat3.r2nsoftware.com */
  --r2n-blue-900: #00426A;
  --r2n-blue-800: #005a8f;
  --r2n-blue-600: #0085D5;
  --r2n-blue-500: #1f9ce4;
  --r2n-blue-300: #3AC5F7;
  --r2n-blue-100: #d4eaf9;
  --r2n-blue-50:  #eef6fc;
  --r2n-blue-25:  #f6fafd;

  /* Backward-compatible color aliases */
  --navy-900: var(--r2n-blue-900);
  --navy-800: var(--r2n-blue-800);
  --blue-600: var(--r2n-blue-600);
  --blue-500: var(--r2n-blue-500);
  --blue-400: var(--r2n-blue-300);

  /* Typography & Surface Tokens */
  --r2n-ink:    #16222c;
  --r2n-ink-2:  #3d4e5c;
  --r2n-ink-3:  #647383;
  --ink:        var(--r2n-ink);
  --ink-soft:   var(--r2n-ink-2);

  --r2n-line:   #dde5ec;
  --r2n-line-2: #c8d5df;
  --border:     var(--r2n-line);
  --bg:         #ffffff;
  --bg-soft:    var(--r2n-blue-25);
  --r2n-paper:  #ffffff;

  /* State Alerts */
  --danger:     #cf2e2e;
  --danger-bg:  #fdecea;
  --warn:       #b45309;
  --warn-bg:    #fff6e5;
  --ok:         #0d8a50;
  --ok-bg:      #e7f7ef;

  /* Layout & Elevation */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 66, 106, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 66, 106, 0.06);
  --shadow:    0 10px 30px rgba(0, 66, 106, 0.08), 0 2px 6px rgba(0, 66, 106, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(0, 66, 106, 0.12), 0 4px 12px rgba(0, 66, 106, 0.06);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--r2n-ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   TOP UTILITY BAR (uat3.r2nsoftware.com style)
   ========================================================= */
.site-utility {
  background: var(--r2n-blue-900);
  color: #cfe3f1;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-utility .utility-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 8px 24px;
  max-width: 1220px;
  margin: 0 auto;
}
.site-utility a {
  color: #cfe3f1;
  text-decoration: none;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.site-utility a:hover {
  color: #ffffff;
}
.site-utility .util-sep {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.22);
}
.site-utility .staff-link {
  color: var(--r2n-blue-300);
  font-weight: 500;
}
.site-utility .staff-link:hover {
  color: #ffffff;
}

/* =========================================================
   MAIN HEADER & NAVIGATION
   ========================================================= */
.site-nav {
  border-bottom: 1px solid var(--r2n-line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.site-nav .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1220px;
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
}
.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--r2n-blue-50);
  color: var(--r2n-blue-600);
  border: 1px solid var(--r2n-blue-100);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--r2n-ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--r2n-blue-600);
}
.nav-links a.active {
  color: var(--r2n-blue-600);
  font-weight: 600;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--r2n-blue-600);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.nav-cta .btn-check-status {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--r2n-ink-2);
  padding: 8px 16px;
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}
.nav-cta .btn-check-status:hover {
  color: var(--r2n-blue-600);
  border-color: var(--r2n-blue-300);
  background: var(--r2n-blue-50);
}
.nav-cta a.pill {
  background: var(--r2n-blue-600);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 133, 213, 0.28);
  transition: var(--transition);
}
.nav-cta a.pill:hover {
  background: var(--r2n-blue-800);
  box-shadow: 0 4px 12px rgba(0, 90, 143, 0.35);
  transform: translateY(-1px);
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 101;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-btn:hover {
  background: var(--r2n-blue-50);
}
.mobile-menu-btn .bar-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--r2n-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-menu-btn.active .bar-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active .bar-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active .bar-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.mobile-nav-panel {
  display: none;
  background: #ffffff;
  border-top: 1px solid var(--r2n-line);
  padding: 16px 20px 24px;
  box-shadow: 0 16px 30px rgba(0, 66, 106, 0.12);
  max-height: calc(100vh - 65px);
  overflow-y: auto;
}
.mobile-nav-panel.open {
  display: block;
  animation: mobileSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mobileSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-links {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.mobile-links li {
  border-bottom: 1px solid var(--r2n-line);
}
.mobile-links a {
  display: flex;
  align-items: center;
  padding: 13px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--r2n-ink-2);
  text-decoration: none;
}
.mobile-links a:hover,
.mobile-links a.active {
  color: var(--r2n-blue-600);
  font-weight: 600;
}
.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-btn {
  width: 100%;
  text-align: center;
  padding: 12px 18px;
  font-size: 14.5px;
  justify-content: center;
}
.btn-outline-dark {
  background: #ffffff;
  color: var(--r2n-ink);
  border: 1px solid var(--r2n-line-2);
}
.btn-outline-dark:hover {
  background: var(--r2n-blue-50);
  border-color: var(--r2n-blue-300);
  color: var(--r2n-blue-600);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  background: radial-gradient(circle at 85% 20%, rgba(58, 197, 247, 0.18), transparent 45%),
              linear-gradient(135deg, var(--r2n-blue-900) 0%, var(--r2n-blue-800) 55%, var(--r2n-blue-600) 100%);
  color: #ffffff;
  padding: 84px 0 76px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 12px;
  font-weight: 700;
  color: var(--r2n-blue-300);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 760px;
  color: #ffffff;
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.6;
  color: #d8e8f8;
  max-width: 660px;
  margin: 0 0 34px;
  font-weight: 400;
}
.hero .cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: inherit;
  min-height: 44px; /* Accessible touch target */
}
.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.btn-light {
  background: #ffffff;
  color: var(--r2n-blue-900);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.btn-light:hover {
  background: var(--r2n-blue-50);
  color: var(--r2n-blue-800);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--r2n-blue-600);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 133, 213, 0.3);
}
.btn-primary:hover {
  background: var(--r2n-blue-800);
  box-shadow: 0 4px 14px rgba(0, 90, 143, 0.35);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.btn-ghost {
  background: #ffffff;
  color: var(--r2n-ink-2);
  border-color: var(--r2n-line);
}
.btn-ghost:hover {
  background: var(--r2n-blue-50);
  color: var(--r2n-blue-600);
  border-color: var(--r2n-blue-300);
}

/* =========================================================
   STAT STRIP
   ========================================================= */
.stat-strip {
  background: var(--r2n-blue-900);
  color: #ffffff;
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-strip .grid-4 > div {
  padding: 6px 12px;
  border-left: 2px solid var(--r2n-blue-300);
}
.stat-strip strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.stat-strip span {
  color: #a9cded;
  font-size: 13.5px;
  font-weight: 400;
}

/* =========================================================
   SECTIONS & GRIDS
   ========================================================= */
section {
  padding: 72px 0;
}
section.alt {
  background: var(--r2n-blue-25);
  border-top: 1px solid var(--r2n-line);
  border-bottom: 1px solid var(--r2n-line);
}
.section-head {
  max-width: 680px;
  margin: 0 0 40px;
}
.section-head .kicker {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--r2n-blue-600);
  margin-bottom: 10px;
  display: inline-block;
}
.section-head h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--r2n-ink);
}
.section-head p {
  color: var(--r2n-ink-2);
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 24px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: #ffffff;
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--r2n-blue-300);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--r2n-blue-50);
  color: var(--r2n-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: var(--transition);
}
.card:hover .icon {
  background: var(--r2n-blue-600);
  color: #ffffff;
}
.card .icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--r2n-ink);
}
.card p {
  margin: 0;
  color: var(--r2n-ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.card a.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--r2n-blue-600);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}
.card a.card-link:hover {
  color: var(--r2n-blue-800);
  gap: 9px;
}

/* =========================================================
   FAQ SECTION
   ========================================================= */
.faq {
  max-width: 860px;
}
.faq details {
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.faq details:hover {
  border-color: var(--r2n-line-2);
}
.faq details[open] {
  border-color: var(--r2n-blue-300);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--r2n-ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  padding: 4px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--r2n-blue-600);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  content: "−";
  color: var(--r2n-blue-800);
}
.faq p {
  margin: 14px 0 0;
  color: var(--r2n-ink-2);
  font-size: 14.5px;
  line-height: 1.6;
  border-top: 1px solid var(--r2n-blue-50);
  padding-top: 12px;
}

/* =========================================================
   FORMS & INPUTS
   ========================================================= */
.form-card {
  background: #ffffff;
  border: 1px solid var(--r2n-line);
  border-top: 4px solid var(--r2n-blue-600);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--r2n-ink);
  margin-bottom: 7px;
}
.form-row .hint {
  font-weight: 400;
  color: var(--r2n-ink-3);
  font-size: 12.5px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--r2n-line-2);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--r2n-ink);
  background: #ffffff;
  transition: var(--transition);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--r2n-blue-600);
  box-shadow: 0 0 0 3px rgba(0, 133, 213, 0.16);
}
.form-row textarea {
  min-height: 120px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.hp-field { display: none; }

/* Custom file upload */
.form-row input[type="file"] {
  padding: 10px;
  background: var(--r2n-blue-25);
  cursor: pointer;
}

/* =========================================================
   ALERTS & STATUS PILLS
   ========================================================= */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 14.5px;
  margin-bottom: 20px;
  line-height: 1.5;
  word-break: break-word;
}
.alert-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #b7e8cd;
}
.alert-err {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f6c6c0;
}

.status-result {
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-new { background: var(--r2n-blue-50); color: var(--r2n-blue-600); border: 1px solid var(--r2n-blue-100); }
.pill-progress { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde2b4; }
.pill-waiting { background: #eef1f6; color: var(--r2n-ink-2); border: 1px solid #d9e0ea; }
.pill-resolved, .pill-closed { background: var(--ok-bg); color: var(--ok); border: 1px solid #bce6cf; }

/* Status timeline display */
.status-timeline {
  display: flex;
  margin-top: 24px;
  border-top: 1px solid var(--r2n-line);
  padding-top: 20px;
  flex-direction: column;
  gap: 14px;
}
.timeline-item {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--r2n-line);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--r2n-blue-600);
}
.timeline-time {
  font-size: 12px;
  color: var(--r2n-ink-3);
  margin-bottom: 2px;
}
.timeline-author {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--r2n-ink);
}
.timeline-body {
  font-size: 14px;
  color: var(--r2n-ink-2);
  margin-top: 4px;
}

/* =========================================================
   FOOTER (Official uat3.r2nsoftware.com style)
   ========================================================= */
footer.foot {
  background-color: #064568;
  color: #cfe3f1;
  padding: 60px 0 28px;
  font-size: 14px;
}
footer.foot .rail {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}
footer.foot .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
footer.foot .brand p {
  color: #9cbdd7;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 320px;
}
footer.foot .foot-logo {
  height: 40px;
  width: auto;
}
footer.foot h4 {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}
footer.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer.foot ul li {
  margin-bottom: 10px;
}
footer.foot a {
  color: #cfe3f1;
  text-decoration: none;
}
footer.foot a:hover {
  color: #ffffff;
  text-decoration: underline;
}
footer.foot .foot-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: #9cbdd7;
  font-size: 13px;
}

/* =========================================================
   ADMIN DASHBOARD
   ========================================================= */
.admin-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--r2n-line);
  padding: 12px 0;
}
.admin-nav .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}
.staff-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--r2n-blue-600);
  background: var(--r2n-blue-50);
  border: 1px solid var(--r2n-blue-100);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-left: 10px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.kpi {
  background: #ffffff;
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--r2n-blue-600);
}
.kpi strong {
  font-size: 28px;
  font-weight: 800;
  display: block;
  color: var(--r2n-ink);
}
.kpi span {
  color: var(--r2n-ink-3);
  font-size: 13px;
  font-weight: 500;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 26px 0 20px;
  border-bottom: 1px solid var(--r2n-line);
  padding-bottom: 12px;
}
.tabs button {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--r2n-ink-2);
  transition: var(--transition);
  font-family: inherit;
}
.tabs button:hover {
  background: var(--r2n-blue-50);
  color: var(--r2n-blue-600);
}
.tabs button.active {
  background: var(--r2n-blue-600);
  color: #ffffff;
}

.panel { display: none; }
.panel.active { display: block; }

.table-wrap, .table-container {
  background: #ffffff;
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 13px 16px;
  text-align: left;
  font-size: 13.5px;
  border-bottom: 1px solid var(--r2n-line);
}
th {
  background: var(--r2n-blue-25);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--r2n-ink-3);
  white-space: nowrap;
}
tr.overdue {
  background: #fff8f7;
}
tr.overdue td:first-child {
  border-left: 3px solid var(--danger);
}
tr:hover {
  background: var(--r2n-blue-25);
  cursor: pointer;
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filters select, .filters input {
  padding: 9px 13px;
  border: 1px solid var(--r2n-line-2);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--r2n-ink);
  background: #ffffff;
}
.filters input:focus, .filters select:focus {
  outline: none;
  border-color: var(--r2n-blue-600);
  box-shadow: 0 0 0 2px rgba(0, 133, 213, 0.15);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 490px;
  max-width: 94vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -10px 0 40px rgba(0, 30, 60, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 28px;
  z-index: 100;
}
.drawer.open { transform: translateX(0); }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 60, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 90;
}
.overlay.open { display: block; }

.note {
  border: 1px solid var(--r2n-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13.5px;
  background: #ffffff;
}
.note .meta {
  color: var(--r2n-ink-3);
  font-size: 12px;
  margin-bottom: 6px;
}
.login-wrap {
  max-width: 420px;
  margin: 80px auto;
}
.staff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--r2n-line);
}
.delivery-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: #eef1f6;
}
.delivery-tag.sent-live { background: var(--ok-bg); color: var(--ok); }
.delivery-tag.logged-only { background: var(--warn-bg); color: var(--warn); }


/* =========================================================
   RESPONSIVE MEDIA QUERIES (Mobile-First Optimization)
   ========================================================= */

/* Tablets & Small Laptops (< 980px) */
@media (max-width: 980px) {
  .nav-links, .nav-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .site-nav .bar {
    padding: 10px 20px;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Medium Tablets & Mobile Landscape (< 768px) */
@media (max-width: 768px) {
  .site-utility .utility-bar {
    justify-content: center;
    gap: 14px;
    padding: 6px 16px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .site-utility .util-sep {
    height: 11px;
  }
  
  .container {
    padding: 0 16px;
  }
  section {
    padding: 48px 0;
  }
  .section-head {
    margin-bottom: 28px;
  }
  .section-head h2 {
    font-size: 26px;
  }
  .section-head p {
    font-size: 14.5px;
  }

  /* Hero */
  .hero {
    padding: 52px 0 44px;
  }
  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 14px;
  }
  .hero p.lead {
    font-size: 15.5px;
    margin-bottom: 24px;
  }
  .hero .cta-row {
    flex-direction: column;
    gap: 12px;
  }
  .hero .cta-row .btn {
    width: 100%;
  }

  /* Stats */
  .stat-strip {
    padding: 20px 0;
  }
  .stat-strip .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }
  .stat-strip strong {
    font-size: 20px;
  }
  .stat-strip span {
    font-size: 12px;
  }

  /* Forms & inputs */
  .form-card {
    padding: 24px 18px;
    border-radius: var(--radius);
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-row input,
  .form-row select,
  .form-row textarea {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 12px 14px;
    min-height: 46px;
  }
  .form-row textarea {
    min-height: 100px;
  }

  /* FAQ */
  .faq details {
    padding: 14px 16px;
  }
  .faq summary {
    font-size: 14.5px;
  }
  .faq p {
    font-size: 14px;
  }

  /* Footer */
  footer.foot {
    padding: 44px 0 24px;
  }
  footer.foot .foot-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
  }
  footer.foot .foot-base {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  footer.foot .foot-base div[style*="display:flex"] {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Admin */
  .admin-wrapper {
    padding: 18px 14px 44px;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .kpi {
    padding: 14px;
  }
  .kpi strong {
    font-size: 22px;
  }
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }
  .tabs button {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
  }
  .filters {
    flex-direction: column;
    gap: 10px;
  }
  .filters input, .filters select, .filters button {
    width: 100%;
  }
  .table-container table {
    min-width: 650px;
  }
  .drawer {
    width: 100vw;
    max-width: 100vw;
    padding: 22px 18px;
  }
}

/* Small Smart Phones (< 520px) */
@media (max-width: 520px) {
  .site-utility a:nth-child(2),
  .site-utility a:nth-child(3),
  .site-utility .util-sep:first-of-type {
    display: none;
  }
  .site-nav .bar {
    padding: 10px 14px;
    gap: 12px;
  }
  .brand img {
    height: 32px;
  }
  .brand-badge {
    display: none;
  }
  .hero {
    padding: 44px 0 36px;
  }
  .hero h1 {
    font-size: 26px;
    line-height: 1.25;
  }
  .hero .eyebrow {
    font-size: 11px;
    padding: 4px 10px;
    margin-bottom: 14px;
  }
  .stat-strip .grid-4 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .grid-4, .grid-3 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px 16px;
  }
  .form-card {
    padding: 20px 14px;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .login-wrap {
    margin: 40px auto;
    padding: 0 16px;
  }
}
