@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #172a2c;
  --muted: #71807c;
  --paper: #f5f7f3;
  --line: #e4e9e5;
  --green: #245c52;
  --soft-green: #edf3ee;
  --surface: #fff;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.login-shell { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 32px 18px; }
.login-brand { position: absolute; top: 28px; left: 7%; }
.login-card { width: min(100%, 410px); padding: 31px; border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: 0 15px 50px rgba(28,55,48,.05); }
.login-card h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.8px; }
.login-description { margin: 9px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.login-card label { display: block; margin-bottom: 15px; color: #566661; font-size: 10px; font-weight: 600; }
.login-card input { width: 100%; min-height: 40px; display: block; margin-top: 6px; padding: 9px 10px; border: 1px solid #e1e7e2; border-radius: 3px; outline: none; background: #fbfcfa; color: var(--ink); font-size: 11px; }
.login-card input:focus { border-color: #88a99a; box-shadow: 0 0 0 2px rgba(36,92,82,.08); }
.login-submit { width: 100%; margin-top: 4px; }
.login-link { display: block; margin: 15px auto 0; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 10px; }
.login-message { margin: 0 0 16px; padding: 10px; border-radius: 3px; color: #35664e; background: #edf5ef; font-size: 10px; line-height: 1.6; }
.login-message.is-error { color: #953f35; background: #fff5f3; }
.login-back { padding-left: 0; }
.login-config-note { width: min(100%, 410px); margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
.login-config-note code { color: var(--ink); }
.dashboard-shell { min-height: 100vh; }
.sidebar { width: 244px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 27px 19px 18px; border-right: 1px solid var(--line); background: #fff; z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 18px "Manrope", sans-serif; letter-spacing: -1px; }
.brand-mark { width: 36px; height: 30px; display: grid; place-items: center; border-radius: 15px; color: var(--paper); background: var(--green); font-size: 11px; font-weight: 800; letter-spacing: -.4px; }
.brand-light { color: #8d9996; font-weight: 500; }
.side-label { margin: 48px 0 12px 12px; color: #9aa49f; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: #697773; text-align: left; font-size: 12px; }
.nav-item > span:first-child { width: 18px; color: #758781; font-size: 16px; text-align: center; }
.nav-item:hover { background: #f7f9f6; color: var(--ink); }
.nav-item.is-active { color: var(--green); background: var(--soft-green); font-weight: 700; }
.nav-item.is-active > span:first-child { color: var(--green); }
.nav-count { margin-left: auto; color: #899590; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.local-note { display: flex; align-items: flex-start; gap: 10px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.local-note strong { color: var(--ink); font-size: 11px; }
.local-dot { width: 7px; height: 7px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: #58a572; }
.back-link { display: block; padding: 20px 10px 0; color: #64736f; font-size: 11px; }
.back-link:hover, .view-site:hover { color: var(--green); }

.dashboard-main { min-height: 100vh; margin-left: 244px; }
.topbar { height: 67px; display: flex; align-items: center; justify-content: space-between; padding: 0 4.3%; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { color: #8c9893; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.breadcrumb span { margin: 0 9px; color: #c4ccc7; }
.breadcrumb strong { color: #4a5b56; font-weight: 600; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.view-site { color: #586963; font-size: 11px; font-weight: 600; }
.view-site span { margin-left: 6px; color: var(--green); }
.sign-out-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 3px; background: white; color: #586963; font-size: 10px; }
.sign-out-button:hover { border-color: #b6c8bc; color: var(--green); }
.workspace { max-width: 1480px; margin: auto; padding: 28px 4.3% 60px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 15px; border: 1px solid #e8dfc7; border-radius: 4px; background: #fbf8ef; color: #786c4e; font-size: 10px; line-height: 1.5; }
.notice strong { color: #655731; white-space: nowrap; }
.storage-error { margin: 12px 0 0; padding: 12px; border: 1px solid #efd0cb; color: #953f35; background: #fff5f3; font-size: 11px; }
.panel { display: none; }
.panel.is-visible { display: block; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 34px 0 24px; }
.eyebrow { margin: 0 0 8px; color: #83928b; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
h1, h2 { font-family: "Manrope", sans-serif; }
.page-heading h1 { margin: 0; font-size: 29px; font-weight: 600; letter-spacing: -1.2px; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.primary-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 0; border-radius: 3px; color: white; background: var(--green); font-size: 11px; font-weight: 700; }
.primary-button:hover { background: #19493f; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 17px; }
.stat-card, .content-card { border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.stat-card { min-height: 117px; padding: 18px 19px; }
.stat-card > span { display: block; color: #83908b; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.stat-card strong { display: block; margin-top: 10px; font: 600 26px "Manrope", sans-serif; letter-spacing: -1px; }
.stat-card small { color: #899590; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 13px; }
.content-card { padding: 19px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.card-heading .eyebrow { margin-bottom: 5px; }
.card-heading h2, .quick-card h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.4px; }
.heading-count { margin-left: 5px; color: #91a099; font: 500 11px "DM Sans", sans-serif; }
.subtle-button, .text-button { padding: 0; border: 0; color: var(--green); background: transparent; font-size: 10px; font-weight: 700; }
.compact-list { display: grid; }
.compact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #edf0ed; }
.compact-main { min-width: 0; }
.compact-main strong, .compact-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-main strong { font-size: 11px; }
.compact-main span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.compact-price { color: #576862; font-size: 10px; white-space: nowrap; }
.empty-state { padding: 19px 0 5px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.quick-card { background: #f9fbf8; }
.quick-card > p:not(.eyebrow) { margin: 12px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.text-button span { padding-left: 8px; }
.inventory-layout, .staff-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); align-items: start; gap: 14px; }
.catalog-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.listing-list, .staff-list { display: grid; gap: 9px; }
.listing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid #edf0ed; border-radius: 3px; }
.listing-info { min-width: 0; }
.listing-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.listing-topline strong { font-size: 11px; }
.listing-airline-logo { width: 34px; height: 24px; object-fit: contain; }
.badge { display: inline-block; padding: 4px 7px; border-radius: 20px; color: #476d5c; background: #edf5ef; font-size: 8px; font-weight: 700; }
.badge-hidden { color: #7d8581; background: #f0f1ef; }
.listing-info p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.listing-price { color: #465850 !important; font-weight: 700; }
.row-actions { display: flex; align-items: flex-start; gap: 11px; }
.row-actions button { padding: 0; border: 0; background: transparent; color: #73817b; font-size: 9px; }
.row-actions button:hover { color: var(--green); }
.row-actions .delete-button:hover { color: #a74338; }
button.delete-button { padding: 0; border: 0; background: transparent; color: #73817b; font-size: 9px; }
button.delete-button:hover { color: #a74338; }
.editor-form label { display: block; margin-bottom: 14px; color: #566661; font-size: 10px; font-weight: 600; }
.editor-form input, .editor-form select, .editor-form textarea { width: 100%; min-height: 38px; display: block; margin-top: 6px; padding: 9px 10px; border: 1px solid #e1e7e2; border-radius: 3px; outline: none; background: #fbfcfa; color: var(--ink); font-size: 10px; }
.editor-form textarea { resize: vertical; }
.editor-form input[type="file"] { min-height: 0; padding: 8px; background: white; }
.editor-form input:focus, .editor-form select:focus, .editor-form textarea:focus { border-color: #88a99a; box-shadow: 0 0 0 2px rgba(36,92,82,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 9px; }
.cancel-button { min-height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 3px; background: white; color: #5f6e68; font-size: 10px; }
.form-help { margin: 0 0 17px; color: #838e89; font-size: 10px; line-height: 1.6; }
.photo-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: -4px 0 16px; }
.photo-preview:empty { display: none; }
.photo-thumb { min-width: 0; position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #f0f3ef; }
.photo-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-thumb button { position: absolute; right: 4px; bottom: 4px; padding: 5px 7px; border: 0; border-radius: 2px; color: white; background: rgba(25, 45, 39, .82); font-size: 8px; }
.photo-thumb span { position: absolute; right: 4px; bottom: 4px; left: 4px; overflow: hidden; padding: 4px; border-radius: 2px; color: white; background: rgba(25, 45, 39, .75); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.airline-logo-preview { width: 100%; min-height: 74px; display: grid; place-items: center; margin: -4px 0 16px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.airline-logo-preview:empty { display: none; }
.airline-logo-preview img { max-width: 180px; max-height: 64px; padding: 6px; object-fit: contain; }
.staff-row { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #edf0ed; border-radius: 3px; }
.staff-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--soft-green); color: var(--green); font-size: 11px; font-weight: 700; }
.staff-details { min-width: 0; flex: 1; }
.staff-details strong, .staff-details span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-details strong { font-size: 11px; }
.staff-details span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.staff-meta { color: #77857f; font-size: 9px; text-align: right; white-space: nowrap; }
.staff-meta span { display: block; margin-top: 4px; color: #9aa39f; font-size: 8px; }
.inquiry-list { display: grid; gap: 9px; }
.inquiry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px; border: 1px solid #edf0ed; border-radius: 3px; }
.inquiry-details { min-width: 0; }
.inquiry-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.inquiry-name-line > strong { font-size: 11px; }
.inquiry-details > p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.inquiry-details .inquiry-message { color: #53645d; }
.inquiry-date { display: block; margin-top: 7px; color: #99a39e; font-size: 9px; }
.inquiry-actions { display: flex; align-items: center; gap: 10px; }
.whatsapp-link { color: var(--green); font-size: 10px; font-weight: 700; white-space: nowrap; }
.inquiry-status { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: #fbfcfa; color: #566661; font-size: 9px; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .sidebar { width: 210px; }
  .dashboard-main { margin-left: 210px; }
  .workspace { padding-right: 3%; padding-left: 3%; }
  .overview-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .inventory-layout, .staff-layout, .catalog-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sidebar { width: auto; height: auto; position: static; display: block; padding: 13px 15px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { font-size: 16px; }
  .brand-mark { width: 32px; height: 27px; font-size: 9px; }
  .side-label, .sidebar-bottom { display: none; }
  .side-nav { display: flex; gap: 4px; margin-top: 13px; overflow-x: auto; }
  .nav-item { width: auto; min-height: 36px; flex: 0 0 auto; gap: 7px; padding: 0 9px; font-size: 10px; }
  .nav-item > span:first-child { width: auto; font-size: 13px; }
  .nav-count { margin-left: 0; }
  .dashboard-main { min-height: 0; margin-left: 0; }
  .topbar { height: 49px; padding: 0 17px; }
  .breadcrumb { font-size: 8px; }
  .topbar-actions { gap: 10px; }
  .view-site { font-size: 9px; }
  .sign-out-button { padding: 6px 8px; font-size: 9px; }
  .workspace { padding: 16px 14px 40px; }
  .notice { align-items: flex-start; flex-direction: column; gap: 3px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin: 25px 0 17px; }
  .page-heading h1 { font-size: 25px; }
  .stat-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { min-height: 90px; padding: 14px; }
  .stat-card strong { margin-top: 5px; font-size: 22px; }
  .content-card { padding: 15px; }
  .listing-row { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-end; }
  .staff-row { align-items: flex-start; }
  .staff-meta { font-size: 8px; }
  .inquiry-row { grid-template-columns: 1fr; }
  .inquiry-actions { justify-content: space-between; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

.theme-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--green); color: var(--green); }
.theme-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.theme-toggle [data-theme-icon] { font-size: 15px; }
.login-theme-toggle { position: fixed; top: 24px; right: 5%; z-index: 4; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111918;
  --ink: #e8f0ec;
  --muted: #a7b7b0;
  --line: #33413c;
  --green: #91c6a9;
  --soft-green: #20352c;
  --surface: #1b2624;
}
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .content-card,
:root[data-theme="dark"] .sign-out-button,
:root[data-theme="dark"] .login-card input,
:root[data-theme="dark"] .cancel-button,
:root[data-theme="dark"] .inquiry-status { background: var(--surface); }
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar { border-color: var(--line); }
:root[data-theme="dark"] .login-card label,
:root[data-theme="dark"] .nav-item,
:root[data-theme="dark"] .view-site,
:root[data-theme="dark"] .breadcrumb strong,
:root[data-theme="dark"] .editor-form label,
:root[data-theme="dark"] .cancel-button,
:root[data-theme="dark"] .inquiry-status,
:root[data-theme="dark"] .sign-out-button { color: #c1cdc7; }
:root[data-theme="dark"] .primary-button { color: #102018; }
:root[data-theme="dark"] .quick-card { background: #202d29; }
:root[data-theme="dark"] .nav-item:hover { background: #202d29; }
:root[data-theme="dark"] .nav-item.is-active { color: var(--green); background: #22372e; }
:root[data-theme="dark"] .nav-item > span:first-child,
:root[data-theme="dark"] .breadcrumb,
:root[data-theme="dark"] .breadcrumb span,
:root[data-theme="dark"] .side-label,
:root[data-theme="dark"] .stat-card > span,
:root[data-theme="dark"] .stat-card small,
:root[data-theme="dark"] .compact-price,
:root[data-theme="dark"] .heading-count { color: #a4b3ac; }
:root[data-theme="dark"] .compact-row { border-color: var(--line); }
:root[data-theme="dark"] .listing-row,
:root[data-theme="dark"] .staff-row,
:root[data-theme="dark"] .inquiry-row,
:root[data-theme="dark"] .local-note { border-color: var(--line); }
:root[data-theme="dark"] .local-note,
:root[data-theme="dark"] .local-note strong { color: #c0ccc6; }
:root[data-theme="dark"] .editor-form input,
:root[data-theme="dark"] .editor-form select,
:root[data-theme="dark"] .editor-form textarea,
:root[data-theme="dark"] .login-card input,
:root[data-theme="dark"] .inquiry-status {
  border-color: #3a4b45;
  background: #131e1c;
  color: var(--ink);
}
:root[data-theme="dark"] .editor-form input[type="file"] { background: #1b2624; }
:root[data-theme="dark"] .editor-form input::placeholder,
:root[data-theme="dark"] .editor-form textarea::placeholder { color: #879890; }
:root[data-theme="dark"] .notice { border-color: #625737; color: #e0d19f; background: #302b1e; }
:root[data-theme="dark"] .notice strong { color: #f0dfa9; }
:root[data-theme="dark"] .storage-error { border-color: #693e39; color: #f0b0a7; background: #33201e; }
:root[data-theme="dark"] .badge { color: #b6dfc5; background: #263d31; }
:root[data-theme="dark"] .badge-hidden { color: #b2bdb7; background: #303936; }
:root[data-theme="dark"] .airline-logo-preview { border-color: var(--line); background: #131e1c; }
:root[data-theme="dark"] .photo-thumb { border-color: var(--line); background: #202c29; }
:root[data-theme="dark"] .row-actions button,
:root[data-theme="dark"] .staff-meta,
:root[data-theme="dark"] .back-link { color: #a8b7b0; }
:root[data-theme="dark"] .login-message { color: #bce0c7; background: #20382b; }
:root[data-theme="dark"] .login-message.is-error { color: #f0b0a7; background: #33201e; }
:root[data-theme="dark"] .login-config-note code { color: var(--ink); }

@media (max-width: 620px) {
  .theme-toggle { min-width: 34px; padding: 0 8px; }
  .theme-toggle [data-theme-label] { display: none; }
}
