/* KRIDHA — admin portal (green · gold · ivory) */
.admin-shell {
    --ink: #193f3c;
    --ink-soft: #2d5551;
    --ink-deep: #0f2826;
    --gold: #c29341;
    --gold-deep: #a07830;
    --gold-soft: #d4b36a;
    --accent: #c4301c;
    --pearl: #fbfaf8;
    --ivory: #f6f2ea;
    --line: #e7e2d8;
    --muted: rgba(25, 63, 60, 0.62);
    --ok: #2f7d5b;
    --warn: #b7791f;
    --danger: #b3261e;
    --shadow: 0 18px 40px rgba(25, 63, 60, 0.08);
    --shadow-soft: 0 6px 18px rgba(25, 63, 60, 0.06);
    --font-display: "Baskervville", "Cormorant Garamond", serif;
    --font-body: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.admin-shell a { color: var(--ink); }
.admin-shell h1, .admin-shell h2 { font-family: var(--font-display); font-weight: 400; color: var(--ink); }
.admin-auth-wait { padding: 3rem; text-align: center; color: rgba(25, 63, 60, 0.6); font-family: "Outfit", sans-serif; }

/* ---------- sidebar ---------- */
.admin-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
    color: #f1ece1;
    padding: 1.4rem 1rem;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.4rem;
    border-bottom: 1px solid rgba(212, 179, 106, 0.25);
    text-decoration: none;
}

.admin-shell .admin-brand { color: #fff; }
.admin-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: var(--pearl); padding: 4px; }
.admin-brand strong { display: block; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.22em; color: #fff; }
.admin-brand small { color: var(--gold-soft); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }

.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 1.2rem; flex: 1; }
.admin-nav-label { margin: 1.1rem 0.6rem 0.4rem; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(212, 179, 106, 0.75); }

.admin-shell .admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.75rem;
    border-radius: 10px;
    color: rgba(241, 236, 225, 0.86);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.admin-shell .admin-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.admin-shell .admin-nav a.active { background: rgba(194, 147, 65, 0.18); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.admin-nav .ico { width: 1.3rem; text-align: center; color: var(--gold-soft); }
.admin-shell .admin-nav a.admin-nav-with-badge {
    display: flex; align-items: center; gap: 0.45rem;
}
.admin-nav-badge {
    margin-left: auto;
    min-width: 1.25rem; height: 1.25rem; padding: 0 0.38rem;
    border-radius: 999px;
    background: #c4301c; color: #fff;
    font-size: 0.68rem; font-weight: 700;
    display: inline-grid; place-items: center;
    box-shadow: 0 0 0 2px rgba(25, 63, 60, 0.35);
}
.admin-stat-link { text-decoration: none; color: inherit; transition: transform 0.15s ease; }
.admin-stat-link:hover { transform: translateY(-2px); }

.admin-side-foot { padding: 1rem 0.6rem 0; border-top: 1px solid rgba(212, 179, 106, 0.2); }
.admin-shell .admin-side-foot a { color: var(--gold-soft); font-size: 0.85rem; text-decoration: none; }

/* ---------- top bar ---------- */
.admin-main { min-width: 0; display: flex; flex-direction: column; }

.admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 2rem;
    background: rgba(251, 250, 248, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.admin-top-title { flex: 1; font-family: var(--font-display); font-style: italic; color: var(--muted); }
.admin-burger { display: none; border: 0; background: transparent; font-size: 1.4rem; color: var(--ink); }

.admin-user { display: flex; align-items: center; gap: 0.7rem; }
.admin-user form { margin: 0; }
.admin-avatar {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--ink); color: var(--gold-soft);
    font-weight: 600; font-size: 0.85rem; letter-spacing: 0.05em;
}
.admin-user-name { line-height: 1.15; font-weight: 500; }
.admin-user-name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.75rem; }

.admin-content { padding: 1.8rem 2rem 3rem; max-width: 1400px; width: 100%; }

/* ---------- headings ---------- */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 2.1rem; }
.admin-head-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-kicker { margin: 0 0 0.2rem; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); }
.admin-shell .admin-kicker a { color: var(--gold-deep); text-decoration: none; }
.admin-muted { color: var(--muted); }
.admin-muted.small, .admin-shell .small { font-size: 0.82rem; }

/* ---------- buttons ---------- */
.admin-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.62rem 1.15rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: #fff !important;
    font: 500 0.88rem var(--font-body);
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}
.admin-btn:hover:not(:disabled) { background: var(--ink-soft); box-shadow: 0 6px 16px rgba(25, 63, 60, 0.18); }
.admin-btn:active:not(:disabled) { transform: translateY(1px); }
.admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.admin-btn.ghost { background: transparent; color: var(--ink) !important; border-color: rgba(25, 63, 60, 0.35); }
.admin-btn.ghost:hover:not(:disabled) { background: rgba(25, 63, 60, 0.06); box-shadow: none; }
.admin-btn.danger { background: var(--danger); border-color: var(--danger); }
.admin-btn.danger:hover:not(:disabled) { background: #8f1d17; }
.admin-btn.danger-ghost { color: var(--danger) !important; border-color: rgba(179, 38, 30, 0.4); background: transparent; }
.admin-btn.sm { padding: 0.36rem 0.8rem; font-size: 0.8rem; }
.admin-btn.block { width: 100%; padding: 0.8rem; }

.admin-icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1rem; padding: 0.3rem 0.45rem; border-radius: 8px; opacity: 0.7; }
.admin-icon-btn:hover:not(:disabled) { background: rgba(179, 38, 30, 0.08); opacity: 1; }
.admin-icon-btn:disabled { opacity: 0.25; cursor: not-allowed; }

.admin-star { border: 0; background: transparent; font-size: 1.25rem; color: #d8d2c6; cursor: pointer; transition: color 0.2s, transform 0.2s; }
.admin-star.on { color: var(--gold); }
.admin-star:hover { transform: scale(1.15); }

/* ---------- cards & grids ---------- */
.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.3rem;
}
.admin-card.flush { padding: 0; overflow-x: auto; }
.admin-card h2 { font-size: 1.35rem; margin: 0 0 0.9rem; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.admin-card-head h2 { margin: 0; }
.admin-card-head a { font-size: 0.82rem; color: var(--gold-deep) !important; text-decoration: none; }
.admin-empty { margin: 0; padding: 1.6rem 0.5rem; text-align: center; color: var(--muted); font-style: italic; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; align-items: start; }
.admin-grid-2.wide-left { grid-template-columns: 1.5fr 1fr; }
.admin-stack > .admin-card:last-child { margin-bottom: 0; }

/* ---------- stats ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.admin-stat {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 1.1rem 1.2rem; box-shadow: var(--shadow-soft);
}
.admin-stat span { display: block; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.admin-stat strong { display: block; margin: 0.35rem 0 0.15rem; font: 400 1.75rem var(--font-display); }
.admin-stat strong em { font-style: normal; font-size: 1rem; color: var(--muted); margin-left: 0.25rem; }
.admin-stat small { color: var(--muted); font-size: 0.8rem; }
.admin-stat.accent { background: linear-gradient(135deg, var(--ink), var(--ink-soft)); border-color: transparent; }
.admin-stat.accent span, .admin-stat.accent small { color: rgba(241, 236, 225, 0.75); }
.admin-stat.accent strong { color: var(--gold-soft); }
.admin-stat.warn { border-color: rgba(183, 121, 31, 0.45); background: #fffaf0; }

.admin-field { display: grid; gap: 0.35rem; margin-bottom: 0.95rem; }
.admin-field > span { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- rich text editor ---------- */
.rte {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfaf8, #f4f1ea);
}
.rte-btn {
    border: 1px solid rgba(25, 63, 60, 0.14);
    background: #fff;
    color: var(--ink);
    font: 600 0.72rem var(--font-body);
    letter-spacing: 0.04em;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.rte-btn:hover {
    background: rgba(25, 63, 60, 0.06);
    border-color: rgba(25, 63, 60, 0.28);
}
.rte-btn:active { background: rgba(25, 63, 60, 0.1); }
.rte-btn b, .rte-btn i, .rte-btn u { font-size: 0.85rem; }
.rte-sep {
    width: 1px;
    height: 1.1rem;
    background: rgba(25, 63, 60, 0.14);
    margin: 0 0.15rem;
}
.rte-surface {
    min-height: 16rem;
    max-height: 28rem;
    overflow: auto;
    padding: 1rem 1.1rem;
    font: 400 0.95rem/1.65 var(--font-body);
    color: var(--ink);
    outline: none;
    background: #fff;
}
.rte-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(194, 147, 65, 0.28);
}
.rte-surface:empty:before,
.rte-surface:has(br:only-child):before {
    content: attr(data-placeholder);
    color: rgba(25, 63, 60, 0.4);
    pointer-events: none;
}
.rte-surface p { margin: 0 0 0.75rem; }
.rte-surface h2 {
    margin: 0 0 0.65rem;
    font: 400 1.35rem var(--font-display);
    color: var(--ink);
}
.rte-surface ul, .rte-surface ol { margin: 0 0 0.75rem; padding-left: 1.35rem; }
.rte-surface a { color: #1a5c57; text-decoration: underline; }
.rte-surface:focus-visible { outline: none; }

/* ---------- dashboard analytics ---------- */
.admin-dash-analytics {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 1.3rem;
    margin-bottom: 1.3rem;
    align-items: stretch;
}
.admin-dash-mid { margin-bottom: 1.3rem; }
.admin-chart-card .admin-card-head,
.admin-progress-card .admin-card-head { align-items: flex-start; }
.admin-chart-sub { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--muted); }

.admin-bars {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: end;
    min-height: 13.5rem;
    padding: 0.4rem 0.15rem 0;
}
.admin-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}
.admin-bar-track {
    width: 100%;
    height: 11rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 0.45rem 0.45rem 0.2rem 0.2rem;
    background: linear-gradient(180deg, rgba(25, 63, 60, 0.04), transparent 70%);
}
.admin-bar-fill {
    width: 70%;
    max-width: 1.6rem;
    height: var(--h, 0%);
    min-height: 0;
    border-radius: 0.35rem 0.35rem 0.15rem 0.15rem;
    background: linear-gradient(180deg, var(--gold-soft), var(--ink));
    box-shadow: 0 6px 14px rgba(25, 63, 60, 0.12);
    transition: height 0.35s ease;
}
.admin-bar:hover .admin-bar-fill {
    background: linear-gradient(180deg, #e2c27a, #163734);
}
.admin-bar-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}
.admin-bar-dow {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1;
}

.admin-rings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}
.admin-ring-item {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 0.3rem;
}
.admin-ring {
    --p: 0;
    width: 5.4rem;
    height: 5.4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle closest-side, #fff 72%, transparent 73%),
        conic-gradient(var(--ink) calc(var(--p) * 1%), rgba(25, 63, 60, 0.1) 0);
    box-shadow: inset 0 0 0 1px rgba(25, 63, 60, 0.06);
}
.admin-ring.accent {
    background:
        radial-gradient(circle closest-side, #fff 72%, transparent 73%),
        conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(194, 147, 65, 0.14) 0);
}
.admin-ring.warn {
    background:
        radial-gradient(circle closest-side, #fffaf0 72%, transparent 73%),
        conic-gradient(#b7791f calc(var(--p) * 1%), rgba(183, 121, 31, 0.14) 0);
}
.admin-ring span {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--ink);
}
.admin-ring-item strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.admin-ring-item small {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.3;
    max-width: 8.5rem;
}

.admin-progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}
.admin-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}
.admin-progress-meta span { color: var(--ink-soft); }
.admin-progress-meta em { font-style: normal; color: var(--muted); font-weight: 500; }
.admin-progress {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(25, 63, 60, 0.08);
    overflow: hidden;
}
.admin-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ink), var(--gold-deep));
    transition: width 0.35s ease;
}
.admin-progress.warn i {
    background: linear-gradient(90deg, #b7791f, #d4b36a);
}

.admin-hbar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}
.admin-hbar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.admin-hbar-meta strong { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.admin-hbar-meta em { font-style: normal; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.admin-hbar {
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(25, 63, 60, 0.07);
    overflow: hidden;
}
.admin-hbar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1a403c, #c29341);
    transition: width 0.35s ease;
}
.admin-hbar i.status-confirmed { background: linear-gradient(90deg, #245550, #3d7a72); }
.admin-hbar i.status-packed { background: linear-gradient(90deg, #6b5b3a, #c29341); }
.admin-hbar i.status-shipped { background: linear-gradient(90deg, #2a5080, #5a8fc4); }
.admin-hbar i.status-delivered { background: linear-gradient(90deg, #2d6a4f, #74c69d); }
.admin-hbar i.status-cancelled { background: linear-gradient(90deg, #8b3a3a, #c97b7b); }
.admin-hbar.weave i { background: linear-gradient(90deg, var(--ink-soft), var(--gold-soft)); }

.admin-stock-meter {
    margin-top: 0.35rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(25, 63, 60, 0.08);
    overflow: hidden;
    max-width: 9rem;
}
.admin-stock-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.admin-stock-meter.warn i { background: #b7791f; }
.admin-stock-meter.danger i { background: #9b3b2e; }

@media (max-width: 1200px) {
    .admin-dash-analytics { grid-template-columns: 1fr; }
    .admin-rings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .admin-bars { min-height: 11rem; }
    .admin-bar-track { height: 8.5rem; }
    .admin-rings { grid-template-columns: 1fr; justify-items: stretch; }
    .admin-ring-item { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.85rem; text-align: left; justify-items: start; }
    .admin-ring { grid-row: span 2; }
}

/* ---------- tables ---------- */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    padding: 0.75rem 1rem; text-align: left;
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); background: #faf8f3; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 0.8rem 1rem; border-bottom: 1px solid #f1ede5; vertical-align: middle; }
.admin-table tbody tr:hover { background: #fcfbf8; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 0.1rem; }
.admin-table .num { text-align: right; white-space: nowrap; }
.admin-table .actions { text-align: right; white-space: nowrap; }
.admin-table .actions > * { margin-left: 0.3rem; }
.admin-table tr.dim td { opacity: 0.55; }
.admin-table .neg { color: var(--danger); }
.admin-table .pos { color: var(--ok); }
.admin-table tfoot td { border: 0; padding: 0.4rem 1rem; color: var(--muted); }
.admin-table tfoot tr.total td { font: 400 1.25rem var(--font-display); color: var(--ink); padding-top: 0.7rem; }
.admin-table.compact td, .admin-table.compact th { padding: 0.55rem 0.6rem; }
.admin-table .admin-input { padding: 0.4rem 0.55rem; }
.admin-table a { text-decoration: none; font-weight: 500; }
.admin-table a:hover { color: var(--gold-deep); }

.admin-prod { display: flex; align-items: center; gap: 0.8rem; min-width: 220px; }
.admin-prod img { width: 46px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.admin-pill {
    display: inline-block; padding: 0.18rem 0.6rem; border-radius: 999px;
    font-size: 0.74rem; font-weight: 500; background: #eef2f1; color: var(--ink);
}
.admin-pill.ok { background: #e7f3ec; color: var(--ok); }
.admin-pill.warn { background: #fdf1dc; color: var(--warn); }
.admin-pill.danger { background: #fbe6e4; color: var(--danger); }
.admin-pill.status-confirmed { background: #e8eef9; color: #2b4f8c; }
.admin-pill.status-packed { background: #fdf1dc; color: var(--warn); }
.admin-pill.status-shipped { background: #efe8f8; color: #6b3fa0; }
.admin-pill.status-delivered { background: #e7f3ec; color: var(--ok); }
.admin-pill.status-cancelled { background: #fbe6e4; color: var(--danger); }
.admin-pill.change-decrease { background: #e7f3ec; color: var(--ok); }
.admin-pill.change-increase { background: #fdf1dc; color: var(--warn); }
.admin-pill.change-created { background: #eef2f1; }
.admin-off { color: var(--accent); font-weight: 600; font-size: 0.78rem; }

.admin-stock-list { list-style: none; margin: 0; padding: 0; }
.admin-stock-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid #f1ede5; }
.admin-stock-list li:last-child { border-bottom: 0; }
.admin-stock-list img { width: 40px; height: 50px; object-fit: cover; border-radius: 6px; }
.admin-stock-list div { flex: 1; min-width: 0; }
.admin-stock-list a { text-decoration: none; font-weight: 500; }
.admin-stock-list small { display: block; color: var(--muted); font-size: 0.78rem; }

.admin-sale-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 0 0 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1ede5;
}
.admin-sale-bulk-bar .admin-check { margin: 0; }
.admin-sale-pick {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}
.admin-sale-pick input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--ink);
}
.admin-field-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.35;
}
.admin-offer-thumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.4rem 0 0.65rem;
}
.admin-offer-thumb img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5dfd2;
}
.admin-file { padding: 0.45rem; }

/* ---------- forms ---------- */
.admin-toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.admin-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d9d3c6;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: 0.92rem var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194, 147, 65, 0.18); }
.admin-toolbar .admin-input { width: auto; }
.admin-toolbar .admin-input.grow { flex: 1; min-width: 220px; }
.admin-input.tiny { width: 4.5rem; }
textarea.admin-input { resize: vertical; line-height: 1.5; }

.admin-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.95rem; flex: 1; min-width: 0; }
.admin-field > span { font-size: 0.78rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.02em; }
.admin-field > span small { font-weight: 400; color: var(--muted); }
.admin-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.admin-row > .admin-field { min-width: 140px; }
.admin-check { display: flex; align-items: center; gap: 0.55rem; margin: 0.25rem 0 0.9rem; cursor: pointer; }
.admin-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--ink); }
.admin-shell .validation-message { color: var(--danger); font-size: 0.78rem; }
.admin-shell .invalid { border-color: var(--danger); }
.admin-shell .valid.modified:not([type=checkbox]) { border-color: #9fc7b1; }

.admin-segment { display: inline-flex; background: #fff; border: 1px solid #d9d3c6; border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.admin-segment button {
    border: 0; background: transparent; color: var(--ink-soft);
    padding: 0.42rem 0.85rem; border-radius: 999px; font: 0.82rem var(--font-body); cursor: pointer;
}
.admin-segment button.on { background: var(--ink); color: #fff; }
.admin-segment.full { display: flex; margin-bottom: 1rem; }
.admin-segment.full button { flex: 1; }

.admin-switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.admin-switch input { opacity: 0; width: 0; height: 0; }
.admin-switch span { position: absolute; inset: 0; background: #d9d3c6; border-radius: 999px; transition: background 0.2s; }
.admin-switch span::before {
    content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.admin-switch input:checked + span { background: var(--ok); }
.admin-switch input:checked + span::before { transform: translateX(18px); }

.admin-preview {
    margin: 0.2rem 0 1rem; padding: 0.7rem 0.9rem; border-radius: 10px;
    background: #f6f2ea; border: 1px dashed rgba(194, 147, 65, 0.55); font-size: 0.9rem;
}
.admin-preview strong { font-family: var(--font-display); font-size: 1.15rem; }
.admin-preview-table { margin: 0.4rem 0 1rem; padding: 0.8rem; border-radius: 12px; background: #faf8f3; }
.admin-preview-table p { margin: 0 0 0.4rem; }

.admin-alert { padding: 0.8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 0.9rem; }
.admin-alert.error { background: #fbe6e4; color: var(--danger); border: 1px solid rgba(179, 38, 30, 0.25); }

.admin-inline-add { display: flex; gap: 0.6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* ---------- product editor ---------- */
.admin-editor { display: grid; grid-template-columns: 1fr 360px; gap: 1.3rem; align-items: start; }
.admin-editor-side { position: sticky; top: 5rem; }
.admin-image-preview { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #f3efe6; margin-bottom: 0.9rem; }
.admin-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-image-empty { display: grid; place-items: center; color: var(--muted); font-size: 0.88rem; }
.admin-file { padding: 0.45rem; cursor: pointer; }
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}
.admin-gallery-tile {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f3efe6;
}
.admin-gallery-tile.is-main { border-color: var(--gold); }
.admin-gallery-tile.is-selected { border-color: var(--danger); }
.admin-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-gallery-check {
    position: absolute; top: 0.35rem; left: 0.35rem; z-index: 2;
    width: 1.35rem; height: 1.35rem; display: grid; place-items: center;
    background: rgba(255,255,255,0.92); border-radius: 4px; margin: 0; cursor: pointer;
}
.admin-gallery-check input { margin: 0; accent-color: var(--ink); }
.admin-gallery-tile-actions {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 0.35rem;
    background: linear-gradient(transparent, rgba(16,42,40,0.72));
    display: flex; justify-content: center;
}
.admin-gallery-tile-actions .admin-btn { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
.admin-editor-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; }
.admin-status-steps { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.admin-address { line-height: 1.6; margin: 0 0 0.8rem; }

/* ---------- modal ---------- */
.admin-modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15, 40, 38, 0.45); backdrop-filter: blur(3px); animation: admin-fade 0.2s ease; }
.admin-modal {
    position: fixed; z-index: 91; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto;
    background: #fff; border-radius: 18px; padding: 1.5rem;
    box-shadow: 0 30px 80px rgba(15, 40, 38, 0.3);
    animation: admin-pop 0.22s ease;
}
.admin-modal.narrow { width: min(440px, calc(100vw - 2rem)); }
.admin-modal header h2 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.admin-modal header p { margin: 0 0 1.1rem; color: var(--muted); }
.admin-modal footer { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.6rem; }

@keyframes admin-fade { from { opacity: 0; } }
@keyframes admin-pop { from { opacity: 0; transform: translate(-50%, -46%); } }

/* ---------- login ---------- */
.admin-blank { display: block; background: var(--pearl); }
.admin-login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.admin-login-art { position: relative; overflow: hidden; background: var(--ink); }
.admin-login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.admin-login-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(25, 63, 60, 0.35), rgba(15, 40, 38, 0.92)); }
.admin-login-art-copy { position: absolute; z-index: 1; left: 3rem; right: 3rem; bottom: 3rem; color: #f1ece1; }
.admin-login-art-copy .admin-kicker { color: var(--gold-soft); }
.admin-shell .admin-login-art-copy h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.1; color: #fff; margin: 0.4rem 0 0.8rem; }
.admin-login-art-copy h2 em { color: var(--gold-soft); }
.admin-login-art-copy p:last-child { max-width: 28rem; color: rgba(241, 236, 225, 0.8); }

.admin-login-panel { display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(2rem, 6vw, 6rem); }
.admin-login-mark { width: 72px; height: 72px; object-fit: contain; margin-bottom: 1rem; }
.admin-login-panel h1 { margin: 0; font-size: 2.4rem; }
.admin-login-panel > .admin-muted { margin: 0.3rem 0 1.6rem; }
.admin-form { max-width: 380px; }
.admin-form input { width: 100%; padding: 0.75rem 0.9rem; border: 1px solid #d9d3c6; border-radius: 10px; font: 0.95rem var(--font-body); }
.admin-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194, 147, 65, 0.18); }

.admin-form .password-wrap { position: relative; width: 100%; }
.admin-form .password-wrap input { padding-right: 2.7rem; }
.admin-form .password-toggle {
    position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--muted); cursor: pointer;
}
.admin-form .password-toggle:hover { color: var(--ink); background: rgba(25, 63, 60, 0.06); }

.sql-runner .sql-editor {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.86rem;
    line-height: 1.55;
    min-height: 18rem;
    white-space: pre;
    tab-size: 4;
}
.sql-messages { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.88rem; }
.sql-messages li { margin: 0.25rem 0; }
.sql-result-block { margin-top: 1rem; }
.sql-result-label { margin: 0 0 0.45rem; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sql-result-label em { font-style: normal; color: #b8860b; }
.sql-table-scroll { overflow: auto; max-height: 22rem; border: 1px solid #e4ddd0; border-radius: 10px; }
.admin-shell .admin-back { margin-top: 1.6rem; font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.admin-login .admin-alert { max-width: 380px; }

/* ---------- support inbox ---------- */
.admin-support {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-height: 28rem;
}
.admin-support-list {
  padding: 0.5rem;
  max-height: min(70vh, 40rem);
  overflow: auto;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.admin-support-item {
  text-align: left; border: 1px solid transparent; background: transparent;
  padding: 0.75rem 0.8rem; cursor: pointer; border-radius: 8px;
  font: inherit; color: inherit;
}
.admin-support-item:hover { background: rgba(25, 63, 60, 0.04); }
.admin-support-item.on {
  background: rgba(194, 147, 65, 0.1);
  border-color: rgba(194, 147, 65, 0.35);
}
.admin-support-item-top {
  display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline;
}
.admin-support-item p {
  margin: 0.35rem 0 0.2rem; font-size: 0.86rem; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.admin-support-item time { font-size: 0.72rem; color: var(--muted); }
.admin-support-item-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.admin-unread {
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
  border-radius: 999px; background: #c4301c; color: #fff;
  font-size: 0.7rem; display: inline-grid; place-items: center;
}
.admin-online-dot {
  display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.35rem;
  border-radius: 50%; background: #c5cdc8; vertical-align: middle;
}
.admin-online-dot.on { background: #2f9e5e; box-shadow: 0 0 0 3px rgba(47, 158, 94, 0.18); }
.admin-msg-meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 0.4rem;
  margin-top: 0.35rem; font-size: 0.7rem; opacity: 0.7;
}
.admin-ticks { letter-spacing: -0.06em; }
.admin-ticks.seen { color: #7ec8ff; }
.admin-ticks.delivered { color: #cfe3d8; }
.admin-support-identity {
  margin-bottom: 1rem; padding: 0.9rem 1rem;
}
.admin-support-identity label { display: grid; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); }
.admin-support-identity-row { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.admin-support-identity-row .admin-input { flex: 1; min-width: 12rem; }
.admin-support-status {
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.15rem 0.4rem; border-radius: 4px;
  background: rgba(25, 63, 60, 0.08); color: var(--ink);
}
.admin-support-status.open { background: rgba(45, 120, 90, 0.12); color: #1d6b4f; }
.admin-support-status.pending { background: rgba(194, 147, 65, 0.18); color: #8a6420; }
.admin-support-status.closed { background: rgba(25, 63, 60, 0.08); color: var(--muted); }

.admin-support-thread {
  display: flex; flex-direction: column; min-height: 28rem;
  max-height: min(70vh, 40rem);
}
.admin-support-msgs {
  flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 0.7rem;
  padding: 0.4rem 0 1rem;
}
.admin-support-msg {
  max-width: 85%; padding: 0.75rem 0.9rem;
  border: 1px solid #e8e2d6; border-radius: 10px; background: #fff;
}
.admin-support-msg.customer { align-self: flex-start; }
.admin-support-msg.admin {
  align-self: flex-end;
  background: #193f3c; color: #fff; border-color: transparent;
}
.admin-support-msg span {
  display: block; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.25rem; opacity: 0.75;
}
.admin-support-msg p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.admin-support-msg time { display: block; margin-top: 0.35rem; font-size: 0.7rem; opacity: 0.65; }
.admin-support-compose {
  display: grid; gap: 0.55rem;
  padding-top: 0.75rem; border-top: 1px solid #e8e2d6;
}
.admin-support-compose textarea { resize: vertical; min-height: 4.5rem; }

/* toasts reuse the storefront component */
.admin-shell .toast-stack { top: 4.6rem; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .admin-editor { grid-template-columns: 1fr; }
    .admin-editor-side { position: static; }
}

@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side {
        position: fixed; z-index: 60; left: 0; top: 0; width: 260px;
        transform: translateX(-100%); transition: transform 0.25s ease;
    }
    .admin-shell.menu-open .admin-side { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.25); }
    .admin-burger { display: block; }
    .admin-top { padding: 0.7rem 1rem; }
    .admin-top-title, .admin-user-name { display: none; }
    .admin-content { padding: 1.2rem 1rem 2.5rem; }
    .admin-grid-2, .admin-grid-2.wide-left { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-support { grid-template-columns: 1fr; }
    .admin-support-list { max-height: 14rem; }
    .admin-login { grid-template-columns: 1fr; }
    .admin-login-art { min-height: 240px; }
}

/* ---------- jQuery DataTables (admin) ---------- */
.admin-dt-wrap {
    padding: 0.85rem 1rem 1.1rem;
    overflow-x: auto;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_length,
.admin-dt-wrap .dataTables_wrapper .dataTables_filter,
.admin-dt-wrap .dataTables_wrapper .dataTables_info,
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate {
    font-size: 0.82rem;
    color: var(--muted);
    padding: 0.35rem 0;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_length select,
.admin-dt-wrap .dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 0.35rem 0.55rem;
    margin: 0 0.35rem;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_filter input {
    min-width: 12rem;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--ink) !important;
    padding: 0.25rem 0.55rem !important;
    margin: 0 0.1rem !important;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(25, 63, 60, 0.06) !important;
    border-color: rgba(25, 63, 60, 0.12) !important;
    color: var(--ink) !important;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--ink) !important;
    color: #fbfaf8 !important;
    border-color: var(--ink) !important;
}
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.admin-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: rgba(25, 63, 60, 0.35) !important;
    background: transparent !important;
}
.admin-dt-wrap table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}
.admin-dt-wrap table.dataTable thead th {
    border-bottom: 1px solid var(--line) !important;
}
.admin-dt-wrap table.dataTable.no-footer {
    border-bottom: 1px solid var(--line) !important;
}
.admin-dt-wrap table.dataTable tbody tr:hover {
    background: rgba(25, 63, 60, 0.03);
}
.admin-dt-wrap .dataTables_wrapper .row {
    margin: 0;
}


/* ==========================================================================
   ADMIN LIVE VIDEO CONSULTATION STUDIO & INCOMING ALERT
   ========================================================================== */
.admin-vc-alert-backdrop {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10005;
    animation: slideInDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.admin-vc-alert-card {
    background: #0f1918;
    color: #e6e4df;
    border: 1px solid #c29341;
    border-radius: 12px;
    width: 380px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
    padding: 1.25rem;
}

.admin-vc-alert-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.admin-vc-alert-badge {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: #f0c97b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-beacon {
    width: 8px;
    height: 8px;
    background: #25d366;
    border-radius: 50%;
    animation: beacon-pulse 1.4s infinite;
}

.btn-close-sm {
    background: transparent;
    border: none;
    color: #8fa8a4;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-close-sm:hover { color: #fff; }

.admin-vc-alert-body {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 1.1rem;
}

.admin-vc-alert-img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(194, 147, 65, 0.3);
}

.admin-vc-alert-info h4 {
    font-family: var(--font-heading, "Baskervville", serif);
    font-size: 1.15rem;
    color: #f7f3ea;
    margin: 0 0 4px 0;
}

.admin-vc-alert-item {
    font-size: 0.82rem;
    color: #afc4c0;
    margin: 0 0 2px 0;
}

.admin-vc-alert-meta {
    font-size: 0.75rem;
    color: #f0c97b;
    margin: 0;
}

.admin-vc-alert-actions {
    display: flex;
    gap: 10px;
}

.admin-vc-answer-btn {
    flex: 1;
    background: #1f7a63;
    color: #fff;
    border: 1px solid #2ecc71;
    padding: 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-vc-answer-btn:hover {
    background: #27ae60;
}

.admin-vc-decline-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #afc4c0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.65rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.admin-vc-decline-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #ff7675;
}

/* Consultation Studio Overlay */
.admin-studio-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(6, 12, 11, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-studio-overlay.is-mini {
    background: transparent;
    pointer-events: none;
    backdrop-filter: none;
    align-items: flex-end;
    justify-content: flex-end;
}

.admin-studio-container {
    background: #0d1716;
    color: #e6e4df;
    border: 1px solid rgba(194, 147, 65, 0.45);
    border-radius: 14px;
    width: min(95vw, 1300px);
    max-width: 1300px;
    height: min(88vh, 900px);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.admin-studio-container--mini {
    pointer-events: auto;
    width: min(380px, calc(100vw - 1.5rem));
    height: 280px;
    border-radius: 12px;
    margin: 0 20px 20px 0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.admin-studio-header {
    flex: 0 0 auto;
    background: #08100f;
    border-bottom: 1px solid rgba(194, 147, 65, 0.25);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.admin-studio-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.admin-studio-title .live-pill {
    background: #e74c3c;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-studio-title .studio-timer {
    font-family: monospace;
    background: rgba(194, 147, 65, 0.15);
    color: #f0c97b;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.admin-studio-client {
    font-size: 0.85rem;
    color: #afc4c0;
}

.admin-studio-client strong { color: #f7f3ea; }

.studio-btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e6e4df;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-studio-content {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    overflow: hidden;
}

.admin-studio-container--mini .admin-studio-content {
    grid-template-columns: 1fr;
}

/* Video Stage — controls pinned; video fills remaining space */
.admin-studio-video-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: #040807;
    overflow: hidden;
}

.admin-studio-video-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    background: #020404;
    overflow: hidden;
}

.admin-remote-feed {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020404;
}

.admin-remote-feed .remote-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: #000;
}

.feed-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.65);
    color: #e6e4df;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.admin-local-feed {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 3;
    width: min(180px, 36%);
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 8px;
    border: 2px solid #c29341;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.admin-local-feed .local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-local-feed .cam-off-card {
    position: absolute;
    inset: 0;
    background: #111;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Studio Controls — always visible footer of video column */
.admin-studio-controls {
    flex: 0 0 auto;
    z-index: 6;
    background: #070e0d;
    border-top: 1px solid rgba(194, 147, 65, 0.2);
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.studio-ctl {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f7f3ea;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.studio-ctl:hover {
    background: rgba(255, 255, 255, 0.16);
}

.studio-ctl.active-off {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #ff7675;
}

.studio-ctl.screen-btn {
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    color: #85c1e9;
    font-weight: 600;
}

.studio-ctl.screen-btn.is-sharing {
    background: #2980b9;
    border-color: #2980b9;
    color: #fff;
    box-shadow: 0 0 12px rgba(41, 128, 185, 0.6);
}

.studio-ctl.end-btn {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    font-weight: 600;
}

.studio-ctl.end-btn:hover {
    background: #e74c3c;
}

/* Product Dossier */
.admin-studio-dossier {
    min-height: 0;
    min-width: 0;
    background: #091211;
    border-left: 1px solid rgba(194, 147, 65, 0.25);
    padding: 1.25rem;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-studio-container--mini .admin-studio-controls {
    padding: 6px 8px;
    gap: 6px;
}

.admin-studio-container--mini .studio-ctl {
    padding: 6px 10px;
    font-size: 0.72rem;
}

.admin-studio-container--mini .admin-local-feed {
    width: min(110px, 40%);
    bottom: 8px;
    right: 8px;
}

.admin-studio-container--mini .ctl-lbl {
    display: none;
}

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(194, 147, 65, 0.2);
    padding-bottom: 0.6rem;
}

.dossier-header h4 {
    font-family: var(--font-heading, "Baskervville", serif);
    font-size: 1.15rem;
    color: #c29341;
    margin: 0;
}

.dossier-sku {
    font-size: 0.72rem;
    color: #7b9490;
}

.dossier-hero-img-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    background: #000;
}

.dossier-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dossier-img-tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #e6e4df;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.dossier-thumbs-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.dossier-thumb-btn {
    background: none;
    border: 1px solid rgba(194, 147, 65, 0.2);
    border-radius: 4px;
    padding: 0;
    width: 48px;
    height: 60px;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.dossier-thumb-btn.active {
    border: 2px solid #c29341;
}

.dossier-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dossier-specs-card h5 {
    font-size: 1.05rem;
    color: #f7f3ea;
    margin: 0 0 4px 0;
}

.dossier-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f0c97b;
    margin: 0 0 0.75rem 0;
}

.dossier-price small {
    font-size: 0.7rem;
    color: #8fa8a4;
    font-weight: 400;
}

.dossier-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 0.85rem;
}

.spec-item {
    font-size: 0.78rem;
}

.spec-item .spec-k {
    display: block;
    color: #7b9490;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.spec-item .spec-v {
    color: #f3efe6;
    font-weight: 500;
}

.dossier-talking-points {
    background: rgba(194, 147, 65, 0.08);
    border: 1px solid rgba(194, 147, 65, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
}

.dossier-talking-points h6 {
    color: #f0c97b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px 0;
}

.dossier-talking-points ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #cfdcd9;
}

.dossier-talking-points li {
    margin-bottom: 4px;
}

.dossier-notes-box label {
    display: block;
    font-size: 0.75rem;
    color: #afc4c0;
    margin-bottom: 4px;
}

.dossier-notes-box textarea {
    background: #050a09 !important;
    border: 1px solid rgba(194, 147, 65, 0.25) !important;
    color: #f3efe6 !important;
    border-radius: 6px;
    width: 100%;
    padding: 8px;
    font-size: 0.82rem;
}

/* Studio responsive — keep video + controls usable on shorter/narrower viewports */
@media (max-width: 1100px) {
    .admin-studio-content {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    }
}

@media (max-width: 900px) {
    .admin-studio-overlay {
        padding: 10px;
        align-items: stretch;
    }

    .admin-studio-container:not(.admin-studio-container--mini) {
        width: 100%;
        height: calc(100dvh - 1.25rem);
        max-height: calc(100dvh - 1.25rem);
        border-radius: 10px;
    }

    .admin-studio-content {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) minmax(160px, 38%);
    }

    .admin-studio-dossier {
        border-left: none;
        border-top: 1px solid rgba(194, 147, 65, 0.25);
    }

    .admin-studio-header {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .admin-studio-client {
        order: 3;
        width: 100%;
        font-size: 0.78rem;
    }
}

@media (max-height: 700px) {
    .admin-studio-container:not(.admin-studio-container--mini) {
        height: calc(100dvh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .admin-studio-controls .ctl-lbl {
        display: none;
    }

    .studio-ctl {
        padding: 8px 12px;
    }
}

/* Consultations — session history */
.consult-page-head .consult-page-lead {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 36rem;
}

.consult-stats {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1.25rem;
}

.consult-history-card {
    padding: 0;
    overflow: hidden;
}

.consult-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.15rem 0.85rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfaf8, #f6f2ea);
}

.consult-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.consult-filter-pill {
    border: 1px solid rgba(25, 63, 60, 0.14);
    background: #fff;
    color: var(--ink-soft);
    font: 600 0.72rem var(--font-body);
    letter-spacing: 0.04em;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.consult-filter-pill:hover {
    border-color: rgba(25, 63, 60, 0.28);
    background: rgba(25, 63, 60, 0.04);
}

.consult-filter-pill.on {
    background: var(--ink);
    border-color: var(--ink);
    color: #fbfaf8;
}

.consult-toolbar-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.consult-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 12rem;
}

.consult-thumb {
    width: 44px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(25, 63, 60, 0.15);
    flex-shrink: 0;
    background: #f0ebe3;
}

.consult-thumb--empty {
    display: grid;
    place-items: center;
    color: var(--gold-deep);
    font-size: 0.9rem;
}

.consult-sku,
.consult-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.consult-note {
    font-size: 0.82rem;
    color: var(--ink-soft);
    font-style: italic;
    max-width: 14rem;
    display: inline-block;
}

.consult-status {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.consult-status--ok {
    background: #e5f3ea;
    color: #1d6b4f;
    border: 1px solid #b7dfc6;
}

.consult-status--pending {
    background: #fff4de;
    color: #8a6420;
    border: 1px solid #efd39a;
}

.consult-status--bad {
    background: #fdeceb;
    color: #9b3b2e;
    border: 1px solid #f0c0b8;
}

.consult-status--muted {
    background: rgba(25, 63, 60, 0.08);
    color: var(--ink-soft);
    border: 1px solid rgba(25, 63, 60, 0.12);
}

.badge.status-ended, .badge.status-answered, .badge.status-completed {
    background: #e5f3ea;
    color: #1d6b4f;
    border: 1px solid #b7dfc6;
}

.badge.status-requested {
    background: #fff4de;
    color: #8a6420;
    border: 1px solid #efd39a;
}

.badge.status-declined, .badge.status-cancelled {
    background: #fdeceb;
    color: #9b3b2e;
    border: 1px solid #f0c0b8;
}

@media (max-width: 1100px) {
    .consult-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .consult-stats { grid-template-columns: 1fr; }
    .consult-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   KRIDHA ADMIN CONSULTATION AVAILABILITY & TIMINGS STYLING
   ========================================================================== */

/* Top Live Status Card */
.status-banner-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(25, 63, 60, 0.14);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.status-banner-card.online {
    background: linear-gradient(135deg, rgba(22, 58, 54, 0.06) 0%, rgba(194, 147, 65, 0.1) 100%);
    border-color: rgba(194, 147, 65, 0.4);
}

.status-banner-card.offline {
    background: linear-gradient(135deg, rgba(140, 130, 122, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
    border-color: rgba(140, 130, 122, 0.25);
}

.status-indicator-col {
    display: flex;
    align-items: center;
    gap: 14px;
}

.status-indicator-col h4 {
    margin: 0 0 3px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.online {
    background: #25d366;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
    animation: beacon-pulse 1.8s infinite;
}

.status-dot.offline {
    background: #a0978f;
    box-shadow: 0 0 0 3px rgba(160, 151, 143, 0.2);
}

.status-meta-col {
    text-align: right;
}

/* Quick Presets Bar */
.admin-presets-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0.9rem 1.25rem;
    background: rgba(22, 58, 54, 0.03);
    border: 1px dashed rgba(194, 147, 65, 0.4);
    border-radius: 10px;
    margin: 1.25rem 0 1.5rem;
}

.preset-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-right: 4px;
}

.preset-chip {
    background: #fff;
    border: 1px solid rgba(25, 63, 60, 0.2);
    color: var(--ink);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.preset-chip:hover {
    background: #163a36;
    color: #fff;
    border-color: #163a36;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 58, 54, 0.15);
}

/* Day-wise Matrix */
.admin-schedule-matrix {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.schedule-day-card {
    display: grid;
    grid-template-columns: 200px 1fr 240px;
    align-items: center;
    padding: 0.9rem 1.4rem;
    background: #fff;
    border: 1px solid rgba(25, 63, 60, 0.12);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.schedule-day-card:hover {
    border-color: rgba(194, 147, 65, 0.45);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.schedule-day-card.is-enabled {
    border-left: 4px solid #c29341;
}

.schedule-day-card.is-disabled {
    background: #fbfaf8;
    border-left: 4px solid #d9d3c6;
    opacity: 0.72;
}

/* Day Toggle Col */
.day-toggle-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-name-box {
    display: flex;
    flex-direction: column;
}

.day-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
}

.day-subtitle {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

/* Time Picker Col */
.day-time-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-picker-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fcfbfa;
    border: 1px solid rgba(25, 63, 60, 0.15);
    border-radius: 8px;
    padding: 4px 10px;
}

.time-picker-group.disabled {
    opacity: 0.5;
    background: #f5f5f5;
    pointer-events: none;
}

.time-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-lbl {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.schedule-time-box {
    border: 1px solid rgba(25, 63, 60, 0.16);
    background: #fff;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.88rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.schedule-time-box:focus {
    border-color: #c29341;
    box-shadow: 0 0 0 2px rgba(194, 147, 65, 0.2);
}

.time-arrow {
    color: #c29341;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Day Badge Col */
.day-badge-col {
    display: flex;
    justify-content: flex-end;
}

.schedule-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

.schedule-status-chip.online {
    background: rgba(37, 211, 102, 0.1);
    color: #1b7e3e;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.schedule-status-chip.online .chip-beacon {
    width: 7px;
    height: 7px;
    background: #25d366;
    border-radius: 50%;
}

.schedule-status-chip.offline {
    background: rgba(140, 130, 122, 0.1);
    color: #777;
    border: 1px solid rgba(140, 130, 122, 0.25);
}

.schedule-status-chip.offline .chip-dot-muted {
    width: 7px;
    height: 7px;
    background: #999;
    border-radius: 50%;
}

/* Offline Notice Box */
.admin-offline-notice-card {
    background: #fff;
    border: 1px solid rgba(194, 147, 65, 0.3);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.notice-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.notice-card-header .ico {
    font-size: 1.4rem;
    line-height: 1;
}

.notice-card-header h4 {
    margin: 0 0 2px;
    font-size: 1rem;
    color: var(--ink);
}

.notice-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid rgba(25, 63, 60, 0.2);
    border-radius: 8px;
    background: #fdfdfc;
    resize: vertical;
}

.notice-textarea:focus {
    border-color: #c29341;
    outline: none;
    box-shadow: 0 0 0 3px rgba(194, 147, 65, 0.15);
}

/* Save Footer */
.admin-schedule-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(25, 63, 60, 0.1);
}

.schedule-save-hint {
    font-size: 0.82rem;
    color: var(--muted);
    font-style: italic;
}

/* Responsive Matrix Adjustments */
@media (max-width: 860px) {
    .schedule-day-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 1rem;
    }
    .day-time-col {
        justify-content: flex-start;
    }
    .day-badge-col {
        justify-content: flex-start;
    }
}