/*
 * PATOTSALERA — Admin Studio
 * Tema visual: hangat, editorial, dan fungsional.
 */

:root {
  --admin-bg: #f2efe8;
  --admin-bg-deep: #ece8de;
  --admin-surface: #fffdf9;
  --admin-white: #ffffff;
  --admin-ink: #17160f;
  --admin-ink-soft: #4d4a40;
  --admin-muted: #858074;
  --admin-muted-light: #a8a294;
  --admin-line: #e4ded1;
  --admin-line-soft: #eee9df;
  --admin-dark: #15140f;
  --admin-dark-soft: #211f18;
  --admin-accent: #ff5a1f;
  --admin-accent-deep: #e84a10;
  --admin-accent-soft: #fff0e7;
  --admin-green: #2c8559;
  --admin-green-soft: #e9f6ee;
  --admin-blue: #4b67c8;
  --admin-blue-soft: #edf0fc;
  --admin-red: #c84532;
  --admin-red-soft: #fceeea;
  --admin-gold: #a77a2a;
  --admin-gold-soft: #fbf2df;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --shadow-xs: 0 1px 2px rgba(28, 24, 15, 0.04);
  --shadow-sm: 0 4px 16px rgba(28, 24, 15, 0.05);
  --shadow-md: 0 16px 42px rgba(28, 24, 15, 0.11);
  --shadow-lg: 0 28px 80px rgba(20, 17, 10, 0.2);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-width: 252px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.admin-body {
  margin: 0;
  min-height: 100vh;
  color: var(--admin-ink);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 90, 31, 0.045), transparent 28%),
    var(--admin-bg);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

button,
input,
select,
textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { color: var(--admin-white); background: var(--admin-accent); }

:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Shared brand
   --------------------------------------------------------------------- */

.admin-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--admin-ink); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--admin-white);
  background: linear-gradient(135deg, #ff7b3d, var(--admin-accent));
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(255, 90, 31, 0.28);
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-word {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.1;
}
.brand-word small {
  color: var(--admin-muted);
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.admin-brand-light { color: var(--admin-white); }
.admin-brand-light .brand-word small { color: rgba(255, 255, 255, 0.38); }

/* ---------------------------------------------------------------------
   Buttons & form controls
   --------------------------------------------------------------------- */

.admin-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.admin-btn .icon { width: 14px; height: 14px; }
.admin-btn:hover { transform: translateY(-1px); }
.admin-btn:active { transform: translateY(0); }
.admin-btn-primary { color: var(--admin-white); background: var(--admin-accent); box-shadow: 0 6px 16px rgba(255, 90, 31, 0.22); }
.admin-btn-primary:hover { background: var(--admin-accent-deep); box-shadow: 0 9px 22px rgba(255, 90, 31, 0.28); }
.admin-btn-dark { color: var(--admin-white); background: var(--admin-dark); }
.admin-btn-dark:hover { background: #2c2a21; }
.admin-btn-ghost { color: var(--admin-ink); background: var(--admin-white); border-color: var(--admin-line); }
.admin-btn-ghost:hover { border-color: #c9c1b2; background: #fdfbf6; }
.admin-btn-soft { color: var(--admin-accent-deep); background: var(--admin-accent-soft); }
.admin-btn-soft:hover { background: #ffe6d8; }
.admin-btn-danger { color: var(--admin-white); background: var(--admin-red); }
.admin-btn-danger:hover { background: #b53a29; }
.admin-btn-sm { min-height: 32px; padding: 0 11px; border-radius: 7px; font-size: 10.5px; }
.admin-btn-sm .icon { width: 12px; height: 12px; }
.admin-btn-block { width: 100%; }

.admin-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  color: var(--admin-ink-soft);
  background: var(--admin-white);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.admin-icon-btn .icon { width: 14px; height: 14px; }
.admin-icon-btn:hover { color: var(--admin-ink); border-color: #c8bfaf; background: #fbf8f2; }
.admin-icon-btn.is-danger:hover { color: var(--admin-red); border-color: #e8b6ad; background: var(--admin-red-soft); }

.admin-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.admin-field > label,
.admin-field-label {
  color: var(--admin-ink-soft);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.025em;
}
.admin-field > label em { color: var(--admin-accent); font-style: normal; }
.admin-field > label span { color: var(--admin-muted); font-weight: 600; }
.admin-field input[type="text"],
.admin-field input[type="email"],
.admin-field input[type="password"],
.admin-field input[type="number"],
.admin-field input[type="tel"],
.admin-field input[type="url"],
.admin-field input[type="search"],
.admin-field input[type="datetime-local"],
.admin-field select,
.admin-field textarea,
.admin-input,
.admin-select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  color: var(--admin-ink);
  background: var(--admin-white);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.admin-field textarea { min-height: 104px; resize: vertical; line-height: 1.65; }
.admin-field input::placeholder,
.admin-field textarea::placeholder,
.admin-input::placeholder { color: var(--admin-muted-light); }
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.admin-input:focus,
.admin-select:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.1); }
.admin-field input:disabled,
.admin-field select:disabled,
.admin-field textarea:disabled { color: var(--admin-muted); background: #f5f2eb; }
.admin-field select,
.admin-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23858074' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.admin-field .field-hint { color: var(--admin-muted); font-size: 10px; line-height: 1.55; }
.admin-field .field-error { color: var(--admin-red); font-size: 10px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.input-with-icon { position: relative; }
.input-with-icon > [data-icon]:not(.password-toggle) {
  position: absolute;
  left: 13px;
  top: 50%;
  display: grid;
  place-items: center;
  color: var(--admin-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.input-with-icon > [data-icon]:not(.password-toggle) .icon { width: 16px; height: 16px; }
.input-with-icon > .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--admin-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.admin-field .input-with-icon input { padding-left: 39px; }
.admin-field .input-with-icon input[type="password"] { padding-right: 44px; }
.input-with-icon .password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--admin-muted);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}
.input-with-icon .password-toggle:hover { color: var(--admin-ink); background: var(--admin-bg); }
.input-with-icon .password-toggle .icon { width: 15px; height: 15px; }

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.admin-check input { position: absolute; opacity: 0; pointer-events: none; }
.admin-check .check-ui {
  position: relative;
  width: 17px;
  height: 17px;
  flex: none;
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: var(--admin-white);
  transition: background 0.18s, border-color 0.18s;
}
.admin-check input:checked + .check-ui { border-color: var(--admin-accent); background: var(--admin-accent); }
.admin-check input:checked + .check-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid var(--admin-white);
  border-width: 0 1.7px 1.7px 0;
  transform: rotate(45deg);
}
.admin-check input:focus-visible + .check-ui { outline: 2px solid var(--admin-accent); outline-offset: 2px; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; padding: 4px 0 0; }

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--admin-bg);
}
.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--admin-dark);
}
.login-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.85) contrast(1.03);
}
.login-visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 13, 8, 0.7) 0%, rgba(15, 13, 8, 0.12) 38%, rgba(15, 13, 8, 0.82) 100%),
    linear-gradient(90deg, rgba(15, 13, 8, 0.38), transparent 65%);
}
.login-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 36px;
}
.login-edition {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.login-visual-copy {
  position: absolute;
  z-index: 2;
  left: 36px;
  bottom: 128px;
  max-width: 520px;
  color: var(--admin-white);
}
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
  color: #ffb28e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.login-kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.login-visual-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 51px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.055em;
}
.login-visual-copy h2 em {
  color: #ffb28e;
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.025em;
}
.login-visual-copy p {
  max-width: 370px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.75;
}
.login-floating-card {
  position: absolute;
  z-index: 2;
  right: 36px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: var(--admin-white);
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
}
.login-floating-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: var(--admin-white);
  background: var(--admin-accent);
}
.login-floating-icon .icon { width: 15px; height: 15px; }
.login-floating-card strong { display: block; font-size: 11px; }
.login-floating-card p { margin-top: 2px; color: rgba(255, 255, 255, 0.48); font-size: 9px; }
.login-visual-word {
  position: absolute;
  z-index: 1;
  right: -30px;
  bottom: -45px;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(110px, 15vw, 230px);
  font-weight: 800;
  line-height: 0.75;
  letter-spacing: -0.08em;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.11);
  pointer-events: none;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 44px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 90, 31, 0.055), transparent 30%),
    var(--admin-bg);
}
.login-panel-inner { width: 100%; max-width: 392px; }
.login-mobile-brand { display: none; margin-bottom: 34px; }
.login-heading .eyebrow {
  display: inline-block;
  color: var(--admin-accent);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.19em;
}
.login-heading h1 {
  margin-top: 11px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.065em;
}
.login-heading h1 em {
  color: var(--admin-accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.login-heading p { margin-top: 12px; color: var(--admin-muted); font-size: 12px; line-height: 1.65; }
.login-form { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; }
.login-form .admin-field > label { font-size: 10px; }
.login-form .admin-field input { min-height: 47px; background: var(--admin-surface); }
.login-submit { width: 100%; min-height: 48px; margin-top: 3px; font-size: 12.5px; }
.login-submit .icon { width: 15px; height: 15px; }
.login-error {
  padding: 10px 12px;
  border: 1px solid #f0c4bb;
  border-radius: 8px;
  color: var(--admin-red);
  background: var(--admin-red-soft);
  font-size: 11px;
  font-weight: 700;
}
.demo-credentials {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding: 12px 13px;
  border: 1px dashed #d7cfbe;
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.55);
}
.demo-credentials-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--admin-accent);
  background: var(--admin-accent-soft);
}
.demo-credentials-icon .icon { width: 13px; height: 13px; }
.demo-credentials > div { flex: 1; min-width: 0; }
.demo-credentials strong { display: block; font-size: 10px; }
.demo-credentials p { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; color: var(--admin-muted); font-size: 9.5px; }
.demo-credentials p span:first-child { font-weight: 700; color: var(--admin-ink-soft); }
.demo-credentials > button {
  flex: none;
  padding: 5px 8px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  color: var(--admin-ink-soft);
  background: var(--admin-white);
  font-size: 8.5px;
  font-weight: 800;
}
.demo-credentials > button:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.back-to-store {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 28px;
  color: var(--admin-muted);
  font-size: 10.5px;
  font-weight: 700;
}
.back-to-store .icon { width: 13px; height: 13px; }
.back-to-store:hover { color: var(--admin-accent); }
.login-legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--admin-line-soft); color: var(--admin-muted-light); font-size: 8.5px; line-height: 1.65; }

/* ---------------------------------------------------------------------
   Shell & sidebar
   --------------------------------------------------------------------- */

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 23px 16px 16px;
  overflow: hidden;
  color: #cfcabf;
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 90, 31, 0.12), transparent 27%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--admin-dark);
  z-index: 40;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 22px; }
.sidebar-close { display: none; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 7px; color: rgba(255, 255, 255, 0.65); background: transparent; }
.sidebar-close .icon { width: 14px; height: 14px; }
.store-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 2px 20px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.store-status .status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #5cc98c; box-shadow: 0 0 0 4px rgba(92, 201, 140, 0.11); }
.store-status > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.store-status strong { color: #f1eee7; font-size: 10px; font-weight: 800; }
.store-status span { color: rgba(255, 255, 255, 0.34); font-size: 8px; }
.store-status > a { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: rgba(255, 255, 255, 0.4); transition: color 0.18s, background 0.18s; }
.store-status > a:hover { color: var(--admin-white); background: rgba(255, 255, 255, 0.08); }
.store-status > a .icon { width: 12px; height: 12px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 2px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 9px; }
.sidebar-label {
  display: block;
  margin: 18px 10px 7px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sidebar-label:first-child { margin-top: 0; }
.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #a7a296;
  font-size: 11.5px;
  font-weight: 700;
  transition: color 0.17s, background 0.17s;
}
.sidebar-link:hover { color: #f2efe7; background: rgba(255, 255, 255, 0.055); }
.sidebar-link.is-active { color: #fff; background: rgba(255, 255, 255, 0.085); }
.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--admin-accent);
  box-shadow: 0 0 12px rgba(255, 90, 31, 0.55);
}
.sidebar-link-icon { display: grid; place-items: center; color: #807b6f; transition: color 0.17s; }
.sidebar-link-icon .icon { width: 16px; height: 16px; }
.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.is-active .sidebar-link-icon { color: var(--admin-accent); }
.sidebar-link > span:nth-child(2) { flex: 1; }
.sidebar-badge {
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.045);
  font-size: 7.5px;
  font-weight: 800;
}
.sidebar-badge.accent { border-color: transparent; color: var(--admin-white); background: var(--admin-accent); }
.sidebar-badge[hidden] { display: none; }

.sidebar-foot { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 8px 6px; }
.sidebar-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--admin-white);
  background: linear-gradient(135deg, #ff8149, #ff5a1f);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}
.sidebar-user > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { color: #f1eee7; font-size: 10px; font-weight: 800; }
.sidebar-user span { overflow: hidden; color: rgba(255, 255, 255, 0.32); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-logout { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 7px; color: rgba(255, 255, 255, 0.45); background: transparent; transition: color 0.18s, background 0.18s, border-color 0.18s; }
.sidebar-logout:hover { color: #ff9c79; border-color: rgba(255, 90, 31, 0.3); background: rgba(255, 90, 31, 0.1); }
.sidebar-logout .icon { width: 13px; height: 13px; }
.sidebar-version { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 0; color: rgba(255, 255, 255, 0.2); font-size: 7px; font-weight: 700; letter-spacing: 0.03em; }

.admin-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-scrim { display: none; }

/* Topbar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 77px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(228, 222, 209, 0.8);
  background: rgba(242, 239, 232, 0.9);
  backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-menu { display: none; width: 36px; height: 36px; place-items: center; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.topbar-menu .icon { width: 17px; height: 17px; }
.topbar-heading { min-width: 0; }
.topbar-eyebrow { display: block; margin-bottom: 2px; color: var(--admin-accent); font-size: 8px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.topbar-heading h1 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.045em; line-height: 1.2; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.admin-global-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 268px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.85);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.admin-global-search:focus-within { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.08); }
.admin-global-search > .icon { width: 14px; height: 14px; flex: none; color: var(--admin-muted); }
.admin-global-search input { width: 100%; padding: 0 9px; border: 0; outline: 0; background: transparent; font-size: 10.5px; }
.admin-global-search input::placeholder { color: var(--admin-muted-light); }
.admin-global-search kbd { flex: none; padding: 2px 5px; border: 1px solid var(--admin-line); border-radius: 4px; color: var(--admin-muted-light); background: var(--admin-bg); font-family: var(--font-body); font-size: 7.5px; font-weight: 700; }
.topbar-store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  color: var(--admin-ink-soft);
  background: var(--admin-surface);
  font-size: 9.5px;
  font-weight: 800;
  transition: border-color 0.18s, color 0.18s;
}
.topbar-store-link:hover { color: var(--admin-accent); border-color: #efb49b; }
.topbar-store-link .icon { width: 12px; height: 12px; }
.notif-wrap { position: relative; }
.topbar-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  color: var(--admin-ink-soft);
  background: var(--admin-surface);
  transition: border-color 0.18s, color 0.18s;
}
.topbar-icon:hover { border-color: #c8bfaf; color: var(--admin-ink); }
.topbar-icon .icon { width: 16px; height: 16px; }
.notif-dot {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--admin-bg);
  border-radius: 99px;
  color: var(--admin-white);
  background: var(--admin-accent);
  font-size: 7px;
  font-weight: 800;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: 48px;
  width: 326px;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.18s ease both;
  z-index: 50;
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; border-bottom: 1px solid var(--admin-line-soft); }
.notif-head strong { font-size: 11px; }
.notif-head span { color: var(--admin-muted); font-size: 8.5px; }
.notif-list { max-height: 310px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--admin-line-soft); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #fbf8f2; }
.notif-item-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: none; border-radius: 7px; color: var(--admin-gold); background: var(--admin-gold-soft); }
.notif-item-icon .icon { width: 13px; height: 13px; }
.notif-item > div { flex: 1; min-width: 0; }
.notif-item strong { display: block; font-size: 10.5px; }
.notif-item p { margin-top: 2px; color: var(--admin-muted); font-size: 9px; line-height: 1.5; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--admin-muted); font-size: 10px; }
button.notif-item { width: 100%; border: 0; color: inherit; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.notif-foot { padding: 10px 15px; border-top: 1px solid var(--admin-line-soft); }
.notif-foot a { color: var(--admin-accent); font-size: 9.5px; font-weight: 800; }
.topbar-divider { width: 1px; height: 25px; margin: 0 3px; background: var(--admin-line); }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--admin-white); background: var(--admin-dark); font-family: var(--font-display); font-size: 11px; font-weight: 700; }
.topbar-user > div { display: flex; flex-direction: column; }
.topbar-user strong { font-size: 9.5px; }
.topbar-user span { color: var(--admin-muted); font-size: 8px; }

.admin-view { flex: 1; width: 100%; max-width: 1420px; margin: 0 auto; padding: 28px 32px 52px; }
.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 32px;
  border-top: 1px solid var(--admin-line-soft);
  color: var(--admin-muted-light);
  font-size: 8.5px;
}
.admin-footer div { display: flex; align-items: center; gap: 8px; }
.admin-footer a:hover { color: var(--admin-accent); }

/* ---------------------------------------------------------------------
   Dashboard
   --------------------------------------------------------------------- */

.welcome-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  color: var(--admin-white);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 90, 31, 0.27), transparent 32%),
    radial-gradient(circle at 64% 120%, rgba(255, 138, 85, 0.15), transparent 38%),
    var(--admin-dark);
}
.welcome-banner::after {
  content: "✦";
  position: absolute;
  right: 23%;
  top: -28px;
  color: rgba(255, 255, 255, 0.045);
  font-size: 160px;
  line-height: 1;
  pointer-events: none;
}
.welcome-copy { position: relative; z-index: 1; max-width: 600px; }
.welcome-copy .welcome-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 9px; color: #ffb18d; font-size: 8.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.welcome-copy .welcome-eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.welcome-copy h2 { font-family: var(--font-display); font-size: clamp(21px, 2.3vw, 29px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.18; }
.welcome-copy h2 em { color: #ffb18d; font-family: var(--font-serif); font-weight: 400; font-style: italic; }
.welcome-copy p { max-width: 485px; margin-top: 9px; color: rgba(255, 255, 255, 0.48); font-size: 10px; line-height: 1.65; }
.welcome-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex: none; }
.welcome-actions .admin-btn-ghost { border-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.82); background: rgba(255, 255, 255, 0.07); }
.welcome-actions .admin-btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.11); }
.welcome-date { display: flex; align-items: center; gap: 7px; margin-top: 16px; color: rgba(255, 255, 255, 0.34); font-size: 8.5px; font-weight: 600; }
.welcome-date .icon { width: 12px; height: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 17px 17px 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  background: var(--admin-surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #d8d0c1; box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: var(--admin-accent); background: var(--admin-accent-soft); }
.stat-icon .icon { width: 15px; height: 15px; }
.stat-icon.green { color: var(--admin-green); background: var(--admin-green-soft); }
.stat-icon.blue { color: var(--admin-blue); background: var(--admin-blue-soft); }
.stat-icon.gold { color: var(--admin-gold); background: var(--admin-gold-soft); }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 5px; color: var(--admin-green); background: var(--admin-green-soft); font-size: 8px; font-weight: 800; }
.stat-trend .icon { width: 9px; height: 9px; }
.stat-trend.down { color: var(--admin-red); background: var(--admin-red-soft); }
.stat-label { display: block; margin-top: 15px; color: var(--admin-muted); font-size: 9px; font-weight: 700; }
.stat-value { display: block; margin-top: 3px; font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.05em; line-height: 1.15; }
.stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--admin-line-soft); color: var(--admin-muted); font-size: 8.5px; }
.stat-foot strong { color: var(--admin-ink-soft); font-size: 8.5px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.82fr); gap: 16px; margin-bottom: 16px; }
.panel {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  background: var(--admin-surface);
  box-shadow: var(--shadow-xs);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 19px 0; }
.panel-head h2, .panel-head h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: -0.035em; }
.panel-head p { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.panel-head .panel-link { display: inline-flex; align-items: center; gap: 4px; flex: none; padding-top: 2px; color: var(--admin-accent); font-size: 9px; font-weight: 800; }
.panel-head .panel-link .icon { width: 11px; height: 11px; }
.panel-head .panel-link:hover { color: var(--admin-accent-deep); }
.panel-head .head-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 8px; color: var(--admin-accent); background: var(--admin-accent-soft); }
.panel-head .head-icon .icon { width: 14px; height: 14px; }
.panel-body { padding: 16px 19px 18px; }

.chart-wrap { padding: 17px 19px 14px; }
.chart-summary { display: flex; align-items: center; gap: 10px; }
.chart-summary strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.04em; }
.chart-summary span { padding: 3px 6px; border-radius: 5px; color: var(--admin-green); background: var(--admin-green-soft); font-size: 8px; font-weight: 800; }
.revenue-chart { display: flex; align-items: flex-end; gap: 10px; height: 166px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--admin-line-soft); }
.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; min-width: 0; }
.chart-bar { position: relative; width: min(100%, 36px); height: 8px; min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #ff8e5e, var(--admin-accent)); transition: height 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.chart-col.is-today .chart-bar { background: linear-gradient(180deg, #2c2a21, #15140f); }
.chart-col:hover .chart-bar { filter: brightness(1.05); }
.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  top: -24px;
  padding: 3px 5px;
  border-radius: 4px;
  color: #fff;
  background: var(--admin-dark);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%) translateY(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.chart-col:hover .chart-bar::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.chart-label { color: var(--admin-muted); font-size: 7.5px; font-weight: 700; }
.chart-col.is-today .chart-label { color: var(--admin-ink); }

.low-stock-list { display: flex; flex-direction: column; }
.low-stock-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--admin-line-soft); }
.low-stock-item:first-child { padding-top: 0; }
.low-stock-item:last-child { border-bottom: 0; padding-bottom: 0; }
.low-stock-item img { width: 34px; height: 38px; flex: none; border-radius: 6px; object-fit: cover; background: var(--admin-bg-deep); }
.low-stock-item .low-stock-info { flex: 1; min-width: 0; }
.low-stock-item strong { display: block; overflow: hidden; font-size: 9.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.low-stock-item span { display: block; margin-top: 1px; color: var(--admin-muted); font-size: 8.5px; }
.low-stock-item .stock-pill { flex: none; }

.panel-table .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.panel-table .panel-head { padding-bottom: 14px; }
.recent-panel { margin-bottom: 16px; }

.dash-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr); gap: 16px; }
.dash-side-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mini-stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.top-product-list { display: flex; flex-direction: column; }
.top-product { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--admin-line-soft); }
.top-product:first-child { padding-top: 0; }
.top-product:last-child { border-bottom: 0; padding-bottom: 0; }
.top-product-rank { width: 19px; height: 19px; display: grid; place-items: center; flex: none; border-radius: 5px; color: var(--admin-muted); background: var(--admin-bg); font-size: 8px; font-weight: 800; }
.top-product:first-child .top-product-rank { color: var(--admin-white); background: var(--admin-accent); }
.top-product img { width: 32px; height: 36px; flex: none; border-radius: 5px; object-fit: cover; background: var(--admin-bg-deep); }
.top-product-info { flex: 1; min-width: 0; }
.top-product-info strong { display: block; overflow: hidden; font-size: 9.5px; white-space: nowrap; text-overflow: ellipsis; }
.top-product-info span { color: var(--admin-muted); font-size: 8px; }
.top-product > strong { color: var(--admin-ink-soft); font-size: 9.5px; font-weight: 800; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-action { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--admin-line-soft); border-radius: 8px; background: #fdfbf6; transition: border-color 0.18s, background 0.18s, transform 0.18s; }
.quick-action:hover { border-color: #e9bca9; background: var(--admin-accent-soft); transform: translateY(-1px); }
.quick-action-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: var(--admin-accent); background: var(--admin-white); border: 1px solid var(--admin-line-soft); }
.quick-action-icon .icon { width: 13px; height: 13px; }
.quick-action strong { font-size: 9px; }
.quick-action span { color: var(--admin-muted); font-size: 8px; }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--admin-line); border-radius: var(--radius); background: var(--admin-surface); }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.admin-table thead th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--admin-line);
  color: var(--admin-muted);
  background: #fbf9f4;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table thead th:first-child { padding-left: 16px; }
.admin-table thead th:last-child { padding-right: 16px; text-align: right; }
.admin-table tbody td { padding: 10px 13px; border-bottom: 1px solid var(--admin-line-soft); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover { background: #fdfbf6; }
.admin-table tbody td:first-child { padding-left: 16px; }
.admin-table tbody td:last-child { padding-right: 16px; text-align: right; }
.table-empty { padding: 60px 22px; text-align: center; }
.table-empty .empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--admin-accent); background: var(--admin-accent-soft); }
.table-empty .empty-icon .icon { width: 21px; height: 21px; }
.table-empty h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.035em; }
.table-empty p { max-width: 300px; margin: 4px auto 14px; color: var(--admin-muted); font-size: 10px; line-height: 1.6; }

.cell-product { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.cell-product img { width: 36px; height: 41px; flex: none; border-radius: 6px; object-fit: cover; background: var(--admin-bg-deep); }
.cell-product > div { min-width: 0; }
.cell-product strong { display: block; overflow: hidden; max-width: 240px; color: var(--admin-ink); font-size: 10.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.cell-product span { display: block; margin-top: 1px; color: var(--admin-muted); font-size: 8px; }
.cell-strong { color: var(--admin-ink); font-weight: 800; font-size: 10.5px; }
.cell-sub { display: block; margin-top: 1px; color: var(--admin-muted); font-size: 8.5px; }
.cell-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.cell-customer { min-width: 150px; }
.cell-customer strong { display: block; font-size: 10px; }
.cell-customer span { color: var(--admin-muted); font-size: 8.5px; }
.cell-order { min-width: 105px; }
.cell-order strong { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: -0.01em; }
.order-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--admin-accent); }
.order-dot.is-new { box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.14); }
.payment-tag { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; color: var(--admin-ink-soft); background: var(--admin-bg); font-size: 8px; font-weight: 700; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px; font-size: 8px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pill-diproses { color: #b16705; background: var(--admin-gold-soft); }
.pill-dikirim { color: var(--admin-blue); background: var(--admin-blue-soft); }
.pill-selesai { color: var(--admin-green); background: var(--admin-green-soft); }
.pill-dibatalkan { color: var(--admin-red); background: var(--admin-red-soft); }
.pill-active { color: var(--admin-green); background: var(--admin-green-soft); }
.pill-draft { color: var(--admin-muted); background: var(--admin-bg-deep); }
.pill-accent { color: var(--admin-accent-deep); background: var(--admin-accent-soft); }

.stock-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-ink-soft); font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.stock-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--admin-green); }
.stock-pill.low { color: #a96c09; }
.stock-pill.low::before { background: var(--admin-gold); }
.stock-pill.out { color: var(--admin-red); }
.stock-pill.out::before { background: var(--admin-red); }

.table-status-select {
  height: 29px;
  min-width: 92px;
  padding: 0 25px 0 8px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  color: var(--admin-ink-soft);
  background-color: var(--admin-white);
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
}
.table-status-select:focus { border-color: var(--admin-accent); outline: 0; }

/* ---------------------------------------------------------------------
   Page toolbar / filters
   --------------------------------------------------------------------- */

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
}
.toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 240px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.toolbar-search:focus-within { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.08); }
.toolbar-search .icon { width: 14px; height: 14px; flex: none; color: var(--admin-muted); }
.toolbar-search input { width: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; font-size: 10.5px; }
.toolbar-search input::placeholder { color: var(--admin-muted-light); }
.toolbar-search .search-clear { width: 20px; height: 20px; display: grid; place-items: center; flex: none; border: 0; border-radius: 50%; color: var(--admin-muted); background: var(--admin-bg); }
.toolbar-search .search-clear .icon { width: 9px; height: 9px; }
.toolbar-search .search-clear:hover { color: var(--admin-white); background: var(--admin-accent); }
.toolbar-select { height: 38px; min-width: 128px; padding: 0 31px 0 11px; border: 1px solid var(--admin-line); border-radius: 8px; background-color: var(--admin-surface); font-size: 10px; font-weight: 700; }
.toolbar-select:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.08); outline: 0; }
.results-meta { color: var(--admin-muted); font-size: 9.5px; }
.results-meta strong { color: var(--admin-ink); }

.view-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.view-summary .summary-left { display: flex; align-items: baseline; gap: 8px; color: var(--admin-muted); font-size: 10px; }
.view-summary .summary-left strong { color: var(--admin-ink); font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.04em; }
.view-summary .summary-right { display: flex; align-items: center; gap: 7px; }

/* ---------------------------------------------------------------------
   Categories
   --------------------------------------------------------------------- */

.category-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.category-admin-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: var(--radius);
  background: var(--admin-surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.category-admin-card:hover { transform: translateY(-2px); border-color: #d5ccba; box-shadow: var(--shadow-sm); }
.category-admin-media { position: relative; height: 112px; overflow: hidden; background: var(--admin-bg-deep); }
.category-admin-media img { width: 100%; height: 100%; object-fit: cover; }
.category-admin-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15, 13, 8, 0.42)); }
.category-admin-media .product-count { position: absolute; z-index: 1; left: 10px; bottom: 9px; padding: 3px 7px; border-radius: 5px; color: var(--admin-white); background: rgba(15, 13, 8, 0.44); backdrop-filter: blur(6px); font-size: 7.5px; font-weight: 800; }
.category-admin-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 13px 13px; }
.category-admin-body h3 { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: -0.02em; }
.category-admin-body p { margin-top: 2px; color: var(--admin-muted); font-size: 8px; }
.category-admin-actions { display: flex; gap: 4px; flex: none; }
.add-category-card {
  min-height: 169px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #d7cfbe;
  border-radius: var(--radius);
  color: var(--admin-muted);
  background: rgba(255, 253, 249, 0.5);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.add-category-card:hover { border-color: var(--admin-accent); color: var(--admin-accent); background: var(--admin-accent-soft); }
.add-category-card .add-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--admin-white); border: 1px solid var(--admin-line); }
.add-category-card .add-icon .icon { width: 15px; height: 15px; }
.add-category-card strong { font-size: 10px; }
.add-category-card span { font-size: 8.5px; }

/* ---------------------------------------------------------------------
   Content editor
   --------------------------------------------------------------------- */

.content-stack { display: flex; flex-direction: column; gap: 15px; }
.content-panel .panel-head { padding: 18px 20px 15px; border-bottom: 1px solid var(--admin-line-soft); }
.content-panel .panel-head .head-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 8px; color: var(--admin-accent); background: var(--admin-accent-soft); }
.content-panel .panel-head .head-icon .icon { width: 14px; height: 14px; }
.content-panel .panel-head > div { display: flex; align-items: center; gap: 11px; }
.content-panel .panel-body { padding: 18px 20px 20px; }
.content-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--admin-line-soft); }
.content-actions .saved-note { margin-right: auto; color: var(--admin-muted); font-size: 8.5px; }
.content-actions .saved-note.is-saved { color: var(--admin-green); font-weight: 700; }

.image-input { display: flex; align-items: flex-start; gap: 12px; }
.image-preview {
  width: 78px;
  height: 90px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: var(--admin-bg-deep);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-input-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.image-input-row { display: flex; gap: 6px; }
.image-input-row input { flex: 1; min-width: 0; }
.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 42px;
  padding: 0 11px;
  flex: none;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  color: var(--admin-ink-soft);
  background: var(--admin-white);
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.upload-btn:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.upload-btn .icon { width: 12px; height: 12px; }
.upload-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.image-input .field-hint { color: var(--admin-muted); font-size: 8.5px; }
.logo-editor {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.logo-stage {
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
  border: 1px dashed var(--admin-line);
  border-radius: 11px;
  background-color: var(--admin-bg-deep);
  background-image:
    linear-gradient(45deg, rgba(21, 20, 15, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(21, 20, 15, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(21, 20, 15, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(21, 20, 15, 0.035) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.logo-stage__frame {
  display: grid;
  place-items: center;
  width: calc(64px * var(--logo-scale, 1));
  height: calc(64px * var(--logo-scale, 1));
  max-width: 128px;
  max-height: 128px;
}
.logo-stage__frame[hidden],
.logo-stage__empty[hidden] { display: none; }
.logo-stage__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-stage__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--admin-muted);
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
}
.logo-stage__empty [data-icon] { color: var(--admin-muted-light); }
.logo-editor__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.logo-editor__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.logo-upload { cursor: pointer; }
.logo-remove { min-height: 42px; }
.logo-scale { display: flex; flex-direction: column; gap: 7px; }
.logo-scale__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo-scale__head label { color: var(--admin-ink-soft); font-size: 10.5px; font-weight: 800; }
.logo-scale__head output { color: var(--admin-accent-deep); font-size: 10.5px; font-weight: 800; }
.logo-scale__row { display: flex; align-items: center; gap: 8px; }
.logo-scale__row input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--admin-accent);
  cursor: pointer;
}
.logo-step {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  color: var(--admin-ink-soft);
  background: var(--admin-white);
  cursor: pointer;
}
.logo-step:hover { border-color: var(--admin-accent); color: var(--admin-accent-deep); }
.logo-step:disabled { opacity: 0.45; pointer-events: none; }
@media (max-width: 640px) {
  .logo-editor { grid-template-columns: 1fr; }
  .logo-stage { min-height: 136px; }
}
.content-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.content-form-grid .full { grid-column: 1 / -1; }

/* ---------------------------------------------------------------------
   Customers / settings
   --------------------------------------------------------------------- */

.split-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(270px, 0.72fr); gap: 16px; align-items: start; }
.mini-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.mini-stat { padding: 13px; border: 1px solid var(--admin-line); border-radius: 9px; background: var(--admin-surface); }
.mini-stat span { display: block; color: var(--admin-muted); font-size: 8.5px; }
.mini-stat strong { display: block; margin-top: 3px; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.04em; }
.subscriber-list { display: flex; flex-direction: column; }
.subscriber-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--admin-line-soft); }
.subscriber-row:first-child { padding-top: 0; }
.subscriber-row:last-child { border-bottom: 0; padding-bottom: 0; }
.subscriber-avatar { width: 29px; height: 29px; display: grid; place-items: center; flex: none; border-radius: 7px; color: var(--admin-ink-soft); background: var(--admin-bg); font-family: var(--font-display); font-size: 9px; font-weight: 700; }
.subscriber-row > div { flex: 1; min-width: 0; }
.subscriber-row strong { display: block; overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.subscriber-row span { display: block; color: var(--admin-muted); font-size: 8px; }
.subscriber-row time { flex: none; color: var(--admin-muted); font-size: 8px; }
.customer-spend { font-weight: 800; font-size: 10px; }
.customer-avatar-inline { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: var(--admin-accent-deep); background: var(--admin-accent-soft); font-size: 8.5px; font-weight: 800; }
.cell-customer { display: flex; align-items: center; gap: 8px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 16px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 15px; }
.settings-side { display: flex; flex-direction: column; gap: 15px; }
.settings-panel .panel-head { padding: 17px 19px 0; }
.settings-panel .panel-body { padding: 15px 19px 19px; }
.settings-panel .form-grid { gap: 13px 14px; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.danger-panel { border-color: #ecc9c2; background: #fffaf8; }
.danger-panel .panel-head h2 { color: var(--admin-red); }
.danger-panel .panel-head p { color: #a6756c; }
.danger-panel .panel-body p { color: var(--admin-muted); font-size: 9.5px; line-height: 1.7; }
.danger-panel .admin-btn { width: 100%; margin-top: 13px; }
.data-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.data-actions .admin-btn { width: 100%; }

/* ---------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------- */

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-modal.is-open { display: flex; }
.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 16, 10, 0.57);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease both;
}
.admin-modal-dialog {
  position: relative;
  z-index: 1;
  width: 760px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: var(--admin-surface);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.admin-modal-dialog.modal-sm { width: 440px; }
.admin-modal-dialog.modal-md { width: 620px; }
.admin-modal-dialog.modal-lg { width: 840px; }
.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: none;
  padding: 19px 22px 15px;
  border-bottom: 1px solid var(--admin-line-soft);
}
.admin-modal-eyebrow { display: block; margin-bottom: 3px; color: var(--admin-accent); font-size: 7.5px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.admin-modal-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.045em; }
.admin-modal-close { width: 31px; height: 31px; display: grid; place-items: center; flex: none; border: 1px solid var(--admin-line); border-radius: 8px; color: var(--admin-muted); background: transparent; }
.admin-modal-close:hover { color: var(--admin-ink); background: var(--admin-bg); }
.admin-modal-close .icon { width: 14px; height: 14px; }
.admin-modal-body { overflow-y: auto; padding: 20px 22px 22px; }
.admin-modal-body .form-grid { gap: 15px 16px; }
.admin-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; padding: 14px 22px; border-top: 1px solid var(--admin-line-soft); background: #fbf9f4; }
.admin-modal .content-actions { margin-top: 19px; }
.confirm-content { text-align: center; padding: 4px 4px 2px; }
.confirm-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; color: var(--admin-red); background: var(--admin-red-soft); }
.confirm-icon .icon { width: 22px; height: 22px; }
.confirm-content h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.04em; }
.confirm-content p { max-width: 340px; margin: 7px auto 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.65; }

/* Order detail */
.order-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.order-detail-head h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.04em; }
.order-detail-head p { margin-top: 3px; color: var(--admin-muted); font-size: 9px; }
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; margin-bottom: 16px; }
.order-detail-box { padding: 13px; border: 1px solid var(--admin-line-soft); border-radius: 9px; background: #fdfbf6; }
.order-detail-box h4 { margin-bottom: 5px; color: var(--admin-muted); font-size: 7.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.order-detail-box strong { display: block; font-size: 10.5px; }
.order-detail-box p { margin-top: 2px; color: var(--admin-muted); font-size: 9px; line-height: 1.55; }
.order-detail-box .panel-link { margin-top: 6px; }
.order-detail-box .order-payment-note { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--admin-line); color: var(--admin-muted); font-size: 8.5px; line-height: 1.65; }
.order-proof-box p strong { color: var(--admin-ink); font-size: 9px; }
.order-proof-link { display: block; width: 100%; margin-top: 7px; border-radius: 7px; overflow: hidden; background: var(--admin-bg-deep); }
.order-proof-link img { display: block; width: 100%; max-height: 180px; object-fit: contain; }
.order-items { border: 1px solid var(--admin-line-soft); border-radius: 9px; overflow: hidden; }
.order-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-bottom: 1px solid var(--admin-line-soft); }
.order-item:last-child { border-bottom: 0; }
.order-item img { width: 34px; height: 38px; flex: none; border-radius: 5px; object-fit: cover; background: var(--admin-bg-deep); }
.order-item-info { flex: 1; min-width: 0; }
.order-item-info strong { display: block; overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.order-item-info span { color: var(--admin-muted); font-size: 8.5px; }
.order-item > strong { font-size: 9.5px; }
.order-totals { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--admin-line); }
.order-total-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; color: var(--admin-muted); font-size: 9.5px; }
.order-total-row strong { color: var(--admin-ink); font-weight: 700; }
.order-total-row.grand { margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--admin-line-soft); color: var(--admin-ink); font-weight: 800; font-size: 11px; }
.order-total-row.grand strong { font-family: var(--font-display); font-size: 15px; letter-spacing: -0.03em; }
.order-note { margin-top: 13px; padding: 10px 11px; border-left: 2px solid var(--admin-accent); border-radius: 0 6px 6px 0; color: var(--admin-muted); background: var(--admin-accent-soft); font-size: 9px; line-height: 1.6; }
.order-status-form { display: flex; align-items: flex-end; gap: 9px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--admin-line-soft); }
.order-status-form .admin-field { flex: 1; }
.order-status-form .admin-select { width: 100%; }

/* ---------------------------------------------------------------------
   Toast
   --------------------------------------------------------------------- */

.admin-toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.admin-toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--admin-line);
  border-left: 3px solid var(--admin-green);
  border-radius: 8px;
  color: var(--admin-ink);
  background: var(--admin-surface);
  box-shadow: var(--shadow-md);
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.admin-toast.is-out { animation: toastOut 0.22s ease both; }
.admin-toast-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--admin-green); background: var(--admin-green-soft); }
.admin-toast-icon .icon { width: 11px; height: 11px; }
.admin-toast.error { border-left-color: var(--admin-red); }
.admin-toast.error .admin-toast-icon { color: var(--admin-red); background: var(--admin-red-soft); }
.admin-toast.info { border-left-color: var(--admin-blue); }
.admin-toast.info .admin-toast-icon { color: var(--admin-blue); background: var(--admin-blue-soft); }
.admin-toast.wish { border-left-color: var(--admin-accent); }
.admin-toast.wish .admin-toast-icon { color: var(--admin-accent); background: var(--admin-accent-soft); }

/* ---------------------------------------------------------------------
   Utilities & motion
   --------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--admin-muted); }
.text-accent { color: var(--admin-accent); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.spacer { flex: 1; }

.fade-in { animation: fadeIn 0.25s ease both; }
.fade-up { animation: fadeUp 0.3s ease both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-5px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(15px); } }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr); }
  .admin-global-search { width: 225px; }
}

@media (max-width: 1120px) {
  .topbar-store-link span:last-child { display: none; }
  .dash-grid, .dash-split, .split-grid, .settings-grid { grid-template-columns: 1fr; }
  .welcome-banner { align-items: flex-start; flex-direction: column; gap: 18px; }
  .welcome-actions { margin-top: 0; }
  .content-form-grid { grid-template-columns: 1fr; }
  .content-form-grid .full { grid-column: auto; }
  .settings-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  :root { --sidebar-width: 252px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.28);
  }
  .admin-shell.sidebar-open .admin-sidebar { transform: translateX(0); }
  .sidebar-close { display: grid; }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: none;
    border: 0;
    background: rgba(15, 13, 8, 0.45);
    backdrop-filter: blur(2px);
  }
  .admin-shell.sidebar-open .sidebar-scrim { display: block; }
  .topbar-menu { display: grid; }
  .admin-topbar { padding: 0 20px; }
  .admin-view { padding: 24px 20px 44px; }
  .admin-footer { padding: 16px 20px; }
  .admin-global-search { width: 200px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 40px 24px; }
  .login-mobile-brand { display: block; }
}

@media (max-width: 720px) {
  .admin-global-search { display: none; }
  .mini-stat-grid.four { grid-template-columns: 1fr 1fr; }
  .topbar-store-link { width: 38px; justify-content: center; padding: 0; }
  .topbar-user > div { display: none; }
  .topbar-divider { display: none; }
  .admin-topbar { min-height: 68px; padding: 0 15px; }
  .topbar-heading h1 { font-size: 17px; }
  .topbar-eyebrow { font-size: 7px; }
  .admin-view { padding: 18px 15px 38px; }
  .admin-footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 15px; }
  .admin-footer div { display: none; }
  .welcome-banner { padding: 21px 20px; }
  .welcome-actions { width: 100%; }
  .welcome-actions .admin-btn { flex: 1; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 20px; }
  .admin-table { min-width: 690px; }
  .view-toolbar { align-items: stretch; }
  .view-toolbar > .admin-btn { width: 100%; }
  .toolbar-group { width: 100%; }
  .toolbar-search { flex: 1; width: auto; min-width: 170px; }
  .toolbar-select { flex: 1; min-width: 120px; }
  .category-admin-grid { grid-template-columns: 1fr 1fr; }
  .category-admin-media { height: 94px; }
  .settings-side { grid-template-columns: 1fr; }
  .admin-modal { padding: 12px; }
  .admin-modal-dialog { max-height: calc(100vh - 24px); }
  .admin-modal-head { padding: 16px 17px 13px; }
  .admin-modal-body { padding: 17px; }
  .form-grid, .content-form-grid { grid-template-columns: 1fr; }
  .form-grid .full, .content-form-grid .full { grid-column: auto; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .login-heading h1 { font-size: 33px; }
  .login-panel { padding: 32px 20px; }
  .demo-credentials > button { display: none; }
  .notif-panel { width: 290px; right: -44px; }
}

@media (max-width: 480px) {
  .mini-stat-grid.four { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { display: grid; grid-template-columns: 1fr auto; align-items: start; }
  .stat-card .stat-top { display: contents; }
  .stat-icon { grid-column: 1; grid-row: 1; }
  .stat-label { grid-column: 1; }
  .stat-value { grid-column: 1; }
  .stat-trend { grid-column: 2; grid-row: 1; }
  .stat-foot { grid-column: 1 / -1; }
  .category-admin-grid { grid-template-columns: 1fr; }
  .topbar-heading h1 { max-width: 155px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-icon { width: 35px; height: 35px; }
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 74px; width: auto; }
  .demo-credentials { align-items: flex-start; }
  .image-input { flex-direction: column; }
  .image-preview { width: 100%; height: 126px; }
  .mini-stat-grid { grid-template-columns: 1fr; }
  .login-floating-card { display: none; }
}

@media (max-width: 720px) {
  html,
  body {
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
