/* ==================================================================
   เทศบาลตำบลโพหัก — E-Service
   Design tokens: Modern Government / Clean / Minimal / Premium
   ================================================================== */

:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --secondary: #43A047;
  --accent: #81C784;
  --bg: #F7FFF7;
  --card: #FFFFFF;
  --gold: #E8D8A6;
  --text-main: #1D2B1E;
  --text-muted: #5B6B5C;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 8px 30px rgba(46, 125, 50, 0.12);
  --shadow-hover: 0 14px 40px rgba(46, 125, 50, 0.20);
  --font-th: 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, sans-serif;
  --header-height: 80px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-th);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------
   Header — no menu, no navbar, just brand
   --------------------------------------------------------------- */
.site-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 125, 50, 0.10);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 1.05rem; color: var(--primary-dark); }
.brand-text small { font-size: 0.8rem; color: var(--text-muted); }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(129, 199, 132, 0.35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(67, 160, 71, 0.25), transparent 45%),
    var(--bg);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
  animation: float 10s ease-in-out infinite;
}
.hero::before {
  width: 260px; height: 260px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -60px; left: -60px;
}
.hero::after {
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
  bottom: -80px; right: -80px;
  animation-delay: 2s;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(129, 199, 132, 0.18);
  color: var(--primary-dark);
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--primary-dark);
  margin: 0 0 14px;
  font-weight: 800;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 36px;
}

/* Big single CTA button */
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 22px 52px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(27, 94, 32, 0.35), 0 0 0 0 rgba(129, 199, 132, 0.7);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
}
.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(27, 94, 32, 0.45), 0 0 0 10px rgba(129, 199, 132, 0.25);
}
.btn-cta:active { transform: translateY(-1px) scale(0.98); }
.btn-cta .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}
.hero-subnote {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(160deg, var(--primary-dark), #143d17);
  color: #E7F4E8;
  padding: 48px 24px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.footer-contact { width: 100%; }
.footer-client-brand { display: flex; align-items: center; justify-content: center; min-height: 130px; }
.footer-client-brand img {
  width: 225px;
  height: 45px;
  max-width: 100%;
  object-fit: contain;
  opacity: .92;
}
.footer-col h3 {
  font-size: 1rem;
  color: var(--gold);
  margin: 0 0 12px;
  font-weight: 600;
}
.footer-col p { margin: 0 0 8px; font-size: 0.92rem; color: #D9EAD9; }
.footer-col a { transition: color 0.2s ease; }
.footer-col a:hover { color: var(--gold); }
.map-frame { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); }
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #B9D6BA;
}
.developed-by a { color: var(--gold); font-weight: 600; }
.developed-by a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-client-brand { min-height: 90px; justify-content: flex-start; }
}

/* ---------------------------------------------------------------
   Generic page shell (used by services/form/status/pages other than homepage)
   --------------------------------------------------------------- */
.page-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.page-heading { text-align: center; margin-bottom: 40px; }
.page-heading h1 { color: var(--primary-dark); font-size: 2rem; margin: 0 0 10px; }
.page-heading p { color: var(--text-muted); margin: 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 24px;
}
.back-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Service cards grid
   --------------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(46,125,50,0.06);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(46,125,50,0.18);
}
.service-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 8px 18px rgba(67,160,71,0.35);
}
.service-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--text-main); }
.service-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* ---------------------------------------------------------------
   Step Form
   --------------------------------------------------------------- */
.form-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 36px;
}
@media (max-width: 600px) { .form-card { padding: 24px 18px; } }

.progress-track {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}
.progress-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.progress-step .dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #E3EEE3;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 2px solid #E3EEE3;
}
.progress-step.active .dot,
.progress-step.done .dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.progress-step span.label { font-size: 0.78rem; color: var(--text-muted); }
.progress-step::after {
  content: '';
  position: absolute;
  top: 17px; right: -50%;
  width: 100%; height: 2px;
  background: #E3EEE3;
  z-index: -1;
}
.progress-step:last-child::after { display: none; }
.progress-step.done::after { background: var(--primary); }

.form-step { display: none; animation: fadeIn 0.35s ease; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-group .req { color: #C62828; }
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #DCEBDC;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-family: inherit;
  background: #FBFFFB;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(46,125,50,0.12);
}
.form-control.is-invalid { border-color: #C62828; }
.field-error { color: #C62828; font-size: 0.82rem; margin-top: 4px; display: none; }
.field-error.show { display: block; }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Dropzone */
.dropzone {
  border: 2px dashed #BFE0BF;
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  background: #FBFFFB;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone.dragover { border-color: var(--primary); background: rgba(129,199,132,0.10); }
.dropzone i { font-size: 1.8rem; color: var(--secondary); margin-bottom: 8px; }
.file-preview-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.file-preview-item {
  display: flex; align-items: center; gap: 8px;
  background: #EAF6EA; border-radius: 12px; padding: 8px 12px; font-size: 0.85rem;
}
.file-preview-item button { border: none; background: none; color: #C62828; cursor: pointer; font-size: 0.9rem; }

.form-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }
.btn {
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(46,125,50,0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: rgba(46,125,50,0.06); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.autosave-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 14px; }

/* ---------------------------------------------------------------
   Status check + timeline
   --------------------------------------------------------------- */
.status-search { display: flex; gap: 12px; margin-bottom: 32px; }
@media (max-width: 560px) { .status-search { flex-direction: column; } }
.status-result { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 32px; }
.status-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.status-header h2 { margin: 0; font-size: 1.2rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.badge-pending { background: #FFF3CD; color: #8A6D00; }
.badge-reviewing { background: #D6EAFE; color: #0B5ED7; }
.badge-approved { background: #DFF3E1; color: var(--primary-dark); }
.badge-rejected { background: #FBDADA; color: #B02A2A; }
.badge-completed { background: #E1E9FF; color: #3730A3; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li {
  position: relative;
  padding-left: 36px;
  padding-bottom: 28px;
  border-left: 2px solid #E3EEE3;
  margin-left: 10px;
}
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -11px; top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #E3EEE3;
  border: 3px solid #fff;
}
.timeline li.active::before { background: var(--primary); }
.timeline .t-title { font-weight: 700; margin-bottom: 2px; }
.timeline .t-time { font-size: 0.8rem; color: var(--text-muted); }
.timeline .t-note { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }

/* ---------------------------------------------------------------
   Skeleton loading
   --------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #EAF3EA 25%, #F5FBF5 37%, #EAF3EA 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 10px;
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------
   Utility: fade/slide reveal (works with AOS or plain IntersectionObserver)
   --------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------
   Admin (E-Office) shared shell — see admin/assets if extended further
   --------------------------------------------------------------- */
.admin-body { background: #F1F6F1; font-family: var(--font-th); margin: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--primary-dark), #12330F);
  color: #E7F4E8;
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand-mini { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 0 8px; }
.admin-sidebar .brand-mini img { width: 36px; height: 36px; border-radius: 8px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; color: #CFE6D0;
  margin-bottom: 4px; font-size: 0.92rem; transition: background 0.2s ease;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.10); color: #fff; }
.admin-main { flex: 1; padding: 28px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
@media (max-width: 1000px) { .admin-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff; border-radius: var(--radius-md); padding: 22px;
  box-shadow: var(--shadow-soft);
}
.stat-card .num { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); }
.stat-card .label { color: var(--text-muted); font-size: 0.86rem; }
.admin-table-wrap { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow: hidden; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.admin-table th, table.admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #EFF5EF; }
table.admin-table th { background: #F3FAF3; color: var(--primary-dark); font-weight: 700; }
table.admin-table tr:hover td { background: #FAFFFA; }

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(129,199,132,0.35), transparent 50%), var(--bg);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover); padding: 40px 32px; text-align: center;
}
.login-card img { width: 64px; margin: 0 auto 14px; }
.login-card h1 { font-size: 1.3rem; color: var(--primary-dark); margin: 0 0 6px; }
.login-card p.sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 26px; }
.login-client-brand { margin: 24px auto 0; padding-top: 18px; border-top: 1px solid #E7F0E7; }
.login-client-brand img { width: 225px; height: 45px; max-width: 100%; object-fit: contain; margin: 0 auto; opacity: .88; }

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}
.admin-filter-grid label,
.service-editor-grid label,
.inline-editor-form label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 5px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid #EFF5EF; }
.detail-table { width: 100%; font-size: .92rem; border-collapse: collapse; }
.detail-table th { width: 175px; text-align: left; color: var(--text-muted); font-weight: 500; vertical-align: top; }
.detail-table th, .detail-table td { padding: 7px 0; border-bottom: 1px solid #EFF5EF; }
.btn-danger-soft { background: #FBDADA; color: #B02A2A; }
.service-editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.service-editor-grid .wide { grid-column: 1 / -1; }
.inline-editor { display: inline-block; position: relative; }
.inline-editor summary { list-style: none; padding: 7px 11px; font-size: .8rem; }
.inline-editor summary::-webkit-details-marker { display: none; }
.inline-editor-form {
  position: absolute;
  right: 0;
  z-index: 20;
  width: min(360px, 78vw);
  background: #fff;
  border: 1px solid #DCEBDC;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-hover);
}
.inline-editor-form label { margin-bottom: 10px; }
@media (max-width: 1100px) { .admin-filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }
@media (max-width: 700px) {
  .admin-filter-grid, .service-editor-grid { grid-template-columns: 1fr; }
  .service-editor-grid .wide { grid-column: auto; }
  .detail-table th { width: 120px; }
}

/* E-Service Admin ใช้ธีมเฉพาะ แยกจากหน้าตา E-Office อย่างชัดเจน */
.es-admin-body {
  --primary: #1769aa;
  --primary-dark: #0b3f72;
  --secondary: #2589c9;
  --accent: #8ec9eb;
  --bg: #f3f8fc;
  --text-main: #172b3d;
  --text-muted: #617487;
  --shadow-soft: 0 8px 26px rgba(17, 76, 124, .10);
  --shadow-hover: 0 16px 42px rgba(17, 76, 124, .18);
  background: #eef5fb;
}
.es-admin-body .admin-sidebar {
  background: linear-gradient(180deg, #0b3f72 0%, #072a4d 100%);
  color: #eaf5ff;
}
.es-admin-body .admin-sidebar .brand-mini {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.es-admin-body .admin-sidebar .brand-mini img {
  background: #fff;
  padding: 3px;
}
.es-admin-body .admin-sidebar .brand-mini small { color: #b9daf1 !important; }
.es-admin-body .admin-nav a { color: #c9e3f5; }
.es-admin-body .admin-nav a:hover,
.es-admin-body .admin-nav a.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.es-admin-body .admin-main {
  background:
    radial-gradient(circle at 95% 0, rgba(142, 201, 235, .20), transparent 28rem),
    #eef5fb;
}
.es-admin-body .stat-card { border: 1px solid rgba(23, 105, 170, .08); }
.es-admin-body table.admin-table th { background: #edf6fc; }
.es-admin-body table.admin-table th,
.es-admin-body .admin-topbar h1 { color: #0b3f72 !important; }
.es-admin-body table.admin-table tr:hover td { background: #f7fbfe; }
.es-admin-body .admin-table-wrap { overflow-x: auto; }
.es-admin-login .login-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(142, 201, 235, .42), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 137, 201, .18), transparent 44%),
    #f3f8fc;
}
.es-admin-login .login-card { border-top: 5px solid #1769aa; }
.es-admin-login .login-client-brand { border-top-color: #dcebf5; }

@media (max-width: 900px) {
  .es-admin-body .admin-shell { flex-direction: column; }
  .es-admin-body .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 16px;
  }
  .es-admin-body .admin-sidebar .brand-mini { margin-bottom: 12px; }
  .es-admin-body .admin-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .es-admin-body .admin-nav a { white-space: nowrap; margin-bottom: 0; }
  .es-admin-body .admin-main { padding: 20px 16px; }
}

/* ==================================================================
   Modern UX refresh v3 — E-Service (teal public / blue admin)
   ================================================================== */
:root {
  --primary: #087f8c;
  --primary-dark: #07556b;
  --secondary: #0fa6a6;
  --accent: #9bded3;
  --bg: #f3f9fa;
  --card: #ffffff;
  --gold: #f4d58d;
  --text-main: #172b32;
  --text-muted: #60737a;
  --radius-lg: 23px;
  --radius-md: 16px;
  --shadow-soft: 0 9px 30px rgba(7, 85, 107, .09);
  --shadow-hover: 0 19px 48px rgba(7, 85, 107, .16);
  --header-height: 78px;
}

button,
input,
select,
textarea { font: inherit; }

button,
a,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid rgba(15, 166, 166, .30);
  outline-offset: 3px;
}

body {
  background:
    radial-gradient(circle at 100% 0, rgba(155, 222, 211, .20), transparent 28rem),
    var(--bg);
}

/* Public site */
.site-header {
  height: var(--header-height);
  border-bottom: 1px solid rgba(7, 85, 107, .09);
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 8px 28px rgba(7, 85, 107, .06);
}

.header-inner {
  max-width: 1240px;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  padding: 3px;
  object-fit: contain;
  border: 1px solid #dcecee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(7, 85, 107, .09);
}

.brand-text strong { color: var(--primary-dark); font-size: 1.03rem; }

.public-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  color: #3c5962;
  font-size: .88rem;
  font-weight: 700;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.public-nav a:hover {
  color: var(--primary-dark);
  background: #edf7f7;
  transform: translateY(-1px);
}

.public-nav i { color: var(--secondary); }

.hero {
  min-height: min(760px, calc(100vh - var(--header-height)));
  padding: 76px 20px 84px;
  background:
    radial-gradient(circle at 18% 16%, rgba(155, 222, 211, .55), transparent 35%),
    radial-gradient(circle at 84% 82%, rgba(48, 166, 190, .25), transparent 38%),
    linear-gradient(150deg, #f7fcfb 0%, #eef8fa 58%, #edf7f6 100%);
}

.hero::before {
  width: 290px;
  height: 290px;
  background: radial-gradient(circle, rgba(92, 208, 190, .42), transparent 70%);
}

.hero::after {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(17, 140, 172, .28), transparent 70%);
}

.hero-content { max-width: 780px; }

.hero-eyebrow {
  margin-bottom: 22px;
  padding: 8px 17px;
  border: 1px solid rgba(8, 127, 140, .14);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 7px 24px rgba(7, 85, 107, .07);
  letter-spacing: 0;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.16;
  letter-spacing: -.025em;
  color: #064d63;
}

.hero p {
  max-width: 650px;
  margin: 0 auto 34px;
  color: #587078;
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
}

.btn-cta,
.btn-cta-secondary {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 25px;
  border-radius: 16px;
  font-size: 1.04rem;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn-cta {
  background: linear-gradient(135deg, #0b8994, #07576e);
  box-shadow: 0 14px 30px rgba(7, 92, 111, .26);
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(7, 92, 111, .32);
}

.btn-cta-secondary {
  border: 1px solid rgba(7, 85, 107, .20);
  background: rgba(255, 255, 255, .88);
  color: var(--primary-dark);
  box-shadow: 0 10px 26px rgba(7, 85, 107, .10);
}

.btn-cta-secondary:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 15px 32px rgba(7, 85, 107, .15);
}

.hero-benefits {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-benefits span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(7, 85, 107, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .64);
  color: #526b73;
  font-size: .8rem;
  font-weight: 600;
}

.hero-benefits i { color: var(--secondary); }

.page-shell {
  max-width: 1120px;
  padding: 52px 20px 86px;
}

.page-heading { margin-bottom: 34px; }
.page-heading h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -.015em;
}

.back-link {
  min-height: 41px;
  padding: 8px 12px;
  border: 1px solid #dcebed;
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
}
.back-link:hover { background: #fff; text-decoration: none; }

.service-grid { gap: 18px; }
.service-card {
  position: relative;
  min-height: 235px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 22px;
  border: 1px solid rgba(7, 85, 107, .08);
  border-radius: 20px;
  overflow: hidden;
}

.service-card::after {
  content: '\f061';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 17px;
  bottom: 15px;
  color: rgba(7, 85, 107, .30);
  transition: transform .2s ease, color .2s ease;
}

.service-card:hover { transform: translateY(-5px); border-color: rgba(8, 127, 140, .22); }
.service-card:hover::after { transform: translateX(3px); color: var(--primary); }
.service-icon {
  width: 66px;
  height: 66px;
  background: linear-gradient(135deg, #3fc2b4, #087f8c);
  box-shadow: 0 10px 23px rgba(8, 127, 140, .24);
}

.form-card,
.status-result {
  border: 1px solid rgba(7, 85, 107, .08);
  border-radius: 21px;
}

.form-control {
  min-height: 49px;
  padding: 11px 14px;
  border: 1px solid #cbdee1;
  border-radius: 13px;
  background: #fbfdfd;
  color: var(--text-main);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.form-control:hover { border-color: #9fc5ca; }
.form-control:focus {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 166, 166, .12);
}

.btn {
  min-height: 43px;
  padding: 10px 16px;
  border-radius: 12px;
  line-height: 1.25;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0b8994, #075b70);
  box-shadow: 0 8px 18px rgba(7, 91, 112, .22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #087984, #064b5f);
  box-shadow: 0 11px 22px rgba(7, 91, 112, .28);
}
.btn-outline { background: #fff; border-color: #5daab0; }
.btn-outline:hover { background: #ecf8f8; border-color: var(--primary); }

.dropzone {
  border-radius: 16px;
  background: #f6fbfb;
}

.status-search {
  padding: 15px;
  border: 1px solid #dcebed;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.badge {
  min-height: 30px;
  padding: 5px 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.timeline li::before { box-shadow: 0 0 0 4px #eef7f7; }

/* Footer: client logo is vertically centered between contact and map. */
.site-footer {
  padding: 54px 24px 20px;
  background: linear-gradient(155deg, #07566a 0%, #063f50 62%, #052f3c 100%);
}

.footer-inner {
  max-width: 1240px;
  grid-template-columns: 1.05fr .9fr 1.15fr;
  gap: 34px;
  align-items: stretch;
}

.footer-brand-stack { gap: 20px; }
.footer-brand img {
  width: 58px;
  height: 58px;
  padding: 3px;
  object-fit: contain;
  border-radius: 15px;
  background: #fff;
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.footer-contact i { width: 18px; margin-top: 4px; color: #87dfd2; text-align: center; }

.footer-client-brand {
  min-height: 238px;
  display: grid;
  place-items: center;
  align-self: center;
}

.partner-logo-frame {
  width: min(100%, 290px);
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 17px 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 36px rgba(0, 24, 31, .18);
}

.partner-logo-frame span {
  color: #66767b;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.footer-client-brand .partner-logo-frame img {
  width: 225px;
  height: 45px;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
  opacity: 1;
}

.map-frame {
  border: 3px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 24, 31, .22);
}
.map-frame iframe { display: block; }

.footer-bottom {
  align-items: center;
  margin-top: 34px;
  padding-top: 18px;
}

.footer-bottom > p { margin: 0; }
.developed-by {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c8e1e4;
  font-size: .72rem;
}

.developed-by img {
  width: 170px;
  height: 34px;
  padding: 4px 8px;
  object-fit: contain;
  border-radius: 9px;
  background: rgba(255, 255, 255, .93);
}

/* Admin shell */
.es-admin-body {
  --primary: #176aa8;
  --primary-dark: #0a446f;
  --secondary: #228ec8;
  --accent: #a7d8ee;
  --bg: #f1f7fb;
  --text-main: #172b3c;
  --text-muted: #607587;
  --shadow-soft: 0 9px 30px rgba(12, 74, 119, .09);
  --shadow-hover: 0 18px 46px rgba(12, 74, 119, .16);
  background:
    radial-gradient(circle at 96% 1%, rgba(167, 216, 238, .34), transparent 28rem),
    #f1f7fb;
}

.es-admin-body .admin-shell { align-items: stretch; }
.es-admin-body .admin-sidebar {
  width: 274px;
  flex: 0 0 274px;
  height: 100vh;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  background: linear-gradient(165deg, #0b4f82 0%, #082f53 68%, #062640 100%);
  box-shadow: 14px 0 38px rgba(5, 41, 69, .16);
  z-index: 80;
}

.es-admin-body .admin-sidebar .brand-mini {
  min-height: 64px;
  margin: 0 0 24px;
  padding: 11px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 17px;
  background: rgba(255, 255, 255, .07);
}

.es-admin-body .admin-sidebar .brand-mini img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 11px;
}

.es-admin-body .admin-sidebar .brand-mini > div { min-width: 0; }
.es-admin-body .admin-sidebar .brand-mini strong { color: #fff; }
.es-admin-body .admin-sidebar .brand-mini small {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.es-admin-body .admin-nav { display: grid; gap: 7px; }
.es-admin-body .admin-nav a {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 600;
  line-height: 1.3;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.es-admin-body .admin-nav a i { width: 21px; text-align: center; }
.es-admin-body .admin-nav a:hover {
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, .09);
}
.es-admin-body .admin-nav a.active {
  background: linear-gradient(135deg, rgba(73, 171, 222, .38), rgba(255, 255, 255, .11));
  border-color: rgba(255, 255, 255, .19);
  box-shadow: inset 3px 0 0 #8bd5f5;
}

.es-admin-body .admin-main {
  min-width: 0;
  padding: 30px clamp(20px, 3vw, 42px) 44px;
  background: transparent;
}

.es-admin-body .admin-topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  min-height: 72px;
  margin-bottom: 26px;
  padding: 12px 16px;
  border: 1px solid rgba(23, 106, 168, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .89);
  box-shadow: 0 10px 32px rgba(12, 74, 119, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-heading-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.es-admin-body .admin-topbar h1 {
  margin: 0;
  color: var(--primary-dark) !important;
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  line-height: 1.35;
}

.admin-kicker {
  margin-bottom: 1px;
  color: var(--secondary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.admin-user {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #d9e8f2;
  border-radius: 999px;
  background: #f7fbfe;
  color: #4b687d;
  font-size: .88rem;
  font-weight: 600;
}
.admin-user i { color: var(--primary); font-size: 1.05rem; }

.mobile-menu-toggle,
.sidebar-close,
.sidebar-backdrop { display: none; }

.es-admin-body .admin-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 24px;
}

.es-admin-body .stat-card {
  border: 1px solid rgba(23, 106, 168, .09);
  border-radius: 19px;
  box-shadow: var(--shadow-soft);
}

.es-admin-body .admin-cards .stat-card {
  position: relative;
  min-height: 126px;
  padding: 22px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.es-admin-body .admin-cards .stat-card::after {
  content: '';
  position: absolute;
  width: 84px;
  height: 84px;
  right: -27px;
  bottom: -33px;
  border-radius: 50%;
  background: rgba(34, 142, 200, .09);
}
.es-admin-body .admin-cards .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.es-admin-body .stat-card .num {
  margin-bottom: 4px;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.15;
}
.es-admin-body .stat-card .label { display: flex; align-items: center; gap: 7px; line-height: 1.45; }
.es-admin-body .stat-card .label i { color: var(--secondary); }

.es-admin-body .admin-table-wrap {
  border: 1px solid rgba(23, 106, 168, .09);
  border-radius: 19px;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
  scrollbar-color: #a9c9dc transparent;
}
.es-admin-body table.admin-table { min-width: 820px; font-size: .9rem; }
.es-admin-body table.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 15px 17px;
  background: #eaf4fa;
  color: #0c4a73 !important;
  white-space: nowrap;
}
.es-admin-body table.admin-table td { padding: 15px 17px; vertical-align: middle; }
.es-admin-body table.admin-table tbody tr:last-child td { border-bottom: 0; }

.es-admin-body .btn-primary {
  background: linear-gradient(135deg, #2388c2, #17639d);
  box-shadow: 0 8px 18px rgba(23, 99, 157, .24);
}
.es-admin-body .btn-primary:hover {
  background: linear-gradient(135deg, #1a78ae, #0f5286);
  box-shadow: 0 11px 22px rgba(23, 99, 157, .30);
}
.es-admin-body .btn-outline { color: var(--primary); border-color: #78afd2; }
.es-admin-body .btn-outline:hover { background: #edf6fc; border-color: var(--primary); }
.es-admin-body .form-control { border-color: #cddfe9; background: #fbfdff; }
.es-admin-body .form-control:hover { border-color: #9fc2d7; }
.es-admin-body .form-control:focus {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(34, 142, 200, .12);
}

.admin-filter-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 13px;
}
.admin-filter-grid > div:first-child { grid-column: span 2; }
.filter-actions { align-items: center; }
.export-actions { border-color: #e5eef4; }

.table-actions {
  min-width: 142px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.table-actions form { margin: 0; }

.inline-editor-form {
  max-height: min(620px, 72vh);
  overflow-y: auto;
  border-color: #cbdfe9;
  border-radius: 17px;
  box-shadow: 0 18px 48px rgba(12, 74, 119, .20);
}

.detail-table th,
.detail-table td { padding: 9px 0; }

.btn-danger-soft {
  border: 1px solid #f2c7c7;
  background: #fff0f0;
  color: #a82f2f;
}
.btn-danger-soft:hover { background: #fde3e3; }

/* Admin login */
.es-admin-login .login-page {
  padding: 28px 18px;
  background:
    radial-gradient(circle at 12% 16%, rgba(167, 216, 238, .52), transparent 32rem),
    radial-gradient(circle at 92% 88%, rgba(34, 142, 200, .17), transparent 30rem),
    #f1f7fb;
}

.es-admin-login .login-card {
  max-width: 450px;
  padding: 38px 38px 30px;
  border: 1px solid rgba(23, 106, 168, .10);
  border-top: 5px solid #176aa8;
  border-radius: 25px;
  box-shadow: 0 24px 70px rgba(12, 74, 119, .18);
}

.login-emblem {
  width: 82px;
  height: 82px;
  margin: 0 auto 15px;
  padding: 6px;
  border: 1px solid #d6e7f1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(12, 74, 119, .12);
}
.login-card .login-emblem img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  border-radius: 16px;
}
.login-card h1 { font-size: 1.45rem; }
.login-card p.sub { margin: 5px 0 25px; line-height: 1.55; }
.login-form { text-align: left; }
.login-client-brand {
  display: grid;
  justify-items: center;
  gap: 11px;
  margin-top: 24px;
  padding-top: 18px;
}
.login-card .login-client-brand .client-logo,
.login-card .login-client-brand .developer-logo {
  width: 225px;
  height: 45px;
  margin: 0;
  object-fit: contain;
}
.login-card .login-client-brand .client-logo { opacity: .9; }
.login-card .login-client-brand .developer-logo { width: 190px; height: 38px; opacity: .82; }

@media (max-width: 1180px) {
  .es-admin-body .admin-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .admin-filter-grid > div:first-child { grid-column: span 2; }
}

@media (max-width: 900px) {
  body.nav-open { overflow: hidden; }
  .es-admin-body .admin-shell { display: block; }
  .es-admin-body .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 310px);
    height: 100vh;
    height: 100dvh;
    padding: 18px;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 22px 0 55px rgba(4, 34, 56, .32);
  }
  .nav-open .admin-sidebar { transform: translateX(0); }
  .es-admin-body .admin-sidebar .brand-mini { margin-bottom: 18px; }
  .es-admin-body .admin-nav { display: grid; overflow: visible; }
  .es-admin-body .admin-nav a { white-space: normal; }
  .sidebar-close {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 11px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    cursor: pointer;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    background: rgba(5, 28, 46, .54);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    transition: opacity .2s ease;
  }
  .nav-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .es-admin-body .admin-main { width: 100%; padding: 14px 14px 34px; }
  .es-admin-body .admin-topbar { top: 8px; min-height: 66px; margin-bottom: 20px; padding: 10px 12px; }
  .mobile-menu-toggle {
    display: flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d6e7f1;
    border-radius: 12px;
    background: #f1f7fb;
    color: var(--primary-dark);
    cursor: pointer;
  }
  .admin-user { width: 42px; height: 42px; justify-content: center; padding: 0; }
  .admin-user span { display: none; }
  .es-admin-body table.admin-table .btn,
  .es-admin-body table.admin-table summary.btn {
    display: inline-flex !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 9px 13px !important;
  }
  .two-col-admin { grid-template-columns: minmax(0, 1fr) !important; }
  .inline-editor-form { position: fixed; inset: 10vh 16px auto; width: auto; max-height: 78vh; }
}

@media (max-width: 760px) {
  .header-inner { padding-inline: 16px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-text small { display: none; }
  .public-nav { gap: 2px; }
  .public-nav a { padding: 9px 10px; }
  .public-nav a span { display: none; }
  .public-nav i { font-size: 1rem; }
  .hero { min-height: 650px; padding: 62px 16px 72px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-client-brand { min-height: 150px; justify-content: center; }
  .partner-logo-frame { min-height: 105px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 16px; }
}

@media (max-width: 700px) {
  .admin-filter-grid,
  .service-editor-grid { grid-template-columns: 1fr; }
  .admin-filter-grid > div:first-child { grid-column: auto; }
  .filter-actions,
  .export-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .export-actions .btn { flex: 1 1 140px; }
  .es-admin-body .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .es-admin-body .admin-cards .stat-card { min-height: 111px; padding: 18px; }
  .es-admin-body .stat-card { padding: 18px; }
  .status-search { flex-direction: column; }
  .status-search .btn { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-text strong { max-width: 145px; font-size: .86rem; line-height: 1.3; }
  .hero h1 { font-size: 2.25rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .btn-cta,
  .btn-cta-secondary { width: 100%; }
  .hero-benefits { align-items: stretch; flex-direction: column; }
  .hero-benefits span { justify-content: center; }
  .page-shell { padding-inline: 14px; }
  .form-card,
  .status-result { padding: 21px 17px; }
  .es-admin-body .admin-main { padding-inline: 10px; }
  .es-admin-body .admin-topbar h1 { font-size: 1.02rem; }
  .admin-kicker { font-size: .66rem; }
  .es-admin-body .admin-cards .stat-card { min-height: 106px; padding: 16px; }
  .es-admin-body .stat-card .num { font-size: 1.62rem; }
  .es-admin-body .stat-card .label { align-items: flex-start; font-size: .77rem; }
  .es-admin-login .login-card { padding: 32px 22px 26px; }
}

/* =================================================================
   eService v1.2.0 — categorized service picker + incident map
   ================================================================= */
.service-picker-page { max-width: 1180px; }
.service-picker-heading { max-width: 760px; margin-inline: auto; }
.service-picker-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 13px;
  border: 1px solid rgba(8, 127, 140, .14);
  border-radius: 999px;
  background: #eefafa;
  color: var(--primary);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.service-finder {
  position: relative;
  z-index: 4;
  margin-bottom: 38px;
  padding: 20px;
  border: 1px solid rgba(7, 85, 107, .09);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 42px rgba(7, 85, 107, .09);
}
.service-search {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  border: 1.5px solid #c9dfe2;
  border-radius: 16px;
  background: #fbfefe;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.service-search:focus-within {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 127, 140, .10);
}
.service-search > i { color: var(--primary); font-size: 1.05rem; }
.service-search input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 1rem;
}
.service-search input::placeholder { color: #82969c; }
.service-search button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #e9f5f5;
  color: var(--primary-dark);
  cursor: pointer;
}

.category-chips {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 2px 0 5px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.category-chip {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #d3e5e7;
  border-radius: 999px;
  background: #fff;
  color: #49636b;
  font: inherit;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}
.category-chip span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf5f6;
  color: #61767d;
  font-size: .72rem;
  text-align: center;
}
.category-chip:hover { transform: translateY(-1px); border-color: #83bdc3; }
.category-chip.is-active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #0a697d);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 127, 140, .20);
}
.category-chip.is-active span { background: rgba(255, 255, 255, .18); color: #fff; }

.service-category-list { display: grid; gap: 42px; }
.service-category-section[hidden],
.service-filter-card[hidden] { display: none !important; }
.service-category-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}
.service-category-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #dff8f5, #edf8fb);
  color: var(--primary);
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(8, 127, 140, .08);
}
.service-category-heading h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.22rem;
  line-height: 1.35;
}
.service-category-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: .8rem; }

.service-category-section .service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.service-category-section .service-card {
  min-height: 145px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 17px;
  padding: 21px;
  text-align: left;
  border-radius: 19px;
}
.service-category-section .service-card::after { display: none; }
.service-category-section .service-icon {
  width: 58px;
  height: 58px;
  margin: 0;
  font-size: 1.35rem;
}
.service-card-copy { min-width: 0; }
.service-card-category {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 800;
}
.service-category-section .service-card h3 { margin-bottom: 5px; line-height: 1.4; }
.service-category-section .service-card p { line-height: 1.55; }
.service-card-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf7f7;
  color: var(--primary);
  transition: transform .18s ease, background-color .18s ease;
}
.service-category-section .service-card:hover .service-card-arrow {
  transform: translateX(3px);
  background: var(--primary);
  color: #fff;
}
.service-empty-state {
  padding: 52px 20px;
  border: 1px dashed #bcd7da;
  border-radius: 22px;
  background: #fbfefe;
  text-align: center;
}
.service-empty-state > i { color: var(--primary); font-size: 2rem; }
.service-empty-state h2 { margin: 14px 0 7px; color: var(--primary-dark); font-size: 1.15rem; }
.service-empty-state p { margin: 0 0 18px; color: var(--text-muted); }

/* Interactive incident-location picker */
.location-picker-card {
  grid-column: 1 / -1;
  margin: 30px 0 24px;
  padding: 20px;
  border: 1px solid #cfe3e5;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfefe, #f5fbfb);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.location-picker-card.is-invalid {
  border-color: #d35454;
  box-shadow: 0 0 0 4px rgba(211, 84, 84, .09);
}
.location-picker-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 16px;
}
.location-picker-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffefe8, #fff7ec);
  color: #d95c28;
  font-size: 1.15rem;
}
.location-picker-heading h2 {
  margin: 1px 0 4px;
  color: var(--primary-dark);
  font-size: 1rem;
  line-height: 1.45;
}
.location-picker-heading p { margin: 0; color: var(--text-muted); font-size: .84rem; line-height: 1.55; }
.location-map-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.location-action-btn { min-height: 43px; padding: 9px 13px; font-size: .82rem; }
.location-map-status {
  flex: 1 1 220px;
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.5;
}
.incident-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 390px;
  border: 1px solid #bdd6d9;
  border-radius: 17px;
  background: #eaf2f2;
  overflow: hidden;
  touch-action: pan-x pan-y;
}
.incident-map .leaflet-control-attribution { font-size: 9px; }
.eservice-map-pin-wrap { background: transparent; border: 0; }
.eservice-map-pin {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #e94f37;
  font-size: 2.65rem;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .26));
  transform: translateY(-2px);
}
.eservice-map-pin i { line-height: 1; }
.location-coordinate-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #edf7f7;
  color: #597078;
  font-size: .78rem;
}
.location-coordinate-row strong {
  color: var(--primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: right;
  overflow-wrap: anywhere;
}
.location-note-group { margin: 17px 0 0; }
.field-hint { margin: 7px 0 0; color: var(--text-muted); font-size: .76rem; line-height: 1.5; }
.location-field-error { margin-top: 10px; }
.map-load-error {
  height: 100%;
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  color: #985126;
  background: #fff7ed;
  text-align: center;
  font-size: .85rem;
}

/* Admin category controls and pinned map */
.location-required-control,
.inline-checkbox {
  padding: 12px 14px;
  border: 1px solid #d6e7ef;
  border-radius: 13px;
  background: #f7fbfd;
}
.location-required-control label,
.inline-checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  margin: 0 !important;
  font-weight: 600 !important;
  line-height: 1.5;
}
.location-required-control input,
.inline-checkbox input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
.service-admin-table { min-width: 1120px !important; }
.admin-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf7fb;
  color: #155b85;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.admin-location-card {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #d1e4e6;
  border-radius: 17px;
  background: #f8fcfc;
}
.admin-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.admin-location-head h3 { margin: 0; color: var(--primary-dark); font-size: .95rem; }
.admin-location-head h3 i { color: #e15c35; margin-right: 5px; }
.admin-location-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font: .75rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.admin-location-map {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 13px;
  background: #eaf2f2;
}
.admin-location-note {
  margin-top: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #fff;
  color: #405960;
  font-size: .84rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .service-finder { padding: 14px; border-radius: 18px; }
  .service-search { min-height: 53px; padding-left: 14px; }
  .service-search input { height: 51px; font-size: .9rem; }
  .category-chips { margin-inline: -14px; padding-inline: 14px; }
  .service-category-list { gap: 34px; }
  .service-category-section .service-grid { grid-template-columns: 1fr; }
  .service-category-section .service-card {
    min-height: 128px;
    grid-template-columns: 52px minmax(0, 1fr) 30px;
    gap: 13px;
    padding: 17px;
  }
  .service-category-section .service-icon { width: 50px; height: 50px; font-size: 1.15rem; }
  .service-card-arrow { width: 30px; height: 30px; }
  .location-picker-card { margin-inline: -2px; padding: 15px; border-radius: 17px; }
  .incident-map { height: min(58vh, 420px); min-height: 320px; }
  .location-map-toolbar .location-action-btn { flex: 1 1 145px; }
  .location-map-status { flex-basis: 100%; }
  .location-coordinate-row { flex-direction: column; gap: 5px; }
  .location-coordinate-row strong { text-align: left; }
  .admin-location-head { align-items: flex-start; flex-direction: column; }
  .admin-location-head .btn { width: 100%; }
  .admin-location-map { height: 260px; }
}

@media (max-width: 420px) {
  .service-category-heading h2 { font-size: 1.05rem; }
  .service-category-section .service-card { grid-template-columns: 46px minmax(0, 1fr); }
  .service-category-section .service-icon { width: 46px; height: 46px; }
  .service-card-arrow { display: none; }
  .service-card-category { font-size: .65rem; }
  .incident-map { min-height: 300px; }
}
