:root {
    --a-brand: #1A73C8;
    --a-brand-dark: #1560A8;
    --a-gold-text: #8F6F12;
    --a-side: #20242c;
    --a-bg: #f6f6f2;
    --a-text: #222;
    --a-muted: #777;
    --a-danger: #e03131;
    --a-radius: 12px;
    --a-shadow: 0 2px 10px rgba(0,0,0,.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.admin { font-family: 'Poppins', Arial, sans-serif; background: var(--a-bg); color: var(--a-text); font-size: 14px; line-height: 1.5; }
body.admin a { color: inherit; text-decoration: none; }
body.admin button { font-family: inherit; cursor: pointer; }

/* ===== Sidebar ===== */
.adm-side {
    position: fixed; top: 0; left: 0; bottom: 0; width: 250px;
    background: var(--a-side); color: #cfe3d7;
    display: flex; flex-direction: column;
    transform: translateX(-100%); transition: transform .25s;
    z-index: 100; overflow-y: auto;
}
.adm-side.open { transform: translateX(0); }
.adm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: .25s; z-index: 90; }
.adm-overlay.show { opacity: 1; visibility: visible; }

.adm-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; font-weight: 600; font-size: 17px; }
.adm-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.adm-brand small { display: block; font-size: 11px; font-weight: 400; color: #8fb09d; }

.adm-nav { flex: 1; padding: 10px 0; }
.adm-nav a, .adm-nav .soon { display: flex; align-items: center; gap: 10px; padding: 11px 18px; font-size: 14px; }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a.active { background: var(--a-brand); color: #fff; }
.adm-nav .ico { width: 22px; text-align: center; }
.adm-nav .soon { opacity: .4; cursor: not-allowed; }
.adm-nav .soon small { margin-left: auto; font-size: 10px; border: 1px solid #5f7f6d; border-radius: 8px; padding: 0 6px; }

.adm-logout { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.adm-logout button { width: 100%; background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 8px; padding: 10px; font-size: 14px; }
.adm-logout button:hover { background: var(--a-danger); }

/* ===== Main ===== */
.adm-main { min-height: 100vh; }
.adm-top {
    position: sticky; top: 0; z-index: 50;
    background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.08);
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
}
.adm-top h1 { font-size: 18px; font-weight: 600; flex: 1; }
.adm-menu { background: none; border: 0; font-size: 26px; line-height: 1; padding: 2px 6px; }
.adm-user { font-size: 13px; color: var(--a-muted); }
.adm-content { padding: 14px; }

/* ===== Alerts ===== */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-error { background: #ffe9e9; color: #c92a2a; border: 1px solid #ffc9c9; }
.alert-ok    { background: #dcf8e3; color: #146c2e; border: 1px solid #b2ecc0; }
.alert-info  { background: #e7f1ff; color: #1c5fb3; border: 1px solid #c5dcfa; }
.alert-warn  { background: #fff4d6; color: #8a5a00; border: 1px solid #ffe29a; }
.alert a { text-decoration: underline; }

/* ===== Cards, stats ===== */
.a-card { background: #fff; border-radius: var(--a-radius); padding: 16px; box-shadow: var(--a-shadow); }
.a-card h3 { font-size: 16px; margin-bottom: 12px; }
.a-empty { color: var(--a-muted); padding: 10px 0; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-card { background: #fff; border-radius: var(--a-radius); padding: 14px; box-shadow: var(--a-shadow); border-left: 4px solid var(--a-brand); }
.stat-card.warn { border-left-color: #f59f00; }
.stat-label { display: block; font-size: 12px; color: var(--a-muted); }
.stat-card b { display: block; font-size: 28px; line-height: 1.2; margin: 2px 0; }
.stat-card small { color: var(--a-muted); font-size: 12px; }

.adm-grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* ===== Chart ===== */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar { width: 100%; max-width: 46px; background: linear-gradient(to top, var(--a-brand-dark), #4ade80); border-radius: 6px 6px 0 0; }
.bar-val { font-size: 10px; color: var(--a-muted); white-space: nowrap; }
.bar-lbl { font-size: 11px; color: #444; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.a-table th { text-align: left; padding: 8px 10px; background: #f6f8f7; color: #555; font-weight: 600; white-space: nowrap; }
.a-table td { padding: 10px; border-bottom: 1px solid #eee; vertical-align: top; }
.a-table small { color: var(--a-muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.st-pending   { background: #fff4d6; color: #8a5a00; }
.st-confirmed { background: #e7f1ff; color: #1c5fb3; }
.st-shipped   { background: #efe5ff; color: #6b32c9; }
.st-delivered { background: #dcf8e3; color: #146c2e; }
.st-cancelled { background: #ffe9e9; color: #c92a2a; }

/* ===== Forms & buttons ===== */
.a-field { display: block; font-weight: 500; margin-bottom: 14px; }
.a-field input, .a-field select, .a-field textarea,
.login-card input {
    display: block; width: 100%; margin-top: 5px;
    border: 1px solid #d5d9d7; border-radius: 8px;
    padding: 10px 12px; font-size: 15px; font-family: inherit; background: #fff; outline: 0;
}
.a-field input:focus, .login-card input:focus { border-color: var(--a-brand); box-shadow: 0 0 0 3px rgba(22,163,74,.13); }
.a-btn { display: inline-block; background: var(--a-brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 500; }
.a-btn:hover { background: var(--a-brand-dark); }
.a-btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; }

/* ===== Login ===== */
body.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #14281d, #16a34a); }
.login-card { background: #fff; width: 100%; max-width: 380px; padding: 28px 24px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-card label { display: block; font-weight: 500; margin-bottom: 14px; }
.login-logo { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 8px; display: block; }
.login-card h1 { text-align: center; font-size: 22px; }
.login-sub { text-align: center; color: var(--a-muted); margin-bottom: 18px; }
.login-back { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--a-brand) !important; }

/* ===== Desktop ===== */
@media (min-width: 900px) {
    .adm-side { transform: none; }
    .adm-overlay { display: none; }
    .adm-main { margin-left: 250px; }
    .adm-menu { display: none; }
    .adm-content { padding: 22px; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .adm-grid-2 { grid-template-columns: 1fr 1.4fr; align-items: start; }
}

/* =========================================
   STEP 8A : Products & Categories
   ========================================= */
.a-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.a-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; }
.a-filter input[type=text], .a-filter select {
    border: 1px solid #d5d9d7; border-radius: 8px; padding: 8px 10px;
    font-size: 14px; font-family: inherit; background: #fff; outline: 0; min-width: 0;
}
.a-filter input[type=text] { flex: 1 1 160px; }
.a-filter select { flex: 0 1 150px; }
.a-count { color: var(--a-muted); font-size: 13px; margin-bottom: 8px; }
.a-toolbar .a-count { margin: 0; }

.a-btn-sm { padding: 6px 12px; font-size: 13px; }
.a-btn-light { background: #eef1ef; color: #333 !important; }
.a-btn-light:hover { background: #e0e5e2; }
.a-btn-danger { background: #fff0f0; color: var(--a-danger) !important; }
.a-btn-danger:hover { background: var(--a-danger); color: #fff !important; }
.a-link { color: var(--a-brand) !important; text-decoration: underline; }
.a-link-danger { color: var(--a-danger) !important; text-decoration: underline; font-size: 13px; }

.thumb { width: 52px; height: 52px; object-fit: contain; background: #f3f3f3; border-radius: 8px; display: block; }
.thumb.round { border-radius: 50%; object-fit: cover; }
.thumb.noimg { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.row-off { opacity: .55; }
.a-table td.actions { white-space: nowrap; }
.a-table td.actions .a-btn { margin-right: 4px; }

.pill-form { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { border: 1px solid #ccd2cf; background: #fff; color: #888; border-radius: 12px; padding: 1px 10px; font-size: 12px; }
.pill.on { background: var(--a-brand); border-color: var(--a-brand); color: #fff; }
.pill:hover { border-color: var(--a-brand); }

.a-pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; }
.a-pager a { color: var(--a-brand) !important; font-weight: 500; }

.a-row3 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.a-field small { color: var(--a-muted); font-weight: 400; }
.a-field input[type=file], .a-field > input[type=file] { border: 1px dashed #bbb; background: #fafafa; }
.img-preview { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.img-preview img { width: 90px; height: 90px; object-fit: contain; background: #f3f3f3; border-radius: 10px; }
.img-preview img.round { border-radius: 50%; object-fit: cover; }
.a-checks { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 18px; }
.a-checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.a-checks input { width: 18px; height: 18px; accent-color: var(--a-brand); }
.a-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 700px) {
    .a-row3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================
   STEP 8B : Orders
   ========================================= */
.nbadge { margin-left: auto; background: #f59f00; color: #fff; border-radius: 10px; padding: 0 8px; font-size: 11px; font-weight: 600; }

.status-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs a { flex: 0 0 auto; background: #fff; border: 1px solid #d5d9d7; border-radius: 18px; padding: 6px 14px; font-size: 13px; }
.status-tabs a span { background: #eef1ef; border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.status-tabs a.active { background: var(--a-brand); border-color: var(--a-brand); color: #fff !important; }
.status-tabs a.active span { background: rgba(255,255,255,.25); }

.txt-ok { color: #146c2e; }
.txt-warn { color: #c47a00; }
.txt-muted { color: var(--a-muted); }

.ov-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.ov-left, .ov-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ov-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ov-totals { max-width: 300px; margin: 12px 0 0 auto; }
.ov-totals div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #e3e6e4; }
.ov-totals .grand { font-size: 17px; font-weight: 600; color: var(--a-brand-dark); border-bottom: 0; }
.ov-info { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #eceeed; }
.ov-info span { flex: 0 0 100px; color: var(--a-muted); }
.ov-info b { font-weight: 500; word-break: break-word; }
.ov-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hint { font-size: 12px; color: var(--a-muted); margin-top: 10px; }

.history { list-style: none; border-left: 2px solid #dfe5e2; margin-left: 6px; }
.history li { padding: 0 0 14px 14px; position: relative; font-size: 13px; }
.history li::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--a-brand); }
.history li small { display: block; color: var(--a-muted); }

@media (min-width: 900px) {
    .ov-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
}

/* =========================================
   STEP 8C : Banners & Settings
   ========================================= */
.thumb.wide { width: 150px; height: 56px; object-fit: cover; border-radius: 8px; }
.move-form { display: flex; align-items: center; gap: 6px; }
.mv { background: #eef1ef; border: 0; border-radius: 6px; width: 26px; height: 26px; font-size: 11px; color: #333; }
.mv:hover:not(:disabled) { background: var(--a-brand); color: #fff; }
.mv:disabled { opacity: .3; cursor: not-allowed; }
.a-row2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 700px) {
    .a-row2 { grid-template-columns: 1fr 1fr; }
}

/* =========================================
   STEP 10A : Product gallery edit
   ========================================= */
.gal-edit { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.gal-item { width: 96px; text-align: center; font-weight: 400; font-size: 12px; margin: 0 !important; cursor: pointer; }
.gal-item img { width: 96px; height: 96px; object-fit: contain; background: #f3f3f3; border-radius: 8px; display: block; margin-bottom: 4px; }
.gal-item input { display: inline !important; width: auto !important; margin: 0 4px 0 0 !important; vertical-align: middle; }

/* =========================================================
   THEME : Zomo (yellow / blue / green / pink)  - shudhu rong
   ========================================================= */
.adm-side { color: #d6d9df; }
.adm-brand small { color: #9aa1ad; }
.adm-nav a.active { background: #FFEF00; color: #111; }
.adm-nav a:hover { background: rgba(255,255,255,.08); }
.adm-nav .soon small { border-color: #5a606b; }
.adm-top { border-bottom: 3px solid #FFEF00; }
.bar { background: linear-gradient(to top, #1A73C8, #85E07A); }
.stat-card { border-left-color: #FFD400; }
body.login-page { background: linear-gradient(135deg, #FFF200 0%, #FFD400 100%); }
.login-card { box-shadow: 0 10px 40px rgba(0,0,0,.18); }
