/* ==========================================================================
   Admin panel
   Desktop-first, collapses to a single column on tablets and phones.
   ========================================================================== */

:root {
  color-scheme: light;
  --ad-bg: #f4f5f8;
  --ad-panel: #ffffff;
  --ad-ink: #171a21;
  --ad-ink-soft: #636b7a;
  --ad-ink-faint: #98a0ae;
  --ad-line: #e3e6ec;
  --ad-line-soft: #eef0f4;
  --ad-brand: #3f5fd8;
  --ad-brand-dark: #2f49ab;
  --ad-green: #0f9d58;
  --ad-green-bg: #e6f6ee;
  --ad-amber: #b96a06;
  --ad-amber-bg: #fdf2e0;
  --ad-red: #cf2f45;
  --ad-red-bg: #fdeaed;
  --ad-blue-bg: #e8f1fe;
  --ad-radius: 12px;
  --ad-sidebar: 232px;
  --ad-shadow: 0 1px 2px rgba(23, 26, 33, .05), 0 6px 20px rgba(23, 26, 33, .05);
  --ad-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body.ad {
  margin: 0;
  font-family: var(--ad-font);
  font-size: 14px;
  color: var(--ad-ink);
  background: var(--ad-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
img { max-width: 100%; display: block; }

.ad-skip { position: absolute; left: -9999px; }
.ad-skip:focus { left: 12px; top: 12px; z-index: 100; padding: 8px 14px; background: #fff; border-radius: 8px; }

/* --------------------------------------------------------------- sidebar */

.ad-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--ad-sidebar);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  background: #14171f; color: #ccd2de;
  transition: transform .25s ease;
}
.ad-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.ad-brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 9px;
  background: linear-gradient(135deg, #5a78ef, #2f49ab);
  color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
}
.ad-brand-text { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.ad-brand-text strong { color: #fff; font-size: 14px; }
.ad-brand-text small { color: #78818f; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }

.ad-nav { display: flex; flex-direction: column; gap: 2px; }
.ad-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: #aeb6c4; font-size: 13.5px; font-weight: 500;
  transition: background .16s ease, color .16s ease;
}
.ad-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ad-nav-link.is-active { background: var(--ad-brand); color: #fff; }

.ad-sidebar-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.ad-user { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: #8b94a3; }
.ad-user-dot { width: 7px; height: 7px; border-radius: 50%; background: #2fd08a; }
.ad-logout {
  width: 100%; padding: 8px; border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px; background: none; color: #aeb6c4; font-size: 12.5px;
  transition: background .16s ease;
}
.ad-logout:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.ad-menu-toggle {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 60;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--ad-line); border-radius: 10px;
  background: #fff; box-shadow: var(--ad-shadow);
}
.ad-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(10, 12, 18, .45); }

/* ----------------------------------------------------------------- shell */

.ad-shell { margin-left: var(--ad-sidebar); min-height: 100vh; }
.ad-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px;
  background: rgba(244, 245, 248, .9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ad-line);
}
.ad-top-title { font-size: 19px; }
.ad-main { padding: 22px 26px 60px; max-width: 1320px; }

/* --------------------------------------------------------------- flashes */

.ad-flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ad-flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
}
.ad-flash--success { background: var(--ad-green-bg); border-color: #bfe6d1; color: #0a6b3d; }
.ad-flash--error { background: var(--ad-red-bg); border-color: #f4c4cc; color: #99162a; }
.ad-flash-close { border: none; background: none; font-size: 19px; line-height: 1; opacity: .5; }
.ad-flash-close:hover { opacity: 1; }

/* ---------------------------------------------------------------- panels */

.ad-panel {
  background: var(--ad-panel);
  border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius);
  box-shadow: var(--ad-shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.ad-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid var(--ad-line-soft);
}
.ad-panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.ad-panel-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ad-step {
  width: 21px; height: 21px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ad-brand); color: #fff; font-size: 11.5px; font-weight: 700;
}
.ad-muted { color: var(--ad-ink-soft); font-weight: 400; }
.ad-link { color: var(--ad-brand); font-size: 13px; font-weight: 600; }
.ad-link:hover { text-decoration: underline; }
.ad-hint { margin: 0; font-size: 12.5px; color: var(--ad-ink-soft); line-height: 1.6; }

/* ----------------------------------------------------------------- stats */

.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ad-stat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 16px 18px;
  background: var(--ad-panel); border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius); box-shadow: var(--ad-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ad-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stat-color, var(--ad-brand)); }
.ad-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23, 26, 33, .1); }
.ad-stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ad-ink-faint); }
.ad-stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }

.ad-revenue { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 18px; }
.ad-revenue > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.ad-revenue-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.ad-revenue-split { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ad-ink-soft); }
.ad-revenue-split strong { color: var(--ad-ink); font-size: 15px; }

/* ---------------------------------------------------------------- tables */

.ad-table-wrap { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ad-table th {
  padding: 10px 14px; text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ad-ink-faint); background: #fafbfc;
  border-bottom: 1px solid var(--ad-line);
}
.ad-table td { padding: 12px 14px; border-bottom: 1px solid var(--ad-line-soft); vertical-align: middle; }
.ad-table tr:last-child td { border-bottom: none; }
.ad-table tbody tr:hover { background: #fafbfd; }
.ad-col-actions { width: 1%; white-space: nowrap; text-align: right; }

.ad-cell-customer { display: flex; flex-direction: column; gap: 2px; }
.ad-cell-customer strong { font-size: 13.5px; }
.ad-cell-customer .ad-muted { font-size: 11.5px; }

.ad-slug {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 230px; padding: 5px 10px;
  border: 1px solid var(--ad-line); border-radius: 7px;
  background: #fafbfc; color: var(--ad-ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  transition: border-color .16s ease, color .16s ease;
}
.ad-slug span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-slug:hover { border-color: var(--ad-brand); color: var(--ad-brand); }
.ad-slug.is-copied { border-color: var(--ad-green); color: var(--ad-green); }

.ad-pill {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.ad-pill--paid { background: var(--ad-green-bg); color: #0a6b3d; }
.ad-pill--unpaid { background: var(--ad-amber-bg); color: var(--ad-amber); }
.ad-pill--active { background: var(--ad-blue-bg); color: #1b56ad; }
.ad-pill--draft { background: #eef0f4; color: #5d6675; }
.ad-pill--archived { background: #f1eef4; color: #6b5a80; }
.ad-theme-chip { display: inline-block; padding: 3px 9px; border: 1px solid var(--ad-line); border-radius: 6px; font-size: 12px; color: var(--ad-ink-soft); }

.ad-actions { display: inline-flex; align-items: center; gap: 5px; }
.ad-icon-btn {
  width: 30px; height: 30px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--ad-line); border-radius: 8px;
  background: #fff; color: var(--ad-ink-soft);
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.ad-icon-btn:hover { border-color: var(--ad-brand); color: var(--ad-brand); background: #f7f9ff; }

.ad-menu { position: relative; }
.ad-menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 205px; padding: 6px;
  background: #fff; border: 1px solid var(--ad-line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(23, 26, 33, .14);
  text-align: left;
}
.ad-menu-panel a,
.ad-menu-panel button {
  display: block; width: 100%; padding: 8px 10px;
  border: none; border-radius: 7px; background: none;
  font-size: 13px; text-align: left; color: var(--ad-ink);
}
.ad-menu-panel a:hover, .ad-menu-panel button:hover { background: #f3f5f9; }
.ad-menu-panel hr { margin: 5px 6px; border: none; border-top: 1px solid var(--ad-line-soft); }
.ad-menu-panel .ad-danger { color: var(--ad-red); }
.ad-menu-panel .ad-danger:hover { background: var(--ad-red-bg); }
.ad-menu-panel form { margin: 0; }

.ad-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px; text-align: center; }
.ad-empty strong { font-size: 15px; }
.ad-empty span { color: var(--ad-ink-soft); font-size: 13px; }
.ad-empty .ad-btn { margin-top: 8px; }

/* --------------------------------------------------------------- filters */

.ad-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-search { position: relative; flex: 1 1 300px; min-width: 220px; }
.ad-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ad-ink-faint); pointer-events: none; }
.ad-search .ad-input { padding-left: 36px; }

.ad-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 50px;
  border: 1px solid var(--ad-line); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--ad-ink-soft);
  transition: all .16s ease;
}
.ad-tab:hover { border-color: var(--ad-brand); color: var(--ad-brand); }
.ad-tab.is-active { background: var(--ad-ink); border-color: var(--ad-ink); color: #fff; }
.ad-tab-count { padding: 1px 7px; border-radius: 50px; background: rgba(0, 0, 0, .07); font-size: 11.5px; }
.ad-tab.is-active .ad-tab-count { background: rgba(255, 255, 255, .18); }

.ad-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; border-top: 1px solid var(--ad-line-soft); }

/* ---------------------------------------------------------------- inputs */

.ad-field { display: flex; flex-direction: column; gap: 6px; }
.ad-label { font-size: 12.5px; font-weight: 600; color: var(--ad-ink); }
.ad-label em { color: var(--ad-red); font-style: normal; }
.ad-optional { font-weight: 400; color: var(--ad-ink-faint); font-size: 11.5px; }
.ad-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--ad-line); border-radius: 9px;
  background: #fff; font: inherit; font-size: 13.5px; color: var(--ad-ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ad-input:focus { outline: none; border-color: var(--ad-brand); box-shadow: 0 0 0 3px rgba(63, 95, 216, .13); }
.ad-input.has-error, .has-error .ad-input { border-color: var(--ad-red); }
textarea.ad-input { resize: vertical; line-height: 1.6; }
.ad-select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #98a0ae 50%), linear-gradient(135deg, #98a0ae 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.ad-error { font-size: 12px; color: var(--ad-red); }
.ad-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.ad-check input { margin-top: 2px; }
.ad-file { font-size: 12.5px; }

.ad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ad-row--three { grid-template-columns: repeat(3, 1fr); }

.ad-slug-input { display: flex; align-items: center; border: 1px solid var(--ad-line); border-radius: 9px; background: #fff; overflow: hidden; }
.ad-slug-input:focus-within { border-color: var(--ad-brand); box-shadow: 0 0 0 3px rgba(63, 95, 216, .13); }
.ad-slug-input.has-error { border-color: var(--ad-red); }
.ad-slug-prefix {
  padding: 9px 4px 9px 12px; flex: none;
  color: var(--ad-ink-faint); font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.ad-slug-input .ad-input { border: none; box-shadow: none; padding-left: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ad-slug-input .ad-input:focus { box-shadow: none; }
.ad-slug-feedback { min-height: 17px; font-size: 12px; }
.ad-slug-feedback.is-ok { color: var(--ad-green); }
.ad-slug-feedback.is-bad { color: var(--ad-red); }
.ad-suggestions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ad-ink-soft); }
.ad-chip {
  padding: 4px 10px; border: 1px solid var(--ad-line); border-radius: 50px;
  background: #fff; font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ad-chip:hover { border-color: var(--ad-brand); color: var(--ad-brand); }

.ad-price-input { display: flex; align-items: center; gap: 0; border: 1px solid var(--ad-line); border-radius: 9px; overflow: hidden; background: #fff; }
.ad-price-input span { padding: 9px 0 9px 12px; color: var(--ad-ink-faint); }
.ad-price-input .ad-input { border: none; }

/* --------------------------------------------------------------- buttons */

.ad-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border: 1px solid var(--ad-line); border-radius: 9px;
  background: #fff; color: var(--ad-ink);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: all .16s ease;
}
.ad-btn:hover { border-color: #c9cfda; background: #f7f8fa; }
.ad-btn--primary { background: var(--ad-brand); border-color: var(--ad-brand); color: #fff; }
.ad-btn--primary:hover { background: var(--ad-brand-dark); border-color: var(--ad-brand-dark); }
.ad-btn--ghost { background: transparent; }
.ad-btn--danger { background: var(--ad-red); border-color: var(--ad-red); color: #fff; }
.ad-btn--danger:hover { background: #b02539; border-color: #b02539; }
.ad-btn--block { width: 100%; }
.ad-btn--small { padding: 6px 12px; font-size: 12.5px; }

/* ------------------------------------------------------------------ form */

.ad-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 18px; align-items: start; }
.ad-form-main { min-width: 0; }
.ad-sticky { position: sticky; top: 74px; }

.ad-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 11px; }
.ad-theme {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 10px; border: 2px solid var(--ad-line); border-radius: 12px;
  background: #fff; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ad-theme:hover { border-color: #c3cbe0; transform: translateY(-2px); }
.ad-theme.is-selected { border-color: var(--ad-brand); box-shadow: 0 0 0 3px rgba(63, 95, 216, .12); }
.ad-theme input { position: absolute; opacity: 0; pointer-events: none; }
.ad-theme-preview {
  position: relative; height: 88px; border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(160deg, var(--c1), color-mix(in srgb, var(--c1) 55%, #000));
}
.ad-theme-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--c3), var(--c2));
  box-shadow: 0 0 16px color-mix(in srgb, var(--c2) 60%, transparent);
}
.ad-theme-lines { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ad-theme-lines i { display: block; height: 3px; border-radius: 3px; background: var(--c2); opacity: .85; }
.ad-theme-lines i:nth-child(1) { width: 54px; }
.ad-theme-lines i:nth-child(2) { width: 38px; opacity: .55; }
.ad-theme-lines i:nth-child(3) { width: 46px; opacity: .35; }
.ad-theme-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.ad-theme-meta strong { font-size: 13px; }
.ad-theme-meta small { font-size: 11.5px; color: var(--ad-ink-soft); }
.ad-theme-check {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px; display: none; place-items: center;
  border-radius: 50%; background: var(--ad-brand); color: #fff; font-size: 11px;
}
.ad-theme.is-selected .ad-theme-check { display: grid; }

.ad-repeater { display: flex; flex-direction: column; gap: 8px; }
.ad-repeater-row { display: grid; grid-template-columns: 130px 1fr 1.4fr 30px; gap: 8px; align-items: center; }
.ad-repeater-remove { border-color: var(--ad-line); font-size: 17px; line-height: 1; }
.ad-repeater-remove:hover { border-color: var(--ad-red); color: var(--ad-red); }

.ad-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.ad-media { display: flex; flex-direction: column; gap: 7px; }
.ad-media-preview { position: relative; border: 1px solid var(--ad-line); border-radius: 10px; overflow: hidden; background: #f7f8fa; }
.ad-media-preview img { width: 100%; height: 118px; object-fit: contain; }
.ad-media-preview--wide img { height: 150px; object-fit: cover; }
.ad-media-remove {
  position: absolute; top: 6px; right: 6px;
  padding: 4px 9px; border: none; border-radius: 6px;
  background: rgba(20, 23, 31, .78); color: #fff; font-size: 11.5px; font-weight: 600;
}
.ad-media-remove:hover { background: var(--ad-red); }

.ad-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 4px; }
.ad-gallery-item { position: relative; margin: 0; border: 1px solid var(--ad-line); border-radius: 10px; overflow: hidden; background: #fff; cursor: grab; }
.ad-gallery-item.is-dragging { opacity: .45; }
.ad-gallery-item img { width: 100%; height: 104px; object-fit: cover; }



.ad-audio-current { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; }
.ad-audio-current audio { height: 34px; max-width: 100%; }
.ad-audio-current .ad-media-remove { position: static; }

.ad-side-links { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.ad-meta { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--ad-line-soft); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ad-meta > div { display: flex; justify-content: space-between; gap: 10px; }
.ad-meta dt { color: var(--ad-ink-faint); }
.ad-meta dd { margin: 0; font-weight: 600; text-align: right; }

.ad-danger-zone { border-color: #f0d3d8; }
.ad-danger-row { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------- success */

.ad-success { max-width: 620px; margin: 26px auto; padding: 34px 30px; text-align: center; }
.ad-success-mark {
  width: 54px; height: 54px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ad-green-bg); color: var(--ad-green); font-size: 25px;
}
.ad-success h2 { font-size: 21px; margin-bottom: 5px; }
.ad-success-url { display: flex; gap: 8px; margin: 22px 0 14px; }
.ad-success-url .ad-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.ad-success-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ad-success-state { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.ad-note { padding: 13px 15px; border-radius: 10px; font-size: 13px; line-height: 1.65; }
.ad-note--info { background: var(--ad-amber-bg); color: #7c4a06; }
.ad-note--ok { background: var(--ad-green-bg); color: #0a6b3d; }
.ad-note--warn { background: var(--ad-blue-bg); color: #1b4fa0; }
.ad-note-action { margin-top: 9px; }
.ad-success-next { display: flex; justify-content: center; gap: 7px; margin-top: 22px; font-size: 13px; }

/* ----------------------------------------------------------------- login */

body.ad.ad-login-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, #1b2030, #0d1017); padding: 24px; }
.ad-login { width: min(100%, 380px); }
.ad-login-card { padding: 32px 28px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.ad-login-brand { text-align: center; margin-bottom: 22px; }
.ad-login-brand .ad-brand-mark { margin: 0 auto 14px; width: 42px; height: 42px; font-size: 14px; }
.ad-login-brand h1 { font-size: 19px; margin-bottom: 5px; }
.ad-login-brand p { margin: 0; font-size: 13px; color: var(--ad-ink-soft); }
.ad-login-card form { display: flex; flex-direction: column; gap: 14px; }
.ad-login-error { margin-bottom: 14px; }
.ad-login-note { margin: 16px 0 0; text-align: center; font-size: 12px; color: #6b7488; }

/* ----------------------------------------------------------------- toast */

.ad-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200;
  transform: translate(-50%, 16px);
  padding: 10px 18px; border-radius: 50px;
  background: #14171f; color: #fff;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.ad-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .ad-form-grid { grid-template-columns: 1fr; }
  .ad-sticky { position: static; }
}

@media (max-width: 900px) {
  .ad-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .ad-sidebar.is-open { transform: none; }
  .ad-menu-toggle { display: flex; }
  .ad-shell { margin-left: 0; }
  .ad-top { padding: 14px 18px 14px 62px; }
  .ad-main { padding: 18px 18px 60px; }
  .ad-row, .ad-row--three { grid-template-columns: 1fr; }
  .ad-repeater-row { grid-template-columns: 1fr 1fr; }
  .ad-repeater-row .ad-repeater-remove { grid-column: 2; justify-self: end; }
}

@media (max-width: 560px) {
  .ad-top-title { font-size: 17px; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
  .ad-success { padding: 26px 20px; }
  .ad-success-url { flex-direction: column; }
  .ad-danger-row { flex-direction: column; align-items: stretch; }
}
