/* Vendor portal — uses the Mushmasti storefront palette (brown / caramel / gold, see web/css/redesign.css) */

:root {
    --brand-900: #2e1b10;
    --brand-800: #3b2417;
    --brand-700: #5a3a28;
    --brand-600: #7a4f35;
    --brand-500: #9a5d1b;
    --brand-100: #f4ebe2;
    --brand-50:  #faf5ef;
    --gold-500:  #d9a94e;
    --gold-400:  #e8c27a;
    --ok:     #1b8a4b;
    --ok-bg:  #e7f5ec;
    --ink:    #2a2019;
    --muted:  #6d6259;
    --line:   #e9dfd2;
    --bg:     #f8f3ec;
    --danger: #c62828;
    --sidebar-w: 262px;
    --topbar-h:  62px;
    --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14.5px;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); }

/* Sidebar */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--brand-800), var(--brand-900));
    display: flex; flex-direction: column; z-index: 40;
    transition: transform .22s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff;
}
.sidebar-brand strong { display: block; font-size: 15px; line-height: 1.2; }
.sidebar-brand small  { display: block; font-size: 11.5px; color: var(--gold-400); letter-spacing: .5px; text-transform: uppercase; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--gold-500); color: var(--brand-900); font-size: 17px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0 18px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 20px;
    font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); text-decoration: none;
    transition: background .16s, color .16s;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link > i { width: 19px; text-align: center; font-size: 14.5px; color: var(--gold-500); }
.nav-link.is-active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 10px 20px; }
.nav-signout > i { color: #ff9a8b; }
.sidebar-foot { padding: 13px 20px; font-size: 11.5px; color: rgba(255,255,255,.42); border-top: 1px solid rgba(255,255,255,.08); }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }

/* Shell */
.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; gap: 14px; padding: 0 22px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.icon-btn { display: none; border: 0; background: none; font-size: 19px; color: var(--brand-700); cursor: pointer; padding: 6px; }
.topbar-title { flex: 1; margin: 0; font-size: 17px; font-weight: 800; color: var(--brand-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { display: flex; align-items: center; gap: 11px; }
.topbar-meta { text-align: right; line-height: 1.25; }
.topbar-name { display: block; font-size: 13.5px; font-weight: 700; }
.topbar-id   { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }
.topbar-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand-100); color: var(--brand-700); font-weight: 800; border: 2px solid var(--brand-100);
}
.content { flex: 1; padding: 24px 22px; min-width: 0; }
.footer {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 15px 22px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: #fff;
}
.footer-tag { color: var(--brand-600); font-weight: 600; }

/* Primitives */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card-title { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--brand-800); }
.card-sub { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; background: var(--brand-100); color: var(--brand-600); flex-shrink: 0; }
.stat-icon.gold { background: #fdf3da; color: #b8860b; }
.stat-icon.red  { background: #fdecec; color: var(--danger); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--brand-800); line-height: 1.25; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-ok     { background: var(--ok-bg); color: var(--ok); }
.pill-warn   { background: #fdf3da; color: #a07407; }
.pill-info   { background: #e5eefb; color: #1e56a0; }
.pill-danger { background: #fdecec; color: var(--danger); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; }
.alert-error   { background: #fdecec; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-success { background: var(--ok-bg); color: var(--ok); border: 1px solid #c4e0cf; }
.alert i { margin-top: 2px; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty i { display: block; font-size: 28px; color: #d4c3b0; margin-bottom: 10px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--brand-50); }
.tbl tfoot th, .tbl tfoot td { font-weight: 800; color: var(--brand-800); border-bottom: 0; text-transform: none; font-size: 14px; }
.tbl .num { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--brand-100); border: 1px solid var(--line); }
.strike { text-decoration: line-through; color: var(--muted); }

/* Forms */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.field { margin-bottom: 17px; }
.filters .field { margin-bottom: 0; }
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--brand-800); margin-bottom: 7px; letter-spacing: .2px; }
.field-input { position: relative; display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .18s, box-shadow .18s; }
.field-input:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 3.5px rgba(122,79,53,.14); }
.field-icon { width: 42px; display: grid; place-items: center; color: var(--brand-600); font-size: 14px; flex-shrink: 0; }
.field-input input, .field-input select {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 11px 14px;
}
.field-icon + input { padding-left: 0; }
.field-input input[readonly] { color: var(--muted); }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pw-toggle { border: 0; background: none; color: #a8978a; cursor: pointer; padding: 0 14px; align-self: stretch; }
.pw-toggle:hover { color: var(--brand-600); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 800; cursor: pointer;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600)); color: #fff; text-decoration: none;
    transition: transform .1s, box-shadow .18s;
}
.btn:hover { box-shadow: 0 6px 16px rgba(90,58,40,.28); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: #fff; color: var(--brand-700); border: 1.5px solid var(--line); }
.btn-ghost:hover { box-shadow: none; border-color: var(--brand-600); }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=number], .inline-form select {
    border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; width: 84px; background: #fff;
}
.inline-form select { width: auto; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 13px; background: #fff; }
.pager .cur { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }

/* Auth — split card: brand panel + form (stacks on phones) */
body.auth {
    min-height: 100vh; display: flex; align-items: center; align-items: safe center; justify-content: center;
    padding: 32px 18px;
    background:
        radial-gradient(circle at 12% 18%, rgba(217,169,78,.18) 0, transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(122,79,53,.14) 0, transparent 45%),
        var(--bg);
}
.leaf-blob { position: fixed; border-radius: 50%; pointer-events: none; border: 2px solid rgba(122,79,53,.12); }
.leaf-blob.b1 { width: 460px; height: 460px; top: -180px; left: -160px; }
.leaf-blob.b2 { width: 340px; height: 340px; bottom: -130px; right: -110px; border-color: rgba(217,169,78,.28); }
.auth-shell { position: relative; z-index: 1; width: 100%; max-width: 860px; }
.auth-card {
    display: grid; grid-template-columns: 5fr 6fr; min-height: 500px;
    background: #fff; border-radius: 22px; overflow: hidden;
    box-shadow: 0 30px 70px rgba(59,36,23,.18), 0 2px 6px rgba(59,36,23,.06);
}
.auth-brand {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
    padding: 40px 36px; color: #fff; text-align: left;
    background: linear-gradient(160deg, var(--brand-700) 0%, var(--brand-800) 60%, var(--brand-900) 100%);
}
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; }
.auth-brand::before { width: 300px; height: 300px; top: -110px; right: -120px; background: radial-gradient(circle, rgba(217,169,78,.35), transparent 70%); }
.auth-brand::after  { width: 220px; height: 220px; top: 40px; left: -90px; border: 1.5px solid rgba(232,194,122,.22); }
.auth-brand .brand-mark {
    margin: 0 0 auto; width: 56px; height: 56px; font-size: 23px; border-radius: 16px;
    background: var(--gold-500); color: var(--brand-900); box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.auth-brand strong { display: block; margin-top: 28px; font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 700; line-height: 1.15; color: #fff; }
.auth-brand small { color: var(--gold-400); font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; font-size: 11.5px; }
.auth-brand small::after { content: ''; display: block; width: 44px; height: 3px; margin-top: 16px; border-radius: 2px; background: var(--gold-500); }
.auth-body { padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-title { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 700; color: var(--brand-800); margin: 0 0 6px; }
.auth-sub { font-size: 14px; color: var(--muted); margin: 0 0 26px; }
.auth-body .field-input { background: var(--brand-50); border-color: var(--line); border-radius: 12px; }
.auth-body .field-input:focus-within { background: #fff; }
.auth-body .btn { width: 100%; padding-top: 13px; padding-bottom: 13px; border-radius: 12px; font-size: 15px; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin: 20px 0 0; }
.tagline { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

@media (max-width: 760px) {
    .auth-shell { max-width: 440px; }
    .auth-card { grid-template-columns: 1fr; min-height: 0; border-radius: 18px; }
    .auth-brand { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 2px; padding: 22px 26px; }
    .auth-brand .brand-mark { margin: 0; width: 48px; height: 48px; font-size: 20px; border-radius: 14px; }
    .auth-brand strong { margin: 0; font-size: 21px; flex: 1; }
    .auth-brand small { flex-basis: 100%; padding-left: 62px; }
    .auth-brand small::after { display: none; }
    .auth-body { padding: 28px 26px 30px; }
    .auth-title { font-size: 24px; }
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; }
    .shell { margin-left: 0; }
    .icon-btn { display: block; }
    .topbar-meta { display: none; }
    .content { padding: 18px 14px; }
}
@media (max-width: 480px) {
    .auth-brand, .auth-body { padding-left: 20px; padding-right: 20px; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 10px; }
}

/* Products */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 14px; font-weight: 700; font-size: 13.5px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--brand-700); }
.tab.is-active { color: var(--brand-700); border-bottom-color: var(--gold-500); }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-100); color: var(--brand-700); font-size: 11.5px; text-align: center; }
.pill-mute { background: #eef1ef; color: var(--muted); }
.reject-note { margin-top: 6px; font-size: 12.5px; color: var(--danger); max-width: 260px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--brand-50); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-main { position: absolute; left: 6px; top: 6px; background: var(--gold-500); color: var(--brand-900); font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.photo-del { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.photo-del:hover { background: var(--danger); }

/* Description editor (Quill) */
.editor-wrap { background: #fff; border-radius: 10px; }
.editor-wrap .ql-toolbar.ql-snow { border: 1.5px solid var(--line); border-radius: 10px 10px 0 0; background: var(--brand-50); }
.editor-wrap .ql-container.ql-snow { border: 1.5px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; font: inherit; font-size: 14.5px; }
.editor-wrap .ql-editor { min-height: 150px; max-height: 340px; overflow-y: auto; }
.editor-wrap .ql-editor.ql-blank::before { font-style: normal; color: #b8a796; }
.desc-fallback { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; resize: vertical; }

/* Orders */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; flex-direction: column; gap: 1px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.tl-when { font-size: 12px; color: var(--muted); font-weight: 700; }
.tl-note { font-size: 13px; color: var(--muted); }
.decline summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.decline summary:hover { color: var(--danger); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
