/* ==========================================================
   Ritu Kumar Admin - theme
   Colors & type follow ritu-kumar-past-perfect.vercel.app
   ========================================================== */
:root {
    --paper: #FCF9F5;
    --blush: #F4E6E1;
    --sand: #EFE6D9;
    --sage: #DFE7DE;
    --mist: #E8E4EE;
    --ink: #241E1B;
    --body: #6B605A;
    --faint: #A79B92;
    --line: #E4DBD2;
    --rose: #9E4257;
    --rose-dark: #84354A;
    --gold: #B08C4F;
    --surface: #FFFFFF;
    --on-rose: #FFFFFF;
    --paper-rgb: 252, 249, 245;
    --shadow-rgb: 36, 30, 27;
    --stat-border: rgba(255, 255, 255, .9);
    --ok-text: #4A6150;
    --draft-text: #5E566E;
    --grad-mid: #B8555C;
    --serif: "Italiana", Georgia, "Times New Roman", serif;
    --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
    --sidebar-w: 248px;
    --ease: cubic-bezier(.22, .8, .3, 1);

    /* Bootstrap overrides */
    --bs-body-font-family: var(--sans);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-border-color: var(--line);
    --bs-link-color: var(--rose);
    --bs-link-hover-color: var(--rose-dark);
    --bs-border-radius: 2px;
    color-scheme: light;
}

/* ---------- Dark mode (set by the toggle in the top bar) ---------- */
:root[data-theme="dark"] {
    --paper: #161210;
    --surface: #201A17;
    --blush: #3A242A;
    --sand: #2D251F;
    --sage: #233027;
    --mist: #29253A;
    --ink: #F3ECE6;
    --body: #C2B5AC;
    --faint: #8F8279;
    --line: #382E28;
    --rose: #D98A9C;
    --rose-dark: #E6A5B4;
    --gold: #D3B47A;
    --on-rose: #1A1210;
    --paper-rgb: 22, 18, 16;
    --shadow-rgb: 0, 0, 0;
    --stat-border: #382E28;
    --ok-text: #A9C9B0;
    --draft-text: #C4BBDD;
    --grad-mid: #DE9A8C;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-border-color: var(--line);
    --bs-link-color: var(--rose);
    --bs-link-hover-color: var(--rose-dark);
    color-scheme: dark;
}

/* Smooth color change only while switching, so normal hovers stay snappy */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
    transition: background-color .4s, color .4s, border-color .4s !important;
}

.theme-toggle .fa { font-size: 15px; }
:root[data-theme="dark"] .modal-content { border: 1px solid var(--line); }
:root[data-theme="dark"] .modal-backdrop.show { opacity: .6; }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 1.5px solid var(--rose); outline-offset: 3px; }

/* ---------- Typography helpers ---------- */
.serif { font-family: var(--serif); }
.eyebrow {
    font-size: 10px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 10px;
}
.page-title {
    font-family: var(--serif);
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.1;
}
.lede { color: var(--body); font-size: 15px; }
.muted { color: var(--faint); }
.grad {
    background: linear-gradient(96deg, var(--rose) 0%, var(--grad-mid) 38%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    border-radius: 2px;
    padding: 12px 24px;
    transition: background .3s, border-color .3s, color .3s;
}
.btn-sm { padding: 7px 14px; font-size: 10px; }
.btn-rose {
    background: var(--rose);
    border: 1px solid var(--rose);
    color: var(--on-rose);
}
.btn-rose:hover, .btn-rose:focus, .btn-rose:active { background: var(--rose-dark) !important; border-color: var(--rose-dark) !important; color: var(--on-rose) !important; }
.btn-line {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}
.btn-line:hover, .btn-line:active { background: var(--blush) !important; border-color: var(--blush) !important; color: var(--ink) !important; }
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--body);
    border-radius: 50%;
    transition: background .3s, color .3s, border-color .3s;
}
.btn-icon:hover { background: var(--blush); border-color: var(--blush); color: var(--rose); }
.btn-icon.danger:hover { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }

/* ---------- Forms ---------- */
.form-label {
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--body);
    margin-bottom: 8px;
}
.form-control, .form-select {
    font-family: var(--sans);
    font-weight: 300;
    font-size: 15px;
    color: var(--ink);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 11px 14px;
    transition: border-color .3s, box-shadow .3s;
}
.form-control::placeholder { color: var(--faint); }
.form-control:focus, .form-select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(158, 66, 87, .1);
    color: var(--ink);
}
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--rose); background-image: none; padding-right: 14px; }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(158, 66, 87, .1); }
.invalid-feedback { color: var(--rose); font-size: 12.5px; }
.form-check-input:checked { background-color: var(--rose); border-color: var(--rose); }
.form-check-input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(158, 66, 87, .1); }
.form-check-label { font-size: 14px; color: var(--body); }
.input-group-text {
    background: var(--sand);
    border: 1px solid var(--line);
    color: var(--body);
    border-radius: 2px;
}

/* ==========================================================
   Login
   ========================================================== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}
.login-brand {
    position: relative;
    overflow: hidden;
    padding: 48px clamp(32px, 5vw, 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    background:
        radial-gradient(700px 480px at 30% 60%, rgba(var(--paper-rgb), .7) 0%, rgba(var(--paper-rgb), 0) 70%),
        linear-gradient(120deg, var(--blush), var(--sand) 55%, var(--sage));
}
.brand-mark {
    font-family: var(--serif);
    font-size: 19px;
    letter-spacing: .26em;
    color: var(--ink);
}
.brand-mark small {
    display: block;
    font-family: var(--sans);
    font-size: 9px;
    letter-spacing: .36em;
    text-transform: uppercase;
    color: var(--faint);
    margin-top: 4px;
}
.login-brand .display {
    font-family: var(--serif);
    font-size: clamp(44px, 5.4vw, 92px);
    line-height: .95;
    letter-spacing: .04em;
}
.login-brand .lede { max-width: 38ch; margin-top: 20px; }
.login-brand .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(var(--shadow-rgb), .12);
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--body);
}
.login-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}
.login-card { width: 100%; max-width: 400px; }
.login-card .page-title { margin-bottom: 8px; }
.login-card form { margin-top: 32px; }
.pass-toggle {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 0;
    color: var(--faint);
    padding: 0 14px;
}
.pass-toggle:hover { color: var(--rose); }
.login-alert {
    display: none;
    background: var(--blush);
    border-left: 2px solid var(--rose);
    color: var(--rose-dark);
    font-size: 13.5px;
    padding: 10px 14px;
    margin-bottom: 18px;
}
.login-hint { font-size: 12.5px; color: var(--faint); margin-top: 24px; text-align: center; }

/* ==========================================================
   Admin layout
   ========================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform .4s var(--ease);
}
.sidebar .brand-mark { display: block; padding: 28px 28px 24px; border-bottom: 1px solid var(--line); }
.side-nav { list-style: none; margin: 0; padding: 20px 14px; flex: 1; overflow-y: auto; }
.side-nav .label {
    font-size: 9.5px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 14px 14px 8px;
}
.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--body);
    font-size: 14.5px;
    border-radius: 2px;
    transition: background .3s, color .3s;
}
.side-nav a .fa { width: 16px; text-align: center; color: var(--faint); transition: color .3s; }
.side-nav a:hover { background: var(--paper); color: var(--ink); }
.side-nav a.active { background: var(--blush); color: var(--rose); font-weight: 400; }
.side-nav a.active .fa { color: var(--rose); }
.side-foot { padding: 18px 28px; border-top: 1px solid var(--line); }
.side-foot a { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--body); }
.side-foot a:hover { color: var(--rose); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 3vw, 40px);
    background: rgba(var(--paper-rgb), .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar .left { display: flex; align-items: center; gap: 12px; }
.topbar .crumb { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.topbar .crumb b { font-weight: 400; color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--body); }
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--rose);
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 16px;
}
.menu-toggle { display: none; }
.content { padding: clamp(24px, 3.2vw, 44px) clamp(16px, 3vw, 40px) 60px; flex: 1; }
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.page-head .lede { margin-top: 6px; }
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(var(--shadow-rgb), .32);
    z-index: 45;
}

/* ---------- Panels & cards ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: clamp(18px, 2vw, 28px);
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.panel-head h3 { font-family: var(--serif); font-size: 22px; }

.stat {
    position: relative;
    padding: 22px 22px 20px;
    border: 1px solid var(--stat-border);
    border-radius: 2px;
    box-shadow: 0 14px 34px rgba(var(--shadow-rgb), .06);
    height: 100%;
    transition: transform .5s var(--ease), box-shadow .5s;
}
.stat:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(var(--shadow-rgb), .1); }
.stat.t1 { background: linear-gradient(150deg, var(--surface), var(--blush)); }
.stat.t2 { background: linear-gradient(150deg, var(--surface), var(--sand)); }
.stat.t3 { background: linear-gradient(150deg, var(--surface), var(--sage)); }
.stat.t4 { background: linear-gradient(150deg, var(--surface), var(--mist)); }
.stat .k { font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--body); }
.stat .n {
    font-family: var(--serif);
    font-size: clamp(32px, 2.8vw, 44px);
    line-height: 1.1;
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}
.stat .d { font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.stat .ic {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--rose);
    display: grid;
    place-items: center;
}

/* Category bars */
.bar-row { margin-bottom: 16px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.bar-row .top span:last-child { color: var(--faint); font-variant-numeric: tabular-nums; }
.bar { height: 4px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--rose), var(--gold));
    width: 0;
    transition: width 1s var(--ease);
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
.rk-table { width: 100%; margin: 0; border-collapse: collapse; }
.rk-table th {
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 0 14px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.rk-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
}
.rk-table tbody tr { transition: background .25s; }
.rk-table tbody tr:hover { background: var(--paper); }
.rk-table tbody tr:last-child td { border-bottom: 0; }
.rk-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-table .actions { text-align: right; white-space: nowrap; }
.rk-table .actions .btn-icon + .btn-icon { margin-left: 6px; }
.prod { display: flex; align-items: center; gap: 12px; }
.thumb {
    width: 44px;
    height: 54px;
    flex: 0 0 44px;
    border-radius: 2px;
    background: var(--sand) center / cover no-repeat;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    color: var(--rose);
    font-size: 18px;
}
.prod .name { color: var(--ink); font-weight: 400; }
.prod .sku { font-size: 11.5px; letter-spacing: .08em; color: var(--faint); }
.empty-state { text-align: center; padding: 48px 16px; color: var(--faint); }
.empty-state .serif { font-size: 22px; color: var(--ink); margin-bottom: 6px; }

/* Status badges */
.badge-rk {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 2px;
    white-space: nowrap;
}
.badge-rk.active { background: var(--sage); color: var(--ok-text); }
.badge-rk.draft { background: var(--mist); color: var(--draft-text); }
.badge-rk.low { background: var(--blush); color: var(--rose); }
.badge-rk.out { background: var(--ink); color: var(--paper); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.toolbar .search { position: relative; flex: 1 1 260px; }
.toolbar .search .fa { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar .search .form-control { padding-left: 38px; }
.toolbar .form-select { flex: 0 1 200px; width: auto; }
/* Filter box sits on its own above the products */
.filter-panel { margin-bottom: clamp(16px, 1.6vw, 24px); }
.filter-panel .toolbar { margin-bottom: 0; }

/* Search scope radio chips */
.search-scope { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scope-label {
    font-size: 9.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--faint);
    margin-right: 4px;
}
.chip { position: relative; margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--surface);
    font-size: 13px;
    color: var(--body);
    transition: background .3s, border-color .3s, color .3s;
}
.chip span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--faint);
    transition: border-color .3s, box-shadow .3s, background .3s;
}
.chip:hover span { border-color: var(--rose); color: var(--ink); }
.chip input:checked + span { background: var(--blush); border-color: var(--rose); color: var(--rose); }
.chip input:checked + span::before { border-color: var(--rose); background: var(--rose); box-shadow: inset 0 0 0 2px var(--blush); }
.chip input:focus-visible + span { outline: 1.5px solid var(--rose); outline-offset: 2px; }

.result-count { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }

/* ---------- Product grid ---------- */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: clamp(16px, 1.6vw, 24px);
}
.prod-grid .empty-state { grid-column: 1 / -1; }
.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    transition: transform .5s var(--ease), box-shadow .5s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(var(--shadow-rgb), .09); }
.pcard-media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    background: linear-gradient(150deg, var(--blush), var(--sand)) center / cover no-repeat;
    overflow: hidden;
}
.pcard-media[style] { background-size: cover; background-position: center; }
.pcard-initial {
    font-family: var(--serif);
    font-size: 64px;
    color: var(--rose);
    opacity: .7;
}
.pcard-badge { position: absolute; top: 12px; left: 12px; }
.pcard-badge .badge-rk.low { background: var(--surface); }
.pcard-count {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(var(--shadow-rgb), .62);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 2px;
}
.pcard-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .3s, transform .3s var(--ease);
}
.pcard:hover .pcard-actions, .pcard:focus-within .pcard-actions { opacity: 1; transform: none; }
.pcard-actions .btn-icon { background: rgba(var(--paper-rgb), .95); border-color: transparent; color: var(--ink); }
.pcard-actions .btn-icon:hover { background: var(--blush); color: var(--rose); }
.pcard-actions .btn-icon.danger:hover { background: var(--rose); color: var(--on-rose); }
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.pcard-meta {
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--rose);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcard-name { font-family: var(--serif); font-size: 20px; line-height: 1.2; margin-top: 6px; }
.pcard-name a { color: var(--ink); }
.pcard-name a:hover { color: var(--rose); }
.pcard-sku { font-size: 11.5px; letter-spacing: .08em; color: var(--faint); margin-top: 4px; }
.pcard-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}
.pcard-price { font-size: 16px; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard-stock { font-size: 12px; color: var(--faint); white-space: nowrap; }
.pcard-stock.low { color: var(--rose); }
.pcard-updated {
    font-size: 11.5px;
    color: var(--faint);
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 10px;
}
@media (hover: none) {
    .pcard-actions { opacity: 1; transform: none; }
}

/* ---------- Slider (dashboard "Recently updated") ---------- */
.slider-nav { display: flex; align-items: center; gap: 8px; }
.slider-nav .btn { margin-left: 6px; }
.slider-nav .btn-icon.is-disabled { opacity: .3; pointer-events: none; }
.slider-nav .btn-icon.swiper-button-lock { display: none; }
.recent-slider { padding: 4px 2px 8px; margin: -4px -2px 0; }
.recent-slider .swiper-slide { height: auto; }
.recent-slider .pcard { height: 100%; }
.recent-slider .pcard:hover { transform: translateY(-3px); }
.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.slider-dots.swiper-pagination-lock { display: none; }
.slider-dots .dot {
    width: 20px;
    height: 2px;
    padding: 0;
    border: 0;
    background: var(--line);
    cursor: pointer;
    position: relative;
    transition: background .35s, width .35s var(--ease);
}
.slider-dots .dot::before { content: ""; position: absolute; inset: -8px 0; }
.slider-dots .dot.on { background: var(--rose); width: 32px; }
@media (max-width: 575px) {
    .slider-nav .btn { display: none; }
    .panel-head h3 { white-space: nowrap; }
}
@media (max-width: 575px) {
    .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pcard-body { padding: 12px; }
    .pcard-name { font-size: 17px; }
    .pcard-foot { flex-direction: column; gap: 2px; padding-top: 10px; }
    .pcard-price { font-size: 14.5px; }
    .pcard-badge { top: 8px; left: 8px; }
    .pcard-actions { top: 8px; right: 8px; }
    .pcard-actions .btn-icon { width: 30px; height: 30px; }
}

/* ---------- Form page ---------- */
.form-section-title {
    font-family: var(--serif);
    font-size: 21px;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
/* Image upload */
.dropzone {
    border: 1px dashed var(--faint);
    border-radius: 2px;
    background: var(--paper);
    padding: 28px 16px 24px;
    text-align: center;
    cursor: pointer;
    transition: background .3s, border-color .3s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { background: var(--blush); border-color: var(--rose); }
.dropzone.drag { border-style: solid; }
.dropzone.is-full { opacity: .5; cursor: not-allowed; }
.dz-ic {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--rose);
    display: grid;
    place-items: center;
    font-size: 19px;
    transition: transform .5s var(--ease);
}
.dropzone.drag .dz-ic { transform: translateY(-4px); }
.dz-title { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.dz-sub { font-size: 13.5px; color: var(--body); margin-top: 2px; }
.dz-link { color: var(--rose); border-bottom: 1px solid currentColor; }
.dz-note { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 12px; }
.img-error { display: none; color: var(--rose); font-size: 12.5px; margin-top: 8px; }
.img-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}
.img-grid:empty { display: none; }
.img-tile {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 2px;
    background: var(--sand) center / cover no-repeat;
    border: 1px solid var(--line);
    cursor: grab;
    transition: opacity .25s, transform .25s, box-shadow .25s;
}
.img-tile.dragging { opacity: .35; }
.img-tile.over { box-shadow: 0 0 0 2px var(--rose); }
.img-tile.loading { display: grid; place-items: center; color: var(--rose); cursor: default; }
.img-tile .cover-tag {
    position: absolute;
    left: 5px;
    bottom: 5px;
    background: var(--rose);
    color: var(--on-rose);
    font-size: 8.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 2px;
}
.img-tile .tile-btns {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity .25s;
}
.img-tile:hover .tile-btns, .img-tile:focus-within .tile-btns { opacity: 1; }
.tile-btns button {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(var(--paper-rgb), .94);
    color: var(--ink);
    font-size: 11px;
    display: grid;
    place-items: center;
    transition: background .25s, color .25s;
}
.tile-btns button:hover { background: var(--rose); color: var(--on-rose); }
.img-hint { font-size: 12px; color: var(--faint); margin-top: 10px; }
@media (hover: none) {
    .img-tile .tile-btns { opacity: 1; }
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}
.form-actions .delete-link { margin-right: auto; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 2px; background: var(--paper); }
.modal-backdrop.show { opacity: .35; }
.modal-body { padding: 36px 32px 28px; text-align: center; }
.modal-body .ic {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--blush);
    color: var(--rose);
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 20px;
}
.modal-body h3 { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; }
.modal-body p { color: var(--body); font-size: 14.5px; }
.modal-body p b { font-weight: 400; color: var(--ink); }
.modal-body .btns { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---------- Toast ---------- */
.rk-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    background: var(--ink);
    color: var(--paper);
    font-size: 13.5px;
    padding: 13px 20px;
    border-left: 2px solid var(--gold);
    border-radius: 2px;
    box-shadow: 0 14px 34px rgba(var(--shadow-rgb), .2);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.rk-toast.show { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 991px) {
    .login-page { grid-template-columns: 1fr; }
    .login-brand { padding: 32px 24px; }
    .login-brand .meta { display: none; }

    .sidebar { transform: translateX(-100%); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .sidebar-backdrop { display: block; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
}
@media (max-width: 767px) {
    .user-chip .name { display: none; }
    .rk-table .hide-sm { display: none; }
    .rk-table td { padding: 12px 8px; }
    .rk-table th { padding: 0 8px 12px; }
    .rk-table .thumb { display: none; }
    .page-head .btn { width: 100%; }
    .toolbar .form-select { flex: 1 1 140px; }
    .rk-toast { left: 16px; right: 16px; }
    .form-actions .btn { flex: 1 1 auto; }
}
