/* TH;EN – Shop-Tool (admin.html) */
body.admin { background: #0b0b0b; }
.admin [hidden] { display: none !important; }

/* Login */
.adm-login { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.adm-login__logo { width: 160px; }
.adm-login__title { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.adm-login__form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.adm-login__form input { min-width: 240px; }

/* Inputs */
.adm input[type=text], .adm input[type=number], .adm input[type=email], .adm input[type=search], .adm select, .adm textarea,
.adm-login input {
  font: inherit; font-size: 14px; color: var(--white); background: #141414;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; outline: none; width: 100%;
}
.adm-login input { border-radius: 999px; padding: 0 18px; min-height: 44px; width: auto; }
.adm input:focus, .adm select:focus, .adm textarea:focus, .adm-login input:focus { border-color: var(--white); }
.adm textarea { min-height: 90px; resize: vertical; }
.adm select option { background: #141414; }
.adm label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.adm label.adm-check { flex-direction: row; align-items: center; gap: 8px; letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--white); }
.adm .btn { min-height: 40px; font-size: 12px; }
.adm .btn[disabled] { opacity: .45; cursor: not-allowed; }
.adm-error { width: 100%; text-align: center; font-size: 13px; color: #ff7a7a; }

/* Layout */
.adm-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px;
  padding: 14px 28px; background: rgba(11,11,11,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.adm-top__logo { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.adm-top__logo img { height: 20px; }
.adm-tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.adm-tabs a { padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.adm-tabs a:hover { color: var(--white); }
.adm-tabs a.is-active { background: var(--white); color: var(--black); }
.adm-pill { background: #ff5a3c; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.adm-link { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.adm-link:hover { color: var(--white); }
.adm-main { max-width: 1200px; margin: 0 auto; padding: 32px 28px 80px; }
@media (max-width: 760px) { .adm-top { flex-wrap: wrap; gap: 10px; padding: 12px 16px; } .adm-main { padding: 20px 16px 60px; } }

.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.adm-head h1 { font-size: 26px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }
.adm-head .adm-sub { font-size: 13px; color: var(--muted); }
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-filters a, .adm-filters button { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted); }
.adm-filters a.is-active, .adm-filters button.is-active { border-color: var(--white); color: var(--white); }
.adm-filters input { width: 220px; border-radius: 999px; padding: 7px 14px; }
.adm-back { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: inline-block; margin-bottom: 16px; }
.adm-back:hover { color: var(--white); }

/* Table */
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
.adm-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr[data-href] { cursor: pointer; }
.adm-table tr[data-href]:hover td { background: #141414; }
.adm-table .num { text-align: right; white-space: nowrap; }
.adm-muted { color: var(--muted); font-size: 12px; }
.adm-empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: 14px; }
@media (max-width: 760px) { .adm-table .hide-sm { display: none; } }

.adm-status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.adm-status--paid { background: #ff5a3c; color: #fff; }
.adm-status--packed { background: #f0b429; color: #111; }
.adm-status--shipped { background: #2fb36a; color: #fff; }
.adm-status--cancelled { background: #333; color: #aaa; }

/* Cards */
.adm-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.adm-kv dd, .adm-table td { overflow-wrap: anywhere; }
@media (max-width: 900px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-card { background: #121212; border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.adm-card h2 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.adm-card--accent { border-color: var(--white); }
.adm-stack { display: flex; flex-direction: column; gap: 20px; }
.adm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .adm-row { grid-template-columns: 1fr; } }
.adm-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-address { font-size: 15px; line-height: 1.6; white-space: pre-line; }
.adm-kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 14px; }
.adm-kv dt { color: var(--muted); }
.adm-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-items td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.adm-items tr:last-child td { border-bottom: 0; }
.adm-items .num { text-align: right; white-space: nowrap; }
.adm-items .total td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.adm-history { list-style: none; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.adm-history time { color: var(--muted-2); margin-right: 8px; }
.adm-tracking { font-size: 15px; }
.adm-tracking strong { font-size: 18px; letter-spacing: .02em; }
.adm-tracking a { color: var(--white); border-bottom: 1px solid var(--line-strong); }

/* Products */
.adm-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.adm-product { background: #121212; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .2s; }
.adm-product:hover { border-color: var(--white); }
.adm-product__img { aspect-ratio: 1/1; background: #1a1a1a; display: grid; place-items: center; color: var(--muted-2); font-size: 11px; }
.adm-product__img img { width: 100%; height: 100%; object-fit: cover; }
.adm-product__body { padding: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.adm-product.is-inactive { opacity: .5; }
.adm-preview { width: 140px; aspect-ratio: 1/1; background: #1a1a1a; border-radius: 8px; overflow: hidden; display: grid; place-items: center; color: var(--muted-2); font-size: 11px; }
.adm-preview img { width: 100%; height: 100%; object-fit: cover; }

.adm-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--white); color: var(--black); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.adm-toast.is-error { background: #ff5a3c; color: #fff; }
