/* Smart Tech Gadgets — admin panel */
:root {
  --navy-950: #06132d; --navy-900: #0b1f44; --navy-800: #122a58; --navy-700: #1a3a74; --navy-100: #e6ecf7; --navy-50: #f3f6fb;
  --gold-600: #b8891f; --gold-500: #d4a53c; --gold-300: #f1d58a; --gold-50: #fbf5e4;
  --ink: #0e1726; --ink-2: #3b4a63; --ink-3: #66748c; --line: #dde3ee; --bg: #f4f6fa; --card: #fff;
  --green: #1a9a52; --red: #c93838; --red-50: #fdeeee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11,31,68,.06), 0 4px 14px rgba(11,31,68,.06);
  --font: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-700); }
img { max-width: 100%; display: block; }
.boot { text-align: center; padding: 80px 16px; color: var(--ink-3); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; color: var(--navy-900); white-space: nowrap; min-height: 40px; }
.btn:hover { border-color: var(--navy-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-800); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-300); border-color: var(--gold-500); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: var(--red-50); }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: .82rem; border-radius: 8px; }
.btn-icon { width: 34px; min-height: 34px; padding: 0; border-radius: 8px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 2px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 30% 20%, var(--navy-700), var(--navy-950)); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 30px 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.login-card img { width: 56px; height: 56px; margin-bottom: 14px; }
.login-card h1 { font-size: 1.35rem; margin: 0 0 4px; color: var(--navy-900); }
.login-card p { margin: 0 0 20px; color: var(--ink-3); font-size: .92rem; }
.login-card .btn { width: 100%; margin-top: 6px; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--navy-900); color: #fff; }
.topbar-in { display: flex; align-items: center; gap: 12px; padding: 10px 20px; max-width: 1240px; margin: 0 auto; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; margin-right: auto; min-width: 0; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; }
.topbar .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand small { display: block; font-weight: 500; color: #aebbd4; font-size: .74rem; }
.status { font-size: .82rem; color: #aebbd4; white-space: nowrap; }
.status.dirty { color: var(--gold-300); font-weight: 600; }
.topbar .btn:not(.btn-gold) { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.topbar .btn:not(.btn-gold):hover { border-color: #fff; }
.tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 56px; z-index: 19; }
.tabs-in { display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tab { padding: 13px 14px; border: 0; background: none; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--navy-900); }
.tab.active { color: var(--navy-900); border-bottom-color: var(--gold-500); }
main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 120px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.45rem; color: var(--navy-900); }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }

/* ---------- cards & fields ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2 { font-size: 1.05rem; margin: 0 0 4px; color: var(--navy-900); }
.card > .hint { margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-weight: 600; font-size: .86rem; color: var(--navy-900); }
.field input:not([type=checkbox]), .field select, .field textarea, .pair input, .pair textarea, .search {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; min-height: 40px;
}
.field textarea, .pair textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus, .pair input:focus, .pair textarea:focus, .search:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,165,60,.18); }
.hint { font-size: .8rem; color: var(--ink-3); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-900); }
.prefix { display: flex; align-items: stretch; }
.prefix em { font-style: normal; padding: 9px 10px; background: var(--navy-50); border: 1px solid var(--line); border-right: 0; border-radius: 9px 0 0 9px; color: var(--ink-3); font-size: .85rem; white-space: nowrap; display: flex; align-items: center; }
.prefix input { border-radius: 0 9px 9px 0 !important; }
.hi-input { font-family: "Noto Sans Devanagari", var(--font); }

/* ---------- pair / row lists ---------- */
.pairs { display: flex; flex-direction: column; gap: 10px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--navy-50); }
.pair.stack { grid-template-columns: minmax(0, 1fr) auto; }
.pair.stack .pair-fields { display: flex; flex-direction: column; gap: 8px; }
.pair textarea { min-height: 60px; }
.row-tools { display: flex; gap: 4px; }
.empty { padding: 18px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 10px; }

/* ---------- product list ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); }
.item .thumb { width: 64px; height: 48px; border-radius: 8px; background: var(--navy-50); overflow: hidden; flex-shrink: 0; display: grid; place-items: center; color: var(--navy-700); font-weight: 800; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .info { flex: 1; min-width: 0; }
.item .info b { display: block; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .info small { color: var(--ink-3); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold-50); color: var(--gold-600); border: 1px solid #f0e2bb; margin-left: 6px; vertical-align: middle; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.toolbar .search { max-width: 320px; }

/* ---------- images ---------- */
.img-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img-prev { width: 180px; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px solid var(--line); background: var(--navy-50) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-3); font-size: .82rem; overflow: hidden; text-align: center; padding: 6px; }
.img-prev.logo { width: 96px; aspect-ratio: 1; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-prev.logo img { object-fit: contain; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.photo .pic { aspect-ratio: 4 / 3; background: var(--navy-50); position: relative; }
.photo .pic img { width: 100%; height: 100%; object-fit: cover; }
.photo .main-tag { position: absolute; top: 6px; left: 6px; background: var(--gold-500); color: var(--navy-950); font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.photo .bar { display: flex; gap: 4px; padding: 6px; justify-content: space-between; }
.photo input { border: 0; border-top: 1px solid var(--line); padding: 8px 10px; font-size: .84rem; width: 100%; }
.photo input:focus { outline: none; background: var(--gold-50); }
.upload-tile { border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--ink-3); cursor: pointer; min-height: 150px; background: #fff; font-weight: 600; }
.upload-tile:hover, .upload-tile.drag { border-color: var(--gold-500); color: var(--navy-900); background: var(--gold-50); }
.upload-tile big { display: block; font-size: 1.8rem; line-height: 1; margin-bottom: 6px; color: var(--gold-600); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--navy-100); border-top-color: var(--navy-900); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- product picker ---------- */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; }
.picks .check { font-weight: 500; }

/* ---------- toasts & notices ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--navy-950); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 500; animation: up .2s ease-out; }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--gold-50); border: 1px solid #f0e2bb; margin-bottom: 18px; font-size: .9rem; }
.notice.err { background: var(--red-50); border-color: #f3c5c5; color: #7d1f1f; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.error-text { color: var(--red); font-size: .88rem; margin: 8px 0 0; min-height: 1.2em; }

@media (max-width: 760px) {
  .topbar-in { padding: 8px 12px; gap: 8px; }
  .topbar .brand small, .topbar .hide-sm, .status { display: none; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .upload-tile { min-height: 120px; }
  .tabs { top: 52px; }
  main { padding: 18px 16px 120px; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .pair .row-tools { justify-content: flex-end; }
  .card { padding: 16px; }
  .item { flex-wrap: wrap; }
  .item .info { flex-basis: calc(100% - 80px); }
  .item .btn-row { width: 100%; justify-content: flex-end; }
  .img-prev { width: 100%; max-width: 260px; }
  .toolbar .search { max-width: none; flex: 1 1 100%; }
}

/* Enquiries (Hostinger) */
.enq-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.enq-head h2 { font-size: 1.02rem; margin: 0; color: var(--navy-900); }
.enq-head .hint { margin: 2px 0 0; }
.enq-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.enq dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .9rem; }
.enq dt { color: var(--ink-3); }
.enq dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .enq dl { grid-template-columns: 1fr; } .enq dd { margin-bottom: 6px; } }
