:root {
    --bg-0: #0a0f1d;
    --bg-1: #101729;
    --bg-2: #161f34;
    --bg-3: #1d2842;
    --panel: rgba(20, 29, 48, 0.78);
    --panel-strong: rgba(19, 26, 43, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f7f9ff;
    --muted: rgba(223, 229, 245, 0.72);
    --muted-2: rgba(223, 229, 245, 0.52);
    --accent: #7a8cff;
    --accent-2: #4fd8ff;
    --success: #37d39a;
    --warning: #ffb454;
    --danger: #ff7272;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --content-width: 1540px;
    --sidebar-width: 300px;
    --topbar-height: 92px;
    --blur: blur(20px);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(84, 110, 255, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(79, 216, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #090d18 0%, #0d1322 45%, #0a0f1d 100%);
    color: var(--text);
    font-family: var(--font);
}

body {
    position: relative;
    overflow-x: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.admin-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.admin-ambient i {
    position: absolute;
    display: block;
    border-radius: 999px;
    filter: blur(60px);
    opacity: 0.45;
}

.admin-ambient i:nth-child(1) {
    width: 260px;
    height: 260px;
    top: 6%;
    left: -60px;
    background: rgba(122, 140, 255, 0.28);
    animation: drift-a 16s ease-in-out infinite;
}

.admin-ambient i:nth-child(2) {
    width: 320px;
    height: 320px;
    right: -120px;
    top: 18%;
    background: rgba(79, 216, 255, 0.20);
    animation: drift-b 22s ease-in-out infinite;
}

.admin-ambient i:nth-child(3) {
    width: 240px;
    height: 240px;
    bottom: -70px;
    left: 24%;
    background: rgba(104, 255, 199, 0.12);
    animation: drift-c 18s ease-in-out infinite;
}

@keyframes drift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, 40px) scale(1.12); }
}

@keyframes drift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 28px) scale(1.08); }
}

@keyframes drift-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -36px) scale(1.10); }
}

.admin-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px 18px;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(19, 25, 41, 0.92), rgba(10, 14, 24, 0.94));
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.06em;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
        linear-gradient(145deg, #eff3ff, #a9bbff 60%, #7fe0ff);
    color: #0f1424;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 12px 25px rgba(0, 0, 0, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-copy small {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.brand-copy b {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sidebar-close,
.menu-toggle {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.sidebar-close:active,
.menu-toggle:active {
    transform: scale(0.96);
}

.only-mobile {
    display: none;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-label {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 18px;
    text-align: left;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-link span {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.06);
    color: #eef3ff;
}

.nav-link div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link b {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-link small {
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1.25;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
    transform: translateY(-1px);
}

.nav-link.is-active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-foot {
    margin-top: auto;
}

.mini-note {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.mini-note small {
    display: block;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin-bottom: 6px;
}

.mini-note b {
    display: block;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 6px;
}

.mini-note p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.sidebar-backdrop {
    display: none;
}

.workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(11, 15, 25, 0.82), rgba(11, 15, 25, 0.62));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.page-headline {
    min-width: 0;
}

.page-headline small {
    display: block;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
}

.page-headline h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-headline p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    max-width: 720px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    padding: 8px 10px 8px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #0e1322;
    background:
        linear-gradient(145deg, #f1f4ff, #b8c6ff 55%, #87e2ff);
}

.profile-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-copy small {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.profile-copy b {
    font-size: 13px;
    font-weight: 800;
}

.page-wrap {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 24px 28px 34px;
}

.loading-page {
    min-height: 58vh;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
}

.loading-page h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.loading-page p {
    margin: 0;
    color: var(--muted);
}

.loading-orb {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, #f7f9ff, #99b2ff 42%, rgba(122, 140, 255, 0.2) 70%);
    box-shadow:
        0 0 0 12px rgba(122, 140, 255, 0.06),
        0 18px 36px rgba(0, 0, 0, 0.25);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.94; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ----------------------------------------------------------
   LAYOUT UTILITIES
   ---------------------------------------------------------- */

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.panel,
.table-wrap,
.hero-panel,
.form-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.card,
.panel,
.form-panel,
.hero-panel {
    padding: 20px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: auto -50px -70px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(79, 216, 255, 0.18), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.hero-panel .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--muted);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.hero-panel h2 {
    margin: 14px 0 10px;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-panel p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-head > div {
    min-width: 0;
}

.section-head small {
    display: block;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.section-head h2,
.section-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-top span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.07);
}

.stat-top small {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.stat-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.stat-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.kpi-soft {
    color: var(--muted-2);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.02em;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background:
        linear-gradient(145deg, #eef3ff, #9eb4ff 58%, #83dfff);
    color: #0f1320;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 14px 26px rgba(0, 0, 0, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
}

.btn-danger {
    background: rgba(255, 114, 114, 0.14);
    border-color: rgba(255, 114, 114, 0.28);
    color: #ffd4d4;
}

.btn-success {
    background: rgba(55, 211, 154, 0.16);
    border-color: rgba(55, 211, 154, 0.28);
    color: #d7fff0;
}

.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.badge b {
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.pill.success {
    background: rgba(55, 211, 154, 0.16);
    border-color: rgba(55, 211, 154, 0.25);
    color: #d7fff0;
}

.pill.warning {
    background: rgba(255, 180, 84, 0.16);
    border-color: rgba(255, 180, 84, 0.25);
    color: #ffe6bf;
}

.pill.danger {
    background: rgba(255, 114, 114, 0.14);
    border-color: rgba(255, 114, 114, 0.24);
    color: #ffd7d7;
}

.pill.soft {
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.wide {
    grid-column: 1 / -1;
}

.field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    appearance: none;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 16px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field textarea {
    min-height: 124px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(122, 140, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(122, 140, 255, 0.12);
}

.field .hint {
    color: var(--muted-2);
    font-size: 11px;
    line-height: 1.4;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.check input {
    accent-color: #9fb5ff;
}

.split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.table-wrap {
    overflow: hidden;
    padding: 0;
}

.table-head {
    padding: 18px 18px 0;
}

.table-inner {
    overflow-x: auto;
    padding: 0 14px 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.table th,
.table td {
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table thead th {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.table tbody tr {
    transition: background 150ms ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table .name-cell b {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.table .name-cell small {
    color: var(--muted-2);
    display: block;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions .btn {
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 12px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px;
}

.pagination-meta {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 220px;
    padding: 30px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    max-width: 540px;
    line-height: 1.5;
}

.tile-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.tile {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.tile-media {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background:
        linear-gradient(145deg, #1f2940, #121927);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
    font-size: 28px;
}

.tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-copy {
    min-width: 0;
}

.tile-copy small {
    display: block;
    color: var(--muted-2);
    font-size: 11px;
    margin-bottom: 6px;
}

.tile-copy h3 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.tile-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.tile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.upload-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.upload-preview {
    width: 100%;
    min-height: 180px;
    border-radius: 20px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: linear-gradient(145deg, #1a2237, #0f1525);
    display: grid;
    place-items: center;
    color: var(--muted);
    margin-bottom: 12px;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.inquiry-card {
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inquiry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.inquiry-head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.inquiry-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.inquiry-items {
    display: grid;
    gap: 10px;
}

.inquiry-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.inquiry-item b {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.inquiry-item small {
    display: block;
    color: var(--muted);
    line-height: 1.4;
}

.kv {
    display: grid;
    gap: 10px;
}

.kv-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    align-items: start;
}

.kv-row small {
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kv-row div {
    color: var(--text);
    word-break: break-word;
}

.filters {
    display: grid;
    gap: 14px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blocking-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at top, rgba(122, 140, 255, 0.16), transparent 28%),
        rgba(5, 8, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.blocking-card {
    width: min(100%, 520px);
    padding: 28px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(19, 27, 44, 0.92), rgba(10, 15, 26, 0.95));
    text-align: center;
    box-shadow: var(--shadow);
}

.blocking-mark {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 30px;
    font-weight: 900;
    color: #101627;
    background:
        linear-gradient(145deg, #f2f5ff, #b6c6ff 58%, #84dfff);
}

.blocking-card small {
    display: block;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin-bottom: 8px;
}

.blocking-card h2 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.blocking-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.6;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(18px);
    min-width: 220px;
    max-width: calc(100vw - 28px);
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(20, 27, 44, 0.92), rgba(11, 17, 29, 0.95));
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 120;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

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

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 40;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(92vw, 340px);
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 39;
        display: block;
        background: rgba(5, 8, 14, 0.56);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    .sidebar-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .only-mobile {
        display: grid;
    }

    .menu-toggle {
        display: grid;
    }

    .topbar {
        padding: 16px 18px;
    }

    .page-wrap {
        padding: 18px;
    }

    .page-headline h1 {
        font-size: 24px;
    }

    .stats-grid,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .form-grid-3,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .kv-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .tile {
        grid-template-columns: 1fr;
    }

    .tile-actions {
        justify-content: flex-start;
    }

    .profile-pill {
        padding-right: 8px;
    }

    .profile-copy small {
        display: none;
    }
}

@media (min-width: 981px) {
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 560px) {
    .stat-value {
        font-size: 25px;
    }

    .hero-panel h2 {
        font-size: 28px;
    }

    .section-head {
        flex-direction: column;
    }

    .page-headline h1 {
        font-size: 22px;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-right {
        align-self: stretch;
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* ==========================================================
   HIDDEN ELEMENTS
   ========================================================== */

[hidden] {
    display: none !important;
}

.blocking-screen[hidden] {
    display: none !important;
}
/* ----------------------------------------------------------
   DESKTOP ADMIN V2 / USERS
   ---------------------------------------------------------- */

.users-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin: 18px 0;
}

.users-search-field {
    margin: 0;
}

.users-table-wrap {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.025);
}

.users-table {
    min-width: 980px;
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.user-name-cell > span:last-child {
    min-width: 0;
}

.user-avatar-mini {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-weight: 900;
    color: #0d1322;
    background: linear-gradient(145deg, #eef2ff, #aebeff 56%, #74dfff);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

@media (min-width: 1440px) {
    :root {
        --content-width: 1760px;
        --sidebar-width: 320px;
    }

    .page-wrap {
        padding: 28px 34px 42px;
    }

    .topbar {
        padding-left: 34px;
        padding-right: 34px;
    }

    .table th,
    .table td {
        padding-left: 16px;
        padding-right: 16px;
    }

    .desktop-users-panel {
        padding: 24px;
    }
}

@media (min-width: 1180px) {
    .table thead th {
        position: sticky;
        top: var(--topbar-height);
        z-index: 4;
        background: rgba(16, 23, 41, 0.98);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
}

@media (max-width: 760px) {
    .users-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .users-search-field {
        grid-column: 1 / -1;
    }
}

/* ==========================================================
   ADMIN V3 — WIDE DESKTOP / SIMPLIFIED WORKSPACE
   ========================================================== */

@media (min-width: 1180px) {
    :root {
        --sidebar-width: 252px;
        --content-width: none;
    }

    .workspace {
        min-width: 0;
    }

    .page-wrap {
        width: 100%;
        max-width: none;
        padding: 24px 28px 44px;
    }

    .topbar {
        width: 100%;
        padding: 16px 28px;
    }

    .sidebar {
        padding: 18px 14px;
    }

    .sidebar-nav {
        gap: 6px;
    }

    .nav-link {
        min-height: 54px;
        padding: 9px 10px;
    }

    .nav-link small {
        display: none;
    }

    .split {
        grid-template-columns: minmax(0, 1fr) minmax(420px, .78fr);
        align-items: start;
    }

    .catalog-workbench {
        display: grid;
        grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr);
        gap: 18px;
        align-items: start;
    }

    .sticky-editor {
        position: sticky;
        top: calc(var(--topbar-height) + 18px);
    }

    .table-inner,
    .table-wrap {
        max-width: none;
    }
}

.compact-admin-page {
    gap: 16px;
}

.compact-hero {
    padding: 20px 22px;
    min-height: 0;
}

.compact-hero h2 {
    margin-bottom: 6px;
}

.compact-panel {
    padding: 18px;
}

.compact-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.compact-list-row {
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: inherit;
    padding: 8px;
    text-align: left;
}

.compact-list-row.is-selected {
    border-color: rgba(132, 151, 255, .72);
    background: rgba(111, 128, 255, .12);
}

.compact-thumb {
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    font-weight: 900;
}

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

.compact-list-copy {
    min-width: 0;
}

.compact-list-copy b,
.compact-list-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-list-copy small {
    margin-top: 3px;
    color: var(--muted);
}

.btn-wide {
    width: 100%;
}

.horizontal-upload {
    display: grid;
    grid-template-columns: 150px minmax(0,1fr);
    align-items: center;
    gap: 14px;
}

.small-preview {
    min-height: 110px;
}

.sticky-actions {
    position: sticky;
    bottom: 10px;
    z-index: 8;
    padding: 10px;
    margin: 0 -10px -10px;
    border-radius: 14px;
    background: rgba(14, 20, 35, .88);
    backdrop-filter: blur(18px);
}

@media (max-width: 1179px) {
    .catalog-workbench {
        display: grid;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .horizontal-upload {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   ADMIN V4 — CONSULTATION INBOX / MOBILE-FIRST OPERATIONS
   ========================================================== */
.admin-home-v4{gap:18px}.inquiry-inbox-panel{padding:20px}.inquiry-inbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.inquiry-card-v4{display:flex;flex-direction:column;gap:14px;padding:16px;background:rgba(255,255,255,.035);border:1px solid var(--line);border-radius:20px;box-shadow:none}.inquiry-card-v4 .inquiry-head{align-items:flex-start}.inquiry-user{display:flex;align-items:center;gap:11px;min-width:0}.inquiry-user-avatar{flex:0 0 auto;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;font-weight:900;color:#0d1322;background:linear-gradient(145deg,#eef2ff,#aebeff 56%,#74dfff)}.inquiry-user h3{margin:2px 0 2px;font-size:17px}.inquiry-user p,.inquiry-user small{margin:0;color:var(--muted);font-size:11px}.inquiry-product-list{display:grid;gap:8px}.inquiry-product-row{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px;border-radius:15px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.065)}.inquiry-product-media{width:52px;height:52px;border-radius:12px;overflow:hidden;display:grid;place-items:center;background:rgba(255,255,255,.07);font-weight:900}.inquiry-product-media img{width:100%;height:100%;object-fit:cover}.inquiry-product-copy{min-width:0}.inquiry-product-copy b,.inquiry-product-copy small{display:block}.inquiry-product-copy b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inquiry-product-copy small,.inquiry-product-stock small{margin-top:4px;color:var(--muted);font-size:11px}.inquiry-product-stock{text-align:right}.inquiry-product-stock b,.inquiry-product-stock small{display:block}.inquiry-summary-v4{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.inquiry-summary-v4 span{padding:10px;border-radius:13px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.055)}.inquiry-summary-v4 b,.inquiry-summary-v4 small{display:block}.inquiry-summary-v4 small{margin-top:3px;color:var(--muted);font-size:10px}.inquiry-actions-v4{display:grid;grid-template-columns:1fr auto;gap:8px}.inquiry-resolved{font-size:11px;color:var(--muted);padding-top:4px}.stock-reserved-note{display:block;margin-top:5px;color:var(--muted);font-size:10px}.overview-secondary{opacity:.95}
@media(min-width:1500px){.inquiry-inbox-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.page-wrap{padding:10px 10px 92px}.topbar{min-height:auto;padding:9px 10px;position:sticky;top:0}.page-headline small,.page-headline p{display:none}.page-headline h1{font-size:19px}.profile-pill{padding:5px 7px}.profile-copy{display:none}.profile-avatar{width:36px;height:36px}.inquiry-inbox-panel{padding:0;border:0;background:transparent;box-shadow:none}.inquiry-inbox-heading{padding:4px 2px 8px;align-items:flex-end}.inquiry-inbox-heading small{display:none}.inquiry-inbox-heading h2{font-size:22px;margin:0}.inquiry-inbox-heading p{font-size:11px;line-height:1.45;margin-top:5px}.inquiry-inbox-heading .btn-primary{display:none}.inquiry-inbox-grid{grid-template-columns:1fr;gap:9px}.inquiry-card-v4{padding:12px;border-radius:17px;background:rgba(19,27,45,.94)}.inquiry-user-avatar{width:40px;height:40px}.inquiry-user h3{font-size:16px}.inquiry-card-v4>.inquiry-head{gap:8px}.inquiry-card-v4>.inquiry-head>.pill{font-size:9px;padding:6px 7px}.inquiry-product-row{grid-template-columns:46px minmax(0,1fr) auto;padding:7px}.inquiry-product-media{width:46px;height:46px}.inquiry-summary-v4{grid-template-columns:1fr 1fr}.inquiry-summary-v4 span:last-child{display:none}.inquiry-actions-v4{grid-template-columns:1fr}.inquiry-actions-v4 .btn{width:100%;min-height:46px}.overview-secondary{display:none}.sidebar-foot{display:none}.sidebar{padding-bottom:70px}}

/* ==========================================================
   V5 · GIVEAWAY BUILDER
   ========================================================== */

.giveaway-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
    gap: 18px;
    align-items: start;
}

.giveaway-admin-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 112px;
}

.giveaway-upload-row {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.giveaway-preview {
    min-height: 220px;
    border-radius: 22px;
    overflow: hidden;
}

.giveaway-preview img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: contain;
    background: rgba(5,9,17,.55);
}

.giveaway-editor-actions {
    margin-top: 18px;
}

.giveaway-admin-list {
    display: grid;
    gap: 10px;
    max-height: 610px;
    overflow: auto;
    padding-right: 3px;
}

.giveaway-admin-item {
    display: grid;
    grid-template-columns: 72px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
}

.giveaway-admin-item.is-active {
    border-color: rgba(55,211,154,.22);
}

.giveaway-admin-thumb {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,.055);
}

.giveaway-admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.giveaway-admin-thumb span {
    font-size: 28px;
}

.giveaway-admin-item-copy {
    min-width: 0;
}

.giveaway-admin-item-copy h3 {
    margin: 7px 0 3px;
    font-size: 15px;
}

.giveaway-admin-item-copy p,
.giveaway-admin-item-copy small {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.giveaway-participants-list {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
}

.giveaway-participant {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
}

.giveaway-participant > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg,#eef3ff,#9eb4ff 58%,#83dfff);
    color: #101522;
    font-weight: 900;
}

.giveaway-participant div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.giveaway-participant b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giveaway-participant small,
.muted-copy {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1280px) {
    .giveaway-admin-layout {
        grid-template-columns: 1fr;
    }

    .giveaway-admin-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 780px) {
    .giveaway-admin-side,
    .giveaway-upload-row {
        grid-template-columns: 1fr;
    }

    .giveaway-admin-item {
        grid-template-columns: 62px minmax(0,1fr);
    }

    .giveaway-admin-item > .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .giveaway-admin-thumb {
        width: 62px;
        height: 62px;
    }
}

/* ==========================================================
   V6 · ADMIN POLISH / STOCK WORKBENCH
   ========================================================== */

.table-inner { overflow: auto; }
.products-table {
    width: 100%;
    min-width: 1280px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}
.products-table .col-id { width: 62px; }
.products-table .col-product { width: 260px; }
.products-table .col-category { width: 145px; }
.products-table .col-branch { width: 260px; }
.products-table .col-price { width: 115px; }
.products-table .col-stock { width: 220px; }
.products-table .col-status { width: 150px; }
.products-table .col-actions { width: 285px; }
.products-table th,
.products-table td {
    vertical-align: middle;
    overflow: hidden;
}
.products-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #101828;
    box-shadow: 0 1px 0 rgba(255,255,255,.08);
    white-space: nowrap;
}
.products-table tbody tr { transition: background .16s ease, transform .16s ease; }
.products-table tbody tr:hover { background: rgba(255,255,255,.035); }
.product-id-cell,
.product-price-cell { white-space: nowrap; }
.table-product {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr);
    gap: 11px;
    align-items: center;
    min-width: 0;
}
.table-product-media {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg,rgba(255,255,255,.08),rgba(120,113,255,.08));
    border: 1px solid rgba(255,255,255,.08);
}
.table-product-media img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 94% !important;
    max-height: 94% !important;
    object-fit: contain !important;
}
.table-product > div:last-child { min-width: 0; }
.table-product b,
.table-product small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.table-product small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.stock-editor {
    display: grid;
    grid-template-columns: 38px minmax(72px,1fr) 38px;
    align-items: center;
    gap: 7px;
    width: 100%;
}
.stock-editor button {
    width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px;
    background: rgba(255,255,255,.06); color: #fff; font-size: 21px; font-weight: 900; cursor: pointer;
    transition: background .15s ease, transform .12s ease, border-color .15s ease;
}
.stock-editor button:hover:not(:disabled) { background: rgba(104,133,255,.2); border-color: rgba(127,153,255,.42); }
.stock-editor button:active:not(:disabled) { transform: scale(.92); }
.stock-editor button:disabled { opacity:.3; cursor:not-allowed; }
.stock-editor > div { min-width:0; text-align:center; }
.stock-editor b { display:block; font-size:15px; }
.stock-editor small { display:block; margin-top:2px; color:var(--muted); font-size:9px; line-height:1.25; }
.compact-actions { display:flex; flex-wrap:wrap; gap:6px; }
.compact-actions .btn { min-height: 34px; padding: 8px 10px; font-size: 10px; border-radius: 11px; }

/* Product image editors and inquiry thumbnails preserve the complete source image. */
.upload-preview img,
.inquiry-product-media img {
    width: auto !important;
    height: auto !important;
    max-width: 96% !important;
    max-height: 96% !important;
    object-fit: contain !important;
}

/* Clear switch cards: the whole control changes state, not just a tiny checkbox. */
.check-row { align-items: stretch; }
.check.toggle-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 17px;
    background: rgba(255,255,255,.035);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .14s ease;
}
.check.toggle-card:hover { border-color: rgba(133,156,255,.3); }
.check.toggle-card:active { transform: scale(.985); }
.check.toggle-card input {
    appearance: none;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.09);
    position: relative;
    transition: .18s ease;
}
.check.toggle-card input::after {
    content:"";
    position:absolute;
    width:18px; height:18px;
    top:2px; left:2px;
    border-radius:50%;
    background:#cfd5e5;
    box-shadow:0 2px 8px rgba(0,0,0,.25);
    transition:transform .18s ease, background .18s ease;
}
.check.toggle-card:has(input:checked) {
    background: linear-gradient(135deg,rgba(33,198,137,.18),rgba(47,134,255,.10));
    border-color: rgba(55,211,154,.42);
    box-shadow: inset 0 0 0 1px rgba(55,211,154,.06), 0 10px 28px rgba(16,130,95,.08);
}
.check.toggle-card input:checked {
    background:#32d497;
    border-color:#32d497;
}
.check.toggle-card input:checked::after { transform:translateX(18px); background:#071912; }
.check.toggle-card span { min-width:0; }
.check.toggle-card b,
.check.toggle-card small { display:block; }
.check.toggle-card small { margin-top:4px; color:var(--muted); line-height:1.35; }

/* Users */
.users-toolbar { display:flex; gap:10px; align-items:end; margin-bottom:14px; }
.users-toolbar .field { flex:1; margin:0; }
.user-cell { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:10px; }
.user-avatar-small { width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-weight:900;background:linear-gradient(145deg,#eef2ff,#aebeff 56%,#74dfff);color:#101522; }
.user-cell b,.user-cell small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-cell small{color:var(--muted);margin-top:2px;font-size:10px}

/* Inquiry customer comment */
.inquiry-comment-admin {
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(127,153,255,.16);
    background: rgba(96,110,255,.075);
}
.inquiry-comment-admin small { display:block;color:#a9b2ca;font-size:9px;font-weight:900;letter-spacing:.12em; }
.inquiry-comment-admin p { margin:5px 0 0;line-height:1.45;font-size:12px;white-space:pre-wrap; }

/* Giveaway draw workbench */
.giveaway-draw-panel {
    padding: 16px;
    border-radius: 19px;
    border: 1px solid rgba(118,146,255,.18);
    background: linear-gradient(145deg,rgba(76,91,173,.11),rgba(31,186,139,.07));
}
.giveaway-draw-panel h3 { margin: 5px 0 4px; }
.giveaway-draw-panel p { margin:0;color:var(--muted);font-size:11px;line-height:1.45; }
.giveaway-draw-winners { display:grid;gap:6px;margin:12px 0; }
.giveaway-draw-winner { display:flex;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.06); }
.btn-draw {
    width:100%;
    min-height:48px;
    background: linear-gradient(135deg,#82a8ff,#78f0cf) !important;
    color:#0b1320 !important;
    border-color:transparent !important;
    font-weight:950;
    box-shadow:0 12px 28px rgba(76,133,255,.18);
}
.btn-draw:hover { filter:brightness(1.06); transform:translateY(-1px); }
.btn-draw:active { transform:scale(.98); filter:brightness(.94); }

/* All important buttons visibly react. */
.btn { transition: transform .12s ease, filter .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: scale(.965); filter: brightness(.92); }
.btn-primary { box-shadow:0 9px 24px rgba(94,133,255,.15); }
.btn-danger { box-shadow:0 8px 22px rgba(240,77,100,.08); }

@media (max-width: 760px) {
    .users-toolbar { align-items:stretch; flex-direction:column; }
    .products-table { min-width: 1100px; }
    .table-product { grid-template-columns:48px minmax(0,1fr); }
    .table-product-media { width:48px;height:48px; }
}

@media (prefers-reduced-motion: reduce) {
    .btn,.stock-editor button,.check.toggle-card,.products-table tbody tr { transition:none !important; }
}

/* V6 selector aliases used by admin.js */
.users-search-row { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:9px; align-items:center; }
.users-search-row input { min-height:44px; }
.admin-user-cell { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:10px; min-width:0; }
.admin-user-cell > span { width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-weight:950;background:linear-gradient(145deg,#eef2ff,#aebeff 56%,#74dfff);color:#101522; }
.admin-user-cell > div { min-width:0; }
.admin-user-cell b,.admin-user-cell small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-user-cell small{margin-top:3px;color:var(--muted);font-size:10px}
.draw-winner-list { display:grid; gap:7px; margin:12px 0; }
.draw-winner-list > div { display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;padding:10px;border-radius:13px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.065); }
.draw-winner-list > div > span { width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#7ce4bd;color:#081711;font-weight:950; }
.draw-winner-list p { margin:0;min-width:0 }.draw-winner-list b,.draw-winner-list small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-winner-list small{color:var(--muted);margin-top:2px;font-size:10px}
.giveaway-condition-toggles { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px; }
@media(max-width:900px){.giveaway-condition-toggles{grid-template-columns:1fr}.users-search-row{grid-template-columns:1fr 1fr}.users-search-row input{grid-column:1/-1}}
.inquiry-comment {
    padding:11px 12px;border-radius:14px;border:1px solid rgba(127,153,255,.16);background:rgba(96,110,255,.075)
}
.inquiry-comment small{display:block;color:#a9b2ca;font-size:9px;font-weight:900;letter-spacing:.12em}.inquiry-comment p{margin:5px 0 0;line-height:1.45;font-size:12px;white-space:pre-wrap}
.btn-primary:active:not(:disabled) { background:#74e8c2 !important;color:#071611 !important;border-color:#74e8c2 !important; }
.btn-secondary:active:not(:disabled) { background:#91a9ff !important;color:#0a1020 !important;border-color:#91a9ff !important; }
.btn-danger:active:not(:disabled) { background:#ff6278 !important;color:#fff !important;border-color:#ff6278 !important; }

/* ==========================================================
   V6.1 — ADMIN DARK PALETTE / DENSITY POLISH
   ========================================================== */
:root {
    --bg-0: #070b12;
    --bg-1: #0c121e;
    --bg-2: #111a29;
    --bg-3: #172235;
    --panel: rgba(14, 22, 35, .86);
    --panel-strong: rgba(12, 19, 31, .96);
    --panel-soft: rgba(255, 255, 255, .045);
    --line: rgba(139, 158, 190, .13);
    --line-strong: rgba(151, 170, 204, .22);
    --text: #f6f8fc;
    --muted: rgba(211, 220, 236, .72);
    --muted-2: rgba(193, 205, 226, .50);
    --accent: #8972ff;
    --accent-2: #57d7ff;
    --success: #38d6a1;
    --warning: #f6b75f;
    --danger: #ff747f;
    --shadow: 0 20px 60px rgba(0, 0, 0, .38);
}

html, body {
    background:
        radial-gradient(circle at 8% -8%, rgba(115, 87, 255, .16), transparent 30%),
        radial-gradient(circle at 100% 25%, rgba(58, 201, 220, .09), transparent 27%),
        linear-gradient(180deg, #070b12 0%, #0a101a 48%, #070b12 100%);
}

.sidebar {
    background: linear-gradient(180deg, rgba(10, 16, 27, .98), rgba(7, 11, 18, .98));
    border-color: rgba(137, 158, 191, .12);
}

.topbar,
.panel,
.table-wrap,
.form-card,
.metric-card {
    border-color: var(--line);
}

.table tbody tr {
    transition: background .16s ease, transform .16s ease;
}
.table tbody tr:hover {
    background: rgba(121, 102, 255, .055);
}

.table-product-media {
    background: linear-gradient(145deg, #0b121d, #111d2c);
    border: 1px solid rgba(137, 158, 190, .12);
}
.table-product-media img {
    object-fit: contain !important;
    background: transparent;
}

input,
select,
textarea,
.field input,
.field select,
.field textarea {
    background: rgba(14, 23, 37, .88);
    border-color: rgba(137, 158, 190, .16);
    color: #f4f7fb;
}

input:focus,
select:focus,
textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(137, 114, 255, .72);
    box-shadow: 0 0 0 3px rgba(120, 91, 255, .12);
}

.btn-primary {
    background: linear-gradient(145deg, #927cff, #6f54f1);
    color: #fff;
    border-color: rgba(177, 160, 255, .36);
    box-shadow: 0 10px 26px rgba(91, 64, 220, .22);
}

.btn-primary:hover { filter: brightness(1.06); }

.stock-editor {
    background: rgba(10, 17, 28, .62);
    border-color: rgba(138, 159, 192, .13);
}

/* ==========================================================
   V6.3 — line image / custom image selector
   ========================================================== */
.image-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.image-mode-card {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    min-height: 82px;
    padding: 13px 14px;
    border: 1px solid rgba(35, 45, 72, .12);
    border-radius: 18px;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: .18s ease;
}
.image-mode-card input { margin-top: 3px; accent-color: #7257ff; }
.image-mode-card span { min-width: 0; }
.image-mode-card b, .image-mode-card small { display: block; }
.image-mode-card b { font-size: 12px; }
.image-mode-card small { margin-top: 5px; color: #7b8498; font-size: 10px; line-height: 1.35; }
.image-mode-card.selected {
    border-color: rgba(111, 82, 255, .48);
    background: linear-gradient(145deg, rgba(113,82,255,.12), rgba(52,215,178,.06));
    box-shadow: 0 0 0 3px rgba(113,82,255,.07);
}
.product-upload-only[hidden], #productStrengthField[hidden] { display:none !important; }
.table-product-media, .tile-media { position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) {
    .image-mode-card { background: rgba(255,255,255,.035); border-color: rgba(139,156,188,.14); }
    .image-mode-card small { color:#9ba8bd; }
    .image-mode-card.selected { background: linear-gradient(145deg, rgba(113,82,255,.16), rgba(52,215,178,.07)); }
}
@media(max-width:680px){ .image-mode-grid{grid-template-columns:1fr;} }
html[data-tg-scheme="dark"] .image-mode-card {
    background: rgba(255,255,255,.035);
    border-color: rgba(139,156,188,.14);
}
html[data-tg-scheme="dark"] .image-mode-card small { color:#9ba8bd; }
html[data-tg-scheme="dark"] .image-mode-card.selected {
    background: linear-gradient(145deg, rgba(113,82,255,.17), rgba(52,215,178,.07));
    border-color: rgba(132,105,255,.52);
}

/* ==========================================================
   V6.4 — Bulk Product Manager
   ========================================================== */
.bulk-manager {
    gap: 14px;
}
.bulk-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}
.bulk-hero > div:first-child { max-width: 850px; }
.bulk-settings-panel,
.bulk-source-panel,
.bulk-preview-panel {
    overflow: hidden;
}
.bulk-settings-panel .section-head {
    align-items: center;
}
.bulk-line-image {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 7px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.3;
    border: 1px solid rgba(137, 158, 190, .14);
    background: linear-gradient(145deg, rgba(14,23,37,.92), rgba(20,31,48,.92));
}
.bulk-line-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}
.bulk-settings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bulk-active-toggle {
    min-height: 74px;
    align-self: end;
}
.bulk-source {
    width: 100%;
    min-height: 260px;
    resize: vertical;
    border-radius: 20px !important;
    padding: 16px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.65;
    font-size: 12px;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 100% 28px,
        rgba(12, 20, 33, .94) !important;
}
.bulk-import-row {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 13px;
}
.bulk-format-hint {
    min-height: 68px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(137, 158, 190, .11);
    background: rgba(255,255,255,.025);
}
.bulk-format-hint b,
.bulk-format-hint span { display: block; }
.bulk-format-hint b { font-size: 10px; }
.bulk-format-hint span { margin-top: 4px; font-size: 9px; line-height: 1.4; color: var(--muted); }
.bulk-prepare-btn { min-height: 48px; }
.bulk-preview-head { align-items: center; }
.bulk-summary { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.bulk-preview-table-wrap {
    overflow: auto;
    border: 1px solid rgba(137, 158, 190, .10);
    border-radius: 18px;
    background: rgba(8, 14, 24, .32);
}
.bulk-preview-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
}
.bulk-preview-table th,
.bulk-preview-table td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(137, 158, 190, .085);
    vertical-align: middle;
    text-align: left;
}
.bulk-preview-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(12, 20, 33, .98);
    color: #9da9bc;
    font-size: 8px;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.bulk-preview-table th:nth-child(1) { width: 44px; }
.bulk-preview-table th:nth-child(2) { width: 145px; }
.bulk-preview-table th:nth-child(3) { width: 205px; }
.bulk-preview-table th:nth-child(4) { width: 145px; }
.bulk-preview-table th:nth-child(5) { width: 95px; }
.bulk-preview-table th:nth-child(6) { width: 120px; }
.bulk-preview-table th:nth-child(7) { width: 90px; }
.bulk-preview-table th:nth-child(8) { width: 250px; }
.bulk-preview-table th:nth-child(9) { width: 46px; }
.bulk-preview-table td > input {
    width: 100%;
    min-height: 38px;
    border-radius: 11px;
    padding: 7px 9px;
    font-size: 10px;
}
.bulk-row-message {
    display: block;
    margin-top: 5px;
    max-width: 135px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.25;
}
.bulk-description {
    display: block;
    color: #aab5c6;
    font-size: 9px;
    line-height: 1.35;
}
.bulk-row-conflict { background: rgba(255, 84, 112, .035); }
.bulk-row-update { background: rgba(255, 185, 74, .025); }
.bulk-remove {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 104, 126, .18);
    background: rgba(255, 75, 104, .08);
    color: #ff8295;
    font-size: 17px;
    cursor: pointer;
    transition: .16s ease;
}
.bulk-remove:hover { background: rgba(255, 75, 104, .18); transform: scale(1.04); }
.bulk-final-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 13px;
    padding: 13px 14px;
    border: 1px solid rgba(137, 158, 190, .11);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(118,91,255,.06), rgba(58,217,186,.035));
    font-size: 10px;
    color: #c2cbd9;
}
.bulk-final-bar small { color: var(--muted); }
.bulk-create-btn { min-width: 210px; min-height: 46px; }
.bulk-result-success {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 13px;
    padding: 15px;
    border: 1px solid rgba(61, 224, 165, .25);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(52, 214, 158, .11), rgba(112, 86, 255, .045));
}
.bulk-result-success small { color: #69e3b7; letter-spacing: .14em; font-size: 8px; font-weight: 900; }
.bulk-result-success h3 { margin: 3px 0 4px; }
.bulk-result-success p { margin: 0; color: #aeb9c9; font-size: 10px; }

@media(max-width: 1180px) {
    .bulk-settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bulk-import-row { grid-template-columns: 1fr 1fr; }
    .bulk-prepare-btn { grid-column: 1 / -1; }
}
@media(max-width: 760px) {
    .bulk-hero { align-items: stretch; flex-direction: column; }
    .bulk-hero .btn-row { width: 100%; }
    .bulk-hero .btn { flex: 1; }
    .bulk-settings-panel .section-head { align-items: flex-start; }
    .bulk-line-image { width: 72px; height: 72px; border-radius: 16px; }
    .bulk-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bulk-source { min-height: 220px; }
    .bulk-import-row { grid-template-columns: 1fr; }
    .bulk-prepare-btn { grid-column: auto; width: 100%; }
    .bulk-preview-head { align-items: flex-start; }
    .bulk-summary { justify-content: flex-start; }
    .bulk-final-bar, .bulk-result-success { align-items: stretch; flex-direction: column; }
    .bulk-final-bar .btn-row { width: 100%; }
    .bulk-final-bar .btn { flex: 1; }
    .bulk-create-btn { min-width: 0; }
}
@media(max-width: 520px) {
    .bulk-settings-grid { grid-template-columns: 1fr; }
    .bulk-line-image { display: none; }
    .bulk-source { font-size: 11px; padding: 13px !important; }
}
.bulk-strength-presets {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 7px;
}
.bulk-strength-presets button {
    border: 1px solid rgba(134, 153, 187, .14);
    background: rgba(255,255,255,.035);
    color: #bac4d5;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 8px;
    font-weight: 850;
    cursor: pointer;
    transition: .15s ease;
}
.bulk-strength-presets button:hover {
    border-color: rgba(137, 112, 255, .5);
    background: rgba(119, 91, 255, .10);
    color: #fff;
}
