/* ============ Windoors Admin ============ */
:root {
  --ink: #101623; --ink-2: #1b2436; --bg: #f4f6f9; --line: #e3e7ee;
  --muted: #5b6472; --ok: #15803d; --danger: #c8102e; --accent: #101623;
}
* { box-sizing: border-box; }
body.admin {
  margin: 0; font: 14px/1.55 'Inter', system-ui, sans-serif; color: #1c2431;
  background: var(--bg); display: flex; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 24px; margin: 0; }
h1 small { font-size: 13px; font-weight: 400; color: var(--muted); }
h2 { font-size: 16px; margin: 0; }
code { background: #eef1f6; padding: 1px 6px; border-radius: 5px; }

/* sidebar */
.a-side {
  width: 232px; flex: none; background: var(--ink); color: #cfd6e4;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.a-logo { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid #232e45; }
.a-logo img { height: 30px; background: #fff; border-radius: 6px; padding: 4px 7px; }
.a-logo span { font-weight: 700; color: #fff; letter-spacing: .04em; }
.a-nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; flex: 1; }
.a-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 9px; font-weight: 500; color: #b9c2d4; transition: all .15s;
}
.a-nav a:hover { background: #1b2436; color: #fff; }
.a-nav a.is-active { background: #fff; color: var(--ink); font-weight: 600; }
.a-side-foot { padding: 14px; border-top: 1px solid #232e45; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.a-side-foot a { color: #8fa0bf; }
.a-side-foot a:hover { color: #fff; }

/* main */
.a-main { flex: 1; padding: 26px 30px 60px; max-width: 1200px; }
.a-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.a-muted { color: var(--muted); }
.a-link { color: var(--ink); font-weight: 600; }
.a-flash {
  background: #e8f6ee; color: var(--ok); font-weight: 600; font-size: 13.5px;
  padding: 11px 16px; border-radius: 10px; margin-bottom: 16px;
}
.a-flash.is-err { background: #fdeef1; color: var(--danger); }
.a-warn {
  background: #fff7e6; border: 1px solid #f3dfae; color: #8a6100; font-weight: 500;
  padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px;
}
.a-warn a { text-decoration: underline; }

/* stats */
.a-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.a-stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px; }
.a-stat b { display: block; font-size: 24px; font-weight: 700; }
.a-stat span { font-size: 12.5px; color: var(--muted); }

/* cards & tables */
.a-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.a-card > .a-table, .a-card > .a-table-wrap { overflow-x: auto; }
.a-card > .a-table { display: block; overflow-x: auto; }
.a-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.a-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.a-cols > .a-card { margin-bottom: 20px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-card > .a-table { display: block; overflow-x: auto; }
.a-table-products { min-width: 860px; }
.a-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.a-table td { padding: 9px 10px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.a-table tr:hover td { background: #fafbfd; }
.a-strong { font-weight: 600; }
.a-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #f0f2f6; }
.a-thumb-lg { width: 70px; margin-top: 8px; border-radius: 8px; }
.a-empty { color: var(--muted); font-style: italic; }
.a-tag { background: #eef1f6; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.a-tag.is-ok { background: #e8f6ee; color: var(--ok); }
.a-tag.is-warn { background: #fff1e6; color: #b45309; }
.a-flag { font-size: 15px; color: #c9cfda; }
.a-flag.is-on { color: #f0a626; }
.a-actions { white-space: nowrap; }
.a-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #f0f2f6; font-size: 13px; }
.a-icon:hover { background: var(--ink); color: #fff; }
.a-icon.is-danger:hover { background: var(--danger); }

/* forms */
.a-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 12px; }
.a-form label small { font-weight: 400; color: var(--muted); }
.a-form input[type="text"], .a-form input[type="search"], .a-form input[type="email"],
.a-form input[type="password"], .a-form input[type="number"], .a-form input[type="url"],
.a-form select, .a-form textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font: 400 13.5px 'Inter', sans-serif;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: inherit; outline: none;
}
.a-form input:focus, .a-form select:focus, .a-form textarea:focus { border-color: var(--ink); }
.a-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.a-check { display: flex; align-items: center; gap: 8px; }
.a-check input { width: auto !important; margin: 0 !important; }
.a-filterbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.a-filterbar input, .a-filterbar select { padding: 9px 13px; border: 1.5px solid var(--line); border-radius: 9px; font: 400 13.5px 'Inter', sans-serif; }

/* buttons */
.a-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  font: 600 13.5px 'Inter', sans-serif; padding: 10px 20px; transition: all .15s;
}
.a-btn:hover { background: var(--ink-2); }
.a-btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.a-btn-ghost:hover { border-color: var(--ink); background: #fff; }
.a-savebar { display: flex; gap: 10px; padding: 16px 0 4px; }

/* product images */
.a-imgs { display: flex; flex-wrap: wrap; gap: 12px; }
.a-img { width: 104px; height: 104px; border-radius: 11px; overflow: hidden; position: relative; border: 2px solid var(--line); }
.a-img.is-main { border-color: var(--ink); }
.a-img img { width: 100%; height: 100%; object-fit: cover; }
.a-img-main { position: absolute; top: 5px; left: 5px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.a-img-ops { position: absolute; bottom: 0; left: 0; right: 0; display: flex; background: rgba(16,22,35,.85); opacity: 0; transition: opacity .15s; }
.a-img:hover .a-img-ops { opacity: 1; }
.a-img-ops a { flex: 1; text-align: center; color: #fff; padding: 5px 0; font-size: 12px; }
.a-img-ops a:hover { background: rgba(255,255,255,.2); }
.a-img-ops a.is-danger:hover { background: var(--danger); }
.a-img-add { display: grid; place-items: center; cursor: pointer; border-style: dashed; background: #fafbfd; }
.a-img-add span { text-align: center; font-size: 22px; color: var(--muted); }
.a-img-add small { display: block; font-size: 11px; }

/* SERP preview */
.a-serp { background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.a-serp-url { font-size: 12px; color: #0b6e4f; }
.a-serp-title { color: #1a0dab; font-size: 16px; line-height: 1.3; }
.a-serp-desc { font-size: 12.5px; color: #4d5156; }

/* pager + tabs */
.a-pager { display: flex; gap: 6px; }
.a-pager a { min-width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: 13px; }
.a-pager a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.a-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.a-tabs a { padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.a-tabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.a-quick { display: flex; gap: 10px; flex-wrap: wrap; }

/* login page */
.a-login-page { display: block; background: linear-gradient(135deg, #101623, #1b2436); }
.a-login {
  background: #fff; border-radius: 18px; padding: 38px 36px; width: min(400px, 92vw);
  margin: 12vh auto; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.a-login h1 { font-size: 20px; margin-bottom: 18px; }
.a-login-logo { height: 40px; width: fit-content; margin-bottom: 18px; }
.a-login form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.a-login input { width: 100%; margin-top: 5px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px; font: 400 14px 'Inter', sans-serif; }
.a-login .a-btn { width: 100%; justify-content: center; padding: 13px; }
.a-login-hint { font-size: 12px; color: var(--muted); margin-top: 16px; }
.a-login-back { margin-top: 10px; font-size: 13px; color: var(--muted); }
.a-form-msg { padding: 10px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.a-form-msg.is-err { background: #fdeef1; color: var(--danger); }

@media (max-width: 960px) {
  .a-cols { grid-template-columns: 1fr; }
  .a-side { width: 64px; }
  .a-logo { justify-content: center; padding: 14px 8px; }
  .a-logo span, .a-nav a span, .a-side-foot { display: none; }
  .a-nav a { justify-content: center; padding: 11px 0; }
  .a-nav a.is-active { background: #fff; color: var(--ink); }
  .a-main { padding: 20px 16px 50px; }
  .a-head h1 { font-size: 20px; }
  .a-grid2 { grid-template-columns: 1fr; }
}
