:root {
  --ink: #0b1f26;
  --muted: #5a6a72;
  --primary: #114b5f;
  --primary-dark: #0b3442;
  --accent: #e09f3e;
  --surface: #f6f7f8;
  --surface-strong: #eef2f4;
  --line: #d7dee2;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(11, 31, 38, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 75, 95, 0.04) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(180deg, rgba(17, 75, 95, 0.03) 1px, transparent 1px) 0 0 / 60px 60px,
    var(--surface);
  line-height: 1.6;
}

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

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

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.admin .container {
  width: min(1320px, 94vw);
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(246, 247, 248, 0.96);
  border-bottom: 1px solid rgba(215, 222, 226, 0.6);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #1f6d81);
  color: var(--white);
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  letter-spacing: 1px;
}

.logo-text {
  font-size: 16px;
}

.nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
  color: var(--muted);
}

.nav a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 600;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(17, 75, 95, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--primary);
  background: var(--white);
}

.btn-ghost:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(17, 75, 95, 0.08);
}

.btn-danger {
  border-color: #f0c5c5;
  color: #a33838;
  background: var(--white);
}

.btn-danger:hover {
  border-color: #d88080;
  box-shadow: 0 10px 24px rgba(163, 56, 56, 0.12);
}

.hero {
  padding: 72px 0 64px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  margin: 16px 0 20px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-badges span {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  background: transparent;
  border-radius: 20px;
  padding: 0;
}

.hero-stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.stat {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.hero-form {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
  border: 1px solid rgba(17, 75, 95, 0.12);
}

.hero-form h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.form-alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}

.form-alert.success {
  background: rgba(16, 120, 85, 0.08);
  border-color: rgba(16, 120, 85, 0.2);
  color: #0f5132;
}

.form-alert.error {
  background: rgba(185, 28, 28, 0.08);
  border-color: rgba(185, 28, 28, 0.2);
  color: #7f1d1d;
}

form {
  display: grid;
  gap: 16px;
}

label {
  font-size: 14px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(17, 75, 95, 0.2);
  border-color: var(--primary);
  background: var(--white);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

section {
  padding: 72px 0;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 32px;
  font-family: "DM Serif Display", serif;
}

.section-head p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid rgba(224, 159, 62, 0.7);
  box-shadow: 0 12px 28px rgba(11, 31, 38, 0.08);
  position: relative;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
}

.pricing {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pricing .section-head p {
  color: var(--muted);
}

.pricing-list {
  display: grid;
  gap: 16px;
}

.pricing-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-link h3 {
  margin-bottom: 6px;
}

.pricing-link p {
  color: var(--muted);
}

.pricing-link:hover {
  border-color: rgba(17, 75, 95, 0.4);
  box-shadow: 0 18px 40px rgba(11, 31, 38, 0.12);
  transform: translateY(-2px);
}

.pricing-cta {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.references {
  background: var(--surface-strong);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.brands {
  padding: 36px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brands-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-tags span {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 13px;
}

.quote {
  background: var(--white);
  border-radius: 18px;
  padding: 22px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 20px rgba(11, 31, 38, 0.08);
}

.quote blockquote {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge-list span {
  background: var(--surface-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}

.service-area {
  background: var(--white);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(11, 31, 38, 0.08);
}

.service-area ul {
  list-style: none;
  color: var(--muted);
  display: grid;
  gap: 6px;
  margin: 12px 0 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.contact-card {
  background: var(--white);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  margin-top: 16px;
  box-shadow: 0 8px 20px rgba(11, 31, 38, 0.06);
}

.social-links {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.social-links a {
  color: var(--primary);
  font-weight: 600;
}

.map-section {
  background: var(--surface-strong);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.map-frame {
  height: 360px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(11, 31, 38, 0.08);
  position: relative;
  z-index: 0;
}

.map-frame .leaflet-container {
  z-index: 0;
}

.map-note {
  margin-top: 12px;
}

.contact-aside {
  background: var(--surface-strong);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-action {
  margin-top: 18px;
}

.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.site-footer a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  margin: 6px 0;
}

.footer-bottom {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.subpage-hero {
  padding: 64px 0 32px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
}

.subpage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pricing-detail {
  padding: 24px 0 72px;
}

.table-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(11, 31, 38, 0.08);
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.table-row span:last-child {
  text-align: right;
  color: var(--ink);
  font-weight: 600;
}

.table-row:last-child {
  border-bottom: none;
}

.table-head {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
}

.note-card {
  background: var(--surface-strong);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  color: var(--muted);
}

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

.blog-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(11, 31, 38, 0.08);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(11, 31, 38, 0.08);
  text-align: center;
}

.cert-card img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  max-height: 280px;
}

.cert-zoom {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 100%;
}

.cert-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 16, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.cert-modal.open {
  display: flex;
}

.cert-modal-content {
  background: var(--white);
  border-radius: 18px;
  padding: 20px;
  max-width: 920px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 60px rgba(11, 31, 38, 0.25);
  text-align: center;
}

.cert-modal-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

.cert-modal-content p {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cert-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 22px;
  cursor: pointer;
}

.cert-card figcaption {
  margin-top: 12px;
  font-weight: 600;
  color: var(--muted);
}

.blog-image {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 16px;
  object-fit: cover;
  max-height: 240px;
}

.article-image {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 16px;
  object-fit: cover;
  max-height: 360px;
}

.article-content {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(11, 31, 38, 0.08);
  margin-bottom: 20px;
  color: var(--ink);
}

.article-content h2,
.article-content h3 {
  margin-top: 20px;
}

.faq-list {
  display: grid;
  gap: 18px;
}

.faq-item {
  background: var(--white);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--line);
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
}

.admin-overlay {
  display: none;
}

.admin-nav {
  background: var(--white);
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 22px;
  position: sticky;
  top: 20px;
  height: fit-content;
  box-shadow: 0 16px 32px rgba(11, 31, 38, 0.06);
}

.admin-brand {
  display: grid;
  gap: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-brand small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.admin-nav-group {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.nav-title {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
}

.nav-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.admin-logout {
  margin-top: 20px;
  display: inline-flex;
  justify-content: center;
}

.admin-main {
  background: var(--white);
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(11, 31, 38, 0.08);
  overflow: hidden;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.admin-title h1 {
  margin-top: 6px;
}

.admin-top-actions {
  display: flex;
  gap: 10px;
}

.admin-body {
  padding: 24px 28px 32px;
}

.event-detail {
  padding: 20px;
}

.event-detail .table-card,
.event-detail .note-card {
  padding: 18px;
}

.event-detail .table-card .card-header {
  padding: 0 0 12px;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  gap: 10px;
}

.status-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.status-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.status-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.stat-value {
  font-size: 28px;
  color: var(--ink);
}

.stat-meta {
  font-size: 12px;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
}

.admin-grid.single,
.admin-grid.full {
  grid-template-columns: 1fr;
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-inline {
  margin-top: 10px;
}

.inline-discount {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.inline-discount label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.inline-input {
  width: 72px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 13px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inventory-table .card-header {
  padding: 12px 12px 0;
}

.admin .note-card {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(11, 31, 38, 0.06);
  margin: 0 0 24px;
}

.admin .table-card {
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(11, 31, 38, 0.06);
}

.admin-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  z-index: 350;
}

.admin-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.link-muted {
  color: var(--primary);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  background: var(--surface-strong);
  color: var(--muted);
}

.status-badge.new {
  background: rgba(224, 159, 62, 0.18);
  color: #8a5c12;
}

.status-badge.in_progress {
  background: rgba(17, 75, 95, 0.16);
  color: #114b5f;
}

.status-badge.resolved {
  background: rgba(16, 120, 85, 0.16);
  color: #0f5132;
}

.device-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.device-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.device-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.device-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.device-notes {
  grid-column: 1 / -1;
}

.status-danger {
  color: #a13c2d;
  font-weight: 600;
}

.icon-btn {
  border: none;
  background: var(--surface);
  color: var(--primary);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
}

.icon-btn i {
  pointer-events: none;
}

.field-with-action {
  display: grid;
  gap: 8px;
}

.item-section {
  display: grid;
  gap: 10px;
}

.item-suggestions {
  display: grid;
  gap: 8px;
}

.suggestion-btn {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.item-selected {
  margin-top: 12px;
}

.item-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 1.6fr 0.6fr 0.5fr 0.5fr 0.6fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.item-title {
  font-weight: 600;
}

.item-price {
  font-size: 12px;
  color: var(--muted);
}

.item-remove {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #9a2b2b;
  border-radius: 10px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e57373;
  color: #fff;
  font-size: 12px;
  margin-left: 6px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.calendar-card {
  overflow: hidden;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-head {
  padding: 8px 0;
  font-weight: 600;
  color: var(--muted);
}

.calendar-head div {
  text-align: center;
}

.calendar-cell {
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 90px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: var(--white);
}

.calendar-cell.muted {
  opacity: 0.5;
}

.calendar-cell.drop-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(17, 75, 95, 0.2);
}

.calendar-date {
  font-size: 12px;
  color: var(--muted);
}

.calendar-event {
  border: none;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  background: #1f6d81;
}

.calendar-event.status-done {
  background: #2c7a4b;
}

.calendar-event.status-in_progress {
  background: #d39f3d;
}

.calendar-event.status-canceled {
  background: #7a8a92;
}

.calendar-title {
  font-weight: 600;
  color: var(--ink);
  min-width: 160px;
  text-align: center;
}

.week-header {
  display: grid;
  grid-template-columns: 70px repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 0;
  color: var(--muted);
  font-weight: 600;
}

.week-time-head {
  text-align: right;
  padding-right: 8px;
}

.week-day-head {
  text-align: center;
}

.week-body {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
}

.week-times {
  display: flex;
  flex-direction: column;
}

.week-time {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  padding-right: 8px;
  border-bottom: 1px solid var(--line);
}

.week-cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.week-col {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}

.week-col::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 48px;
  opacity: 0.6;
  pointer-events: none;
}

.week-event {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  color: #fff;
  background: #1f6d81;
  cursor: pointer;
  z-index: 2;
}

.week-event.status-done {
  background: #2c7a4b;
}

.week-event.status-in_progress {
  background: #d39f3d;
}

.week-event.status-canceled {
  background: #7a8a92;
}

.item-head {
  background: var(--surface-strong);
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 640px) {
  .item-row {
    grid-template-columns: 1fr 1fr;
  }
}

.data-search {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--white);
  font-size: 13px;
  min-width: 220px;
}

.data-table {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
}

.data-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr 0.6fr 0.6fr 1fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  min-width: 880px;
}

.data-row input,
.data-row select {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
}

.data-head {
  background: var(--surface-strong);
  font-weight: 600;
}

.data-head span {
  color: var(--muted);
}

.data-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.inventory-wrap {
  display: grid;
  gap: 16px;
}

.inventory-categories {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 16px;
}

.inventory-categories strong {
  display: block;
  margin-bottom: 10px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.category-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.category-form {
  display: grid;
  gap: 8px;
}

.category-form input {
  font-size: 13px;
  padding: 8px 10px;
}

.inventory-table {
  width: 100%;
}

.map-card {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 14px 28px rgba(11, 31, 38, 0.06);
}

.admin-map {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.ac {
  background: #1f6d81;
}

.legend-dot.heat {
  background: #2c7a4b;
}

.legend-dot.other {
  background: #7a8a92;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 220;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 38, 0.55);
}

.modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 20px;
  width: min(620px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 1;
}

.modal-dialog.wide {
  width: min(880px, 96vw);
}

.modal-dialog.modal-large {
  width: min(860px, 94vw);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-close {
  border: none;
  background: var(--surface);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
}

.admin-form.compact {
  display: grid;
  gap: 8px;
}

.checkbox-grid {
  display: grid;
  gap: 8px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.editor-toolbar button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
}

.editor {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--white);
}

.editor-source {
  display: none;
}

.pagination {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  color: var(--muted);
}

.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

@media (max-width: 980px) {
  .hero-grid,
  .card-grid,
  .pricing-list,
  .quote-grid,
  .about-grid,
  .contact-grid,
  .blog-grid,
  .cert-grid,
  .footer-grid,
  .subpage-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: fixed;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: min(280px, 84vw);
    transform: translateX(-120%);
    transition: transform 0.25s ease;
    z-index: 300;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100dvh - 32px);
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .admin-layout.nav-open .admin-nav {
    transform: translateX(0);
  }

  .admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 38, 0.35);
    z-index: 200;
    display: none;
  }

  .admin-layout.nav-open .admin-overlay {
    display: block;
  }

  .admin-nav-toggle {
    display: inline-flex;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .data-row {
    grid-template-columns: 1fr 1fr;
  }

  .data-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 14px;
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 18px 36px rgba(11, 31, 38, 0.12);
    min-width: 220px;
    z-index: 20;
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 640px) {
  .admin-map {
    height: 320px;
  }

  .admin-topbar {
    padding: 16px 18px;
  }

  .admin-body {
    padding: 18px;
  }

  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-top-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .device-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal {
    align-items: flex-start;
    padding: 16px;
  }

  .modal-dialog {
    width: 100%;
    max-height: calc(100dvh - 32px);
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-cell {
    min-height: 70px;
    padding: 6px;
  }

  .calendar-event {
    font-size: 11px;
  }

  #events-week {
    overflow-x: auto;
  }

  .week-header,
  .week-body {
    min-width: 720px;
  }

  .admin-title .lead {
    font-size: 14px;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 18px;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .btn-cta {
    display: none;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .hero-form {
    padding: 24px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .pricing-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-frame {
    height: 280px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .table-row span:last-child {
    text-align: left;
  }
}
