:root {
  --ink: #1e293b;
  --muted: #64748b;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --sea: #087eab;
  --sea-pale: #e9f7fc;
  --orange: #e58418;
  --line: #dce4ec;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.admin-shell { display: grid; min-height: 100svh; grid-template-columns: 248px minmax(0, 1fr); transition: grid-template-columns 200ms ease; }
.sidebar-toggle { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-sidebar { display: flex; position: sticky; top: 0; height: 100svh; flex-direction: column; gap: 34px; border-right: 1px solid var(--line); padding: 22px 16px; background: var(--surface); }
.admin-brand { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.admin-brand > span:last-child { display: grid; gap: 1px; }
.admin-brand small, .admin-sidebar small { color: var(--muted); font-size: .75rem; font-weight: 700; }
.admin-brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 8px; color: #fff; background: var(--sea); font-size: .78rem; font-weight: 900; box-shadow: inset -5px 0 var(--orange); }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { display: flex; min-height: 42px; align-items: center; gap: 10px; border-radius: 7px; padding: 10px; color: var(--muted); font-size: .92rem; font-weight: 750; }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--sea); background: var(--sea-pale); }
.nav-icon { width: 18px; color: var(--orange); font-size: 1.12rem; text-align: center; }
.admin-public-link { margin-top: auto; color: var(--sea); font-size: .82rem; font-weight: 800; }
.admin-main { min-width: 0; }
.admin-topbar { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); padding: 22px clamp(20px, 4vw, 44px); background: rgba(255,255,255,.92); }
.menu-toggle { display: inline-grid; width: 40px; height: 40px; place-content: center; order: 2; gap: 4px; flex: none; margin-left: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.menu-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: var(--sea); transition: transform 180ms ease, opacity 180ms ease; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.admin-shell:has(.sidebar-toggle:checked) { grid-template-columns: 72px minmax(0, 1fr); }
.admin-shell:has(.sidebar-toggle:checked) .admin-sidebar { padding-right: 13px; padding-left: 13px; }
.admin-shell:has(.sidebar-toggle:checked) .admin-brand, .admin-shell:has(.sidebar-toggle:checked) .admin-nav a { justify-content: center; }
.admin-shell:has(.sidebar-toggle:checked) .admin-brand > span:last-child, .admin-shell:has(.sidebar-toggle:checked) .nav-label { display: none; }
.admin-shell:has(.sidebar-toggle:checked) .nav-icon { width: auto; }
.admin-shell:has(.sidebar-toggle:checked) .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.admin-shell:has(.sidebar-toggle:checked) .menu-toggle span:nth-child(2) { opacity: 0; }
.admin-shell:has(.sidebar-toggle:checked) .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.admin-topbar p, .panel-heading p { margin: 0; color: var(--orange); font-size: .74rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.admin-topbar h1, .panel-heading h2 { margin: 4px 0 0; font-size: 1.4rem; line-height: 1.15; }
.admin-content { display: grid; gap: 20px; padding: clamp(20px, 4vw, 44px); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.metrics article, .admin-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 30px rgba(30,41,59,.05); }
.metrics article { display: grid; gap: 5px; padding: 18px; }
.metrics span, .metrics small, td small, .field-help { color: var(--muted); }
.metrics span { font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.metrics strong { color: var(--sea); font-size: 1.55rem; }
.metrics small { font-size: .78rem; }
.admin-panel { padding: 20px; }
.summary-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.summary-panel p { margin: 0; color: var(--orange); font-size: .74rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.summary-panel h2 { margin: 5px 0 0; font-size: 1.1rem; }
.summary-panel > div > span { display: block; max-width: 38rem; margin-top: 6px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-button, .table-actions a, .table-actions button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; border: 1px solid var(--orange); border-radius: 7px; padding: 8px 13px; color: #fff; background: var(--orange); cursor: pointer; font-size: .85rem; font-weight: 800; }
.admin-button.is-secondary { border-color: rgba(8,126,171,.3); color: var(--sea); background: transparent; }
.product-list { display: grid; }
.product-list a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding: 15px 4px; }
.product-list span { color: var(--muted); font-size: .88rem; }
.product-list b { color: var(--sea); font-size: .82rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 9px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .74rem; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 2px; font-size: .78rem; }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.table-actions form { margin: 0; }
.table-actions a { border-color: rgba(8,126,171,.25); color: var(--sea); background: var(--sea-pale); }
.table-actions button { border-color: #f7c6c2; color: var(--danger); background: #fff2f1; }
.product-cell { display: flex; min-width: 230px; align-items: center; gap: 10px; }
.product-cell img { width: 48px; height: 38px; flex: none; border-radius: 5px; object-fit: cover; }
.product-cell span { display: grid; }
.table-edit { display: inline-flex; min-height: 34px; align-items: center; border: 1px solid rgba(8,126,171,.25); border-radius: 7px; padding: 7px 10px; color: var(--sea); background: var(--sea-pale); font-size: .82rem; font-weight: 800; }
.form-heading { align-items: flex-start; margin-bottom: 0; }
.form-heading > div > span { display: block; max-width: 34rem; margin-top: 7px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.form-back-link { color: var(--sea); font-size: .84rem; font-weight: 800; }
.admin-form { display: grid; gap: 0; }
.product-form-layout { min-width: 0; }
.form-section { min-inline-size: 0; margin: 0; border: 0; border-top: 1px solid var(--line); padding: 24px 0; }
.form-section:first-child { margin-top: 22px; }
.form-section legend, .form-section h3 { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; color: var(--ink); font-size: .98rem; line-height: 1.2; }
.form-section legend span, .form-section h3 span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--sea); background: var(--sea-pale); font-size: .7rem; font-weight: 900; }
.form-section > p, .form-section-column > p { margin: 7px 0 18px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.rental-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rental-option { position: relative; display: block; cursor: pointer; }
.rental-option input { position: absolute; opacity: 0; pointer-events: none; }
.rental-option > span { display: grid; min-height: 112px; align-content: start; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 14px; color: var(--ink); background: #fbfcfe; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.rental-option strong { font-size: .88rem; }
.rental-option small { color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.45; }
.rental-option input:checked + span { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(8,126,171,.12); color: var(--sea); background: #f4fbfd; }
.rental-option input:focus-visible + span { outline: 3px solid rgba(8,126,171,.2); outline-offset: 2px; }
.rental-option input:disabled + span { border-style: dashed; color: #94a3b8; background: #f8fafc; cursor: not-allowed; }
.rental-option input:disabled + span small { color: #94a3b8; }
.rental-option em { margin-left: 5px; color: #9a6107; font-size: .64rem; font-style: normal; font-weight: 850; text-transform: uppercase; }
.currency-field { grid-column: 1 / -1; max-width: 240px; }
.deposit-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 22px; align-items: start; }
.deposit-options { display: grid; gap: 9px; }
.deposit-option { position: relative; display: block; cursor: pointer; }
.deposit-option input { position: absolute; opacity: 0; pointer-events: none; }
.deposit-option > span { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: baseline; border: 1px solid var(--line); border-radius: 7px; padding: 12px 13px; background: #fbfcfe; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.deposit-option strong { font-size: .82rem; }
.deposit-option small { color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.4; }
.deposit-option input:checked + span { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(8,126,171,.12); color: var(--sea); background: #f4fbfd; }
.deposit-option input:focus-visible + span { outline: 3px solid rgba(8,126,171,.2); outline-offset: 2px; }
.deposit-values { align-content: start; }
.deposit-help { grid-column: 1 / -1; color: var(--muted); font-size: .73rem; font-weight: 500; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.identity-grid { grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr); }
.compact-grid { gap: 13px; }
.form-grid > label { align-content: start; }
label { display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 800; }
label.is-wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 10px 11px; color: var(--ink); background: #fbfcfe; font-weight: 500; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
input::placeholder, textarea::placeholder { color: #94a3b8; font-weight: 400; }
textarea { min-height: 106px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--sea); outline: 0; box-shadow: 0 0 0 3px rgba(8,126,171,.13); background: #fff; }
.field-help { color: var(--muted); font-size: .74rem; font-weight: 500; line-height: 1.4; }
.input-suffix, .input-prefix { display: flex; align-items: stretch; }
.input-suffix input, .input-prefix input { min-width: 0; border-radius: 7px 0 0 7px; }
.input-suffix small, .input-prefix small { display: grid; min-width: 48px; place-items: center; border: 1px solid #cbd5e1; border-left: 0; border-radius: 0 7px 7px 0; padding: 0 9px; color: var(--muted); background: #f1f5f9; font-size: .72rem; font-weight: 800; }
.input-prefix small { min-width: 38px; order: -1; border: 1px solid #cbd5e1; border-right: 0; border-radius: 7px 0 0 7px; }
.input-prefix input { border-radius: 0 7px 7px 0; }
.form-section-split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; }
.form-section-split > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.connections-section { scroll-margin-top: 24px; padding: 22px 0 0; }
.connections-heading { margin-bottom: 17px; }
.connections-heading p { margin: 0; color: var(--orange); font-size: .74rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.connections-heading h2 { margin: 4px 0 0; font-size: 1.35rem; line-height: 1.15; }
.connections-heading > div > span { display: block; max-width: 34rem; margin-top: 7px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.connection-card { display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--surface); box-shadow: 0 12px 30px rgba(30,41,59,.05); }
.connection-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.connection-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; color: #fff; font-size: .9rem; font-weight: 900; }
.meta-mark { background: #1877f2; }
.maps-mark { background: #4285f4; }
.connection-status { border-radius: 999px; padding: 4px 8px; color: #9a6107; background: #fff5df; font-size: .7rem; font-weight: 850; }
.connection-card h3 { margin: 0; font-size: 1rem; }
.connection-card p { margin: 6px 0 0; max-width: 30rem; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.connection-card dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 0; }
.connection-card dl div { border-top: 1px solid var(--line); padding-top: 9px; }
.connection-card dt { color: var(--muted); font-size: .72rem; }
.connection-card dd { margin: 3px 0 0; font-size: .78rem; font-weight: 800; }
.connection-button { justify-self: start; min-height: 36px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; color: #94a3b8; background: #f8fafc; cursor: not-allowed; font-size: .8rem; font-weight: 800; }
.settings-section { max-width: 760px; }
.settings-section + .settings-section { border-top: 1px solid var(--line); padding-top: 28px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-inline-size: 0; margin: 0; border: 0; padding: 0; }
.theme-option { position: relative; display: block; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option > span { display: grid; min-height: 112px; align-content: start; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 14px; background: #fbfcfe; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.theme-option strong { font-size: .88rem; }
.theme-option small { color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.45; }
.theme-option input:checked + span { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(8,126,171,.12); color: var(--sea); background: #f4fbfd; }
.theme-option input:focus-visible + span { outline: 3px solid rgba(8,126,171,.2); outline-offset: 2px; }
.module-list { border-top: 1px solid var(--line); }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 2px; border-bottom: 1px solid var(--line); }
.module-row strong, .module-row small { display: block; }
.module-row strong { font-size: .9rem; }
.module-row small { margin-top: 3px; color: var(--muted); font-size: .79rem; }
.module-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; cursor: pointer; }
.module-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.module-toggle-track { display: flex; width: 36px; height: 20px; align-items: center; border-radius: 999px; padding: 2px; background: #cbd5e1; transition: background 160ms ease; }
.module-toggle-track i { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(30,41,59,.2); transition: transform 160ms ease; }
.module-toggle-text { color: var(--muted); font-size: .76rem; }
.module-toggle-text b { font-weight: 850; }
.module-inactive { display: none; }
.module-toggle input:checked + .module-toggle-track { background: #198754; }
.module-toggle input:checked + .module-toggle-track i { transform: translateX(16px); }
.module-toggle input:checked ~ .module-toggle-text { color: #147a4d; }
.module-toggle input:checked ~ .module-toggle-text .module-inactive { display: none; }
.module-toggle input:checked ~ .module-toggle-text .module-active { display: inline; }
.module-toggle input:not(:checked) ~ .module-toggle-text .module-active { display: none; }
.module-toggle input:not(:checked) ~ .module-toggle-text .module-inactive { display: inline; }
.module-toggle input:focus-visible + .module-toggle-track { outline: 3px solid rgba(8,126,171,.2); outline-offset: 2px; }
.form-errors { border: 1px solid #f7c6c2; border-radius: 7px; padding: 11px 12px; color: var(--danger); background: #fff2f1; font-size: .88rem; font-weight: 700; }
.empty-state { border: 1px dashed var(--line); border-radius: 7px; padding: 30px; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .deposit-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .admin-shell, .admin-shell:has(.sidebar-toggle:checked) { grid-template-columns: 1fr; } .admin-sidebar { position: static; width: auto; height: auto; flex-direction: row; align-items: center; gap: 16px; padding: 13px 16px; } .admin-nav { display: flex; gap: 4px; margin-left: auto; } .admin-nav a { min-height: 36px; padding: 7px; font-size: 0; } .admin-nav .nav-icon { font-size: 1.05rem; } .admin-public-link { display: none; } .menu-toggle { display: none; } .metrics, .form-grid, .form-section-split, .rental-options, .connection-grid, .theme-options { grid-template-columns: 1fr; } .product-list a { grid-template-columns: 1fr auto; } .product-list span { display: none; } .panel-heading, .summary-panel { align-items: flex-start; flex-direction: column; } .form-section-split > div + div { border-top: 1px solid var(--line); border-left: 0; padding-top: 24px; padding-left: 0; } .rental-option > span { min-height: auto; } .deposit-option > span { grid-template-columns: 1fr; gap: 3px; } }
