:root {
  --ink: #17252b;
  --muted: #65757c;
  --line: #dbe5e8;
  --paper: #ffffff;
  --surface: #f3f7f7;
  --teal: #087d94;
  --coral: #e76855;
  --nav: #13272d;
  --shadow: 0 18px 48px rgba(22, 48, 57, 0.1);
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(110deg, rgba(10, 61, 74, 0.9), rgba(18, 39, 45, 0.63)),
    url("assets/hero-swimwear-manufacturing.png") center / cover;
}

.login-panel {
  width: min(460px, 100%);
  padding: 38px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  margin-bottom: 34px;
}

.admin-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  font-size: 21px;
  font-weight: 800;
}

.admin-brand strong { font-size: 20px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { font-size: 34px; line-height: 1.12; }
h2 { font-size: 23px; }
p { color: var(--muted); line-height: 1.65; }
label { display: grid; gap: 8px; color: #34474e; font-size: 13px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 125, 148, 0.1); }
textarea { resize: vertical; }
form { display: grid; gap: 18px; }
form button, .panel button, .quick-actions a {
  border: 0;
  border-radius: 6px;
  padding: 12px 17px;
  color: white;
  background: var(--teal);
  font-weight: 800;
  text-decoration: none;
}
.form-status { margin: 0; min-height: 20px; font-size: 13px; color: var(--teal); }

.admin-app { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: white;
}
.sidebar .admin-brand { padding: 0 9px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  color: #c8d6da;
  background: transparent;
  font-weight: 700;
  text-align: left;
}
.sidebar nav button:hover, .sidebar nav button.is-active { color: white; background: rgba(255,255,255,0.1); }
.sidebar nav span {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 10px;
  color: white;
  background: var(--coral);
  font-size: 11px;
  text-align: center;
}
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; }
.sidebar-footer a, .sidebar-footer button {
  padding: 11px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  color: white;
  background: transparent;
  text-decoration: none;
  text-align: center;
}

.admin-main { margin-left: 242px; padding: 28px 34px 54px; }
.admin-header {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}
.admin-header h1 { margin: 0; font-size: 30px; }
.mode-badge {
  padding: 7px 11px;
  border: 1px solid #d8cda9;
  border-radius: 4px;
  color: #7a6530;
  background: #fff9e7;
  font-size: 12px;
  font-weight: 800;
}
.admin-view { display: none; }
.admin-view.is-active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-grid article, .panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 26px rgba(22, 48, 57, 0.04);
}
.stat-grid span, .stat-grid small { display: block; color: var(--muted); }
.stat-grid strong { display: block; margin: 12px 0 5px; font-size: 31px; }
.stat-grid small { font-size: 12px; }
.status-live { color: #16835d; }
.dashboard-grid, .settings-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.panel-heading h2 { margin: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-actions button, .quick-actions a { color: var(--ink); background: var(--surface); text-align: left; }
.connection-panel { background: #eaf6f7; border-color: #c8e3e7; }
.editor-form { max-width: 880px; }
.manager-tools { display: flex; gap: 10px; }
.manager-tools select { width: 190px; }
.manager-tools input { width: 220px; }
.admin-products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.admin-product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.admin-product.is-hidden { opacity: 0.52; }
.admin-product img { width: 100%; aspect-ratio: 4 / 5; display: block; object-fit: cover; background: #edf2f3; }
.admin-product div { padding: 11px; }
.admin-product strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.admin-product small { display: block; margin: 4px 0 10px; color: var(--muted); }
.admin-product button { width: 100%; padding: 8px; color: var(--teal); background: #e9f4f6; }
.inquiry-list { display: grid; gap: 11px; }
.inquiry-item { padding: 17px; border: 1px solid var(--line); border-radius: 6px; }
.inquiry-item header { display: flex; justify-content: space-between; gap: 20px; }
.inquiry-item h3 { margin: 0 0 4px; }
.inquiry-item p { margin-bottom: 0; }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }
.button-muted { color: #53666d !important; background: #edf2f3 !important; }
.setup-status { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; font-weight: 800; }
.setup-status span { width: 9px; height: 9px; border-radius: 50%; background: #d09a3b; }
dl { margin: 20px 0 0; }
dl div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; }

.product-dialog {
  width: min(540px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(10, 31, 38, 0.35);
}
.product-dialog::backdrop { background: rgba(8, 26, 32, 0.7); }
.product-dialog form { padding: 24px; }
.product-dialog header, .product-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-dialog header h2 { margin: 0; }
.product-dialog header > button { padding: 5px 11px; color: var(--ink); background: transparent; font-size: 25px; }
.product-dialog img { width: 100%; height: 260px; object-fit: contain; background: #eef3f4; border-radius: 6px; }
.product-dialog footer { margin-top: 5px; }
.toggle-row { grid-template-columns: auto 1fr; align-items: center; }
.toggle-row input { width: 18px; height: 18px; }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; padding: 14px; }
  .sidebar .admin-brand { margin-bottom: 12px; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar nav button { min-height: 42px; justify-content: center; font-size: 12px; }
  .sidebar-footer { display: none; }
  .admin-main { margin-left: 0; padding: 20px 14px 45px; }
  .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .admin-products { grid-template-columns: repeat(2, 1fr); }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .manager-tools { width: 100%; }
  .manager-tools select, .manager-tools input { width: 50%; }
}
@media (max-width: 480px) {
  .login-panel { padding: 25px; }
  h1 { font-size: 28px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid article, .panel { padding: 17px; }
  .quick-actions { grid-template-columns: 1fr; }
  .sidebar nav { grid-template-columns: repeat(2, 1fr); }
}
