/*
 * Shopidy base stylesheet.
 *
 * Hand-written CSS shared by the admin panel and the storefront.
 * Uses Yekan Bakh FaNum and the Shopidy Sky Blue palette (#00a7ff).
 */

@import url('/fonts/yekan-bakh/yekan-bakh.css');

:root {
    --font-sans: 'Yekan Bakh FaNum', 'Yekan Bakh', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --font-mono: 'Yekan Bakh FaNum', ui-monospace, SFMono-Regular, Menlo, monospace;

    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --surface-elevated: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #64748b;
    --border: #e2e8f0;

    --primary-50: #eaf7ff;
    --primary-100: #d0efff;
    --primary-200: #a8e2ff;
    --primary-300: #6fd0ff;
    --primary-400: #2cb7ff;
    --primary-500: #00a7ff;
    --primary-600: #008ae0;
    --primary-700: #006eb8;
    --primary-800: #005c96;
    --primary-900: #054c7a;
    --primary-950: #032f4f;

    --primary: var(--primary-500);
    --primary-soft: var(--primary-50);
    --primary-contrast: #ffffff;

    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --success: #10b981;
    --success-soft: #d1fae5;
    --info: #0284c7;
    --info-soft: #e0f2fe;

    --radius-xl: 18px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

    --topbar-height: 64px;
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 76px;
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark,
body.dark,
[data-theme='dark'] {
    --bg: #030712;
    --surface: #0b0f19;
    --surface-2: #111827;
    --surface-elevated: #1e293b;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --muted: #94a3b8;
    --border: #1e293b;

    --primary-soft: rgba(0, 167, 255, 0.15);
    --danger-soft: rgba(239, 68, 68, 0.15);
    --warning-soft: rgba(245, 158, 11, 0.15);
    --success-soft: rgba(16, 185, 129, 0.15);
    --info-soft: rgba(2, 132, 199, 0.15);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    transition-property: color, background-color, border-color, outline-color,
        text-decoration-color, fill, stroke, box-shadow;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Touch & Tap Interaction Normalization */
html,
body,
*,
*::before,
*::after,
a,
button,
input,
select,
textarea,
label,
summary,
[role="button"],
[role="tab"],
[tabindex],
.btn {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

html,
body,
a,
button,
input,
select,
textarea,
label,
summary,
[role="button"],
[role="tab"],
[tabindex],
.btn {
    touch-action: manipulation;
}

button,
[role="button"],
[role="tab"],
label,
summary,
.btn,
.badge,
.tab {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

label:focus,
label:active,
label:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

label::selection,
button::selection,
.btn::selection {
    background: transparent !important;
    color: inherit !important;
}

input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

*:focus:not(:focus-visible),
*::before:focus:not(:focus-visible),
*::after:focus:not(:focus-visible) {
    outline: none !important;
    outline-style: none !important;
    box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        transition-duration: 1ms !important;
    }
}

html {
    -webkit-text-size-adjust: 100%;
    font-feature-settings: 'ss01' 1, 'locl' 1;
    font-variant-numeric: tabular-nums;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5rem;
    font-weight: 700;
    line-height: 1.5;
}

p {
    margin: 0 0 .75rem;
}

a {
    color: var(--primary-600);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

::selection {
    background-color: rgba(0, 167, 255, 0.25);
    color: inherit;
}

html.dark ::selection,
[data-theme='dark'] ::selection {
    background-color: rgba(44, 183, 255, 0.35);
    color: inherit;
}

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
    line-height: 1.6;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
    background: var(--surface-2);
    text-decoration: none;
}

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

.btn--primary {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-contrast);
}

.btn--primary:hover {
    background: var(--primary-600);
}

.btn--danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.btn--danger:hover {
    background: #b91c1c;
}

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

.btn--ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn--sm {
    padding: .25rem .6rem;
    font-size: .8rem;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    padding: .35rem .5rem;
    min-width: 2.25rem;
}

/* ------------------------------------------------------------------ forms */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .875rem;
    font-weight: 500;
}

.form-label .required {
    color: var(--danger);
}

.form-control,
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='number'],
input[type='search'],
select,
textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: none;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.form-hint {
    margin-top: .25rem;
    color: var(--muted);
    font-size: .8rem;
}

.form-error {
    margin: .25rem 0 0;
    color: var(--danger);
    font-size: .8rem;
}

.form-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.form-switch input {
    width: 2.5rem;
    height: 1.35rem;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: background var(--transition);
}

.form-switch input::after {
    content: '';
    position: absolute;
    inset-inline-start: 2px;
    top: 50%;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transform: translateY(-50%);
    transition: inset-inline-start var(--transition);
}

.form-switch input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-switch input:checked::after {
    inset-inline-start: calc(100% - 1.1rem);
    background: #fff;
}

/* ------------------------------------------------------------------- card */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card__title {
    margin: 0;
    font-size: 1.05rem;
}

/* ------------------------------------------------------------------ table */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table th,
.table td {
    padding: .65rem .75rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--surface-2);
}

/* ----------------------------------------------------------------- badges */

.badge {
    display: inline-block;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.9;
}

.badge--success { background: var(--success-soft); color: var(--success); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--info { background: var(--info-soft); color: var(--info); }

/* ------------------------------------------------------------------ toast */

.toast-stack {
    position: fixed;
    inset-inline-start: 1rem;
    bottom: 1rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: min(22rem, calc(100vw - 2rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--info);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: .875rem;
}

.toast--success { border-inline-start-color: var(--success); }
.toast--error { border-inline-start-color: var(--danger); }
.toast--warning { border-inline-start-color: var(--warning); }
.toast--info { border-inline-start-color: var(--info); }

.toast__message {
    flex: 1;
}

.toast__close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

/* ------------------------------------------------------------------ modal */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 20, 26, .55);
    backdrop-filter: blur(2px);
}

.modal {
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal--sm { max-width: 24rem; }
.modal--lg { max-width: 46rem; }
.modal--xl { max-width: 64rem; }

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal__title {
    margin: 0;
    font-size: 1rem;
}

.modal__close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.modal__body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal__message {
    margin: 0;
}

.modal__footer {
    display: flex;
    justify-content: flex-start;
    gap: .5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* ------------------------------------------------------------- Devigner / Solar Icons */

svg.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform var(--transition), color var(--transition);
}

svg.icon path[opacity] {
    opacity: 0.35;
}

/* ----------------------------------------------------------- Theme Switcher */

.theme-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.125rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
    direction: ltr;
}

html.dark .theme-switcher,
[data-theme='dark'] .theme-switcher {
    border-color: rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.theme-switcher__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 2;
}

.theme-switcher__pill {
    pointer-events: none;
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    z-index: 0;
    border-radius: 0.5rem;
    background: #00a7ff;
    box-shadow: 0 1px 3px rgba(0, 167, 255, 0.35);
    transition: transform 320ms cubic-bezier(0.34, 1.25, 0.64, 1),
                width 320ms cubic-bezier(0.34, 1.25, 0.64, 1),
                opacity 150ms ease;
    opacity: 0;
}

html.dark .theme-switcher__pill,
[data-theme='dark'] .theme-switcher__pill {
    background: #00a7ff;
    box-shadow: 0 1px 4px rgba(0, 167, 255, 0.45);
}

.theme-switcher__btn,
.theme-btn {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 200ms ease;
    padding: 0;
    line-height: 1;
}

html.dark .theme-switcher__btn,
[data-theme='dark'] .theme-switcher__btn {
    color: #94a3b8;
}

.theme-switcher__btn:hover,
.theme-btn:hover {
    color: #1e293b;
}

html.dark .theme-switcher__btn:hover,
[data-theme='dark'] .theme-switcher__btn:hover {
    color: #f1f5f9;
}

.theme-switcher__btn.is-active,
.theme-btn.is-active {
    color: #ffffff !important;
}

.theme-switcher__btn.is-active svg,
.theme-btn.is-active svg {
    color: #ffffff !important;
}

/* --------------------------------------------------------------- auth pages */

.auth-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bg);
    overflow: hidden;
}

.auth-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

html.dark .auth-canvas,
[data-theme='dark'] .auth-canvas {
    opacity: 0.35;
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

/* Aurora ambient glowing halos */
.bg-halo-orbit-1,
.bg-halo-orbit-2,
.bg-halo-orbit-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.bg-halo-orbit-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 167, 255, 0.28) 0%, rgba(0, 167, 255, 0) 70%);
    top: -10%;
    inset-inline-start: 15%;
    animation: halo-float-1 18s ease-in-out infinite alternate;
}

.bg-halo-orbit-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.24) 0%, rgba(14, 165, 233, 0) 70%);
    bottom: -10%;
    inset-inline-end: 15%;
    animation: halo-float-2 22s ease-in-out infinite alternate;
}

.bg-halo-orbit-3 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
    top: 45%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    animation: halo-float-3 26s ease-in-out infinite alternate;
}

html.dark .bg-halo-orbit-1,
[data-theme='dark'] .bg-halo-orbit-1 {
    background: radial-gradient(circle, rgba(0, 167, 255, 0.22) 0%, rgba(0, 167, 255, 0) 70%);
}

html.dark .bg-halo-orbit-2,
[data-theme='dark'] .bg-halo-orbit-2 {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0) 70%);
}

@keyframes halo-float-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, -20px) scale(0.95); }
}

@keyframes halo-float-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-35px, -40px) scale(1.12); }
    100% { transform: translate(25px, 20px) scale(0.92); }
}

@keyframes halo-float-3 {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-45%, -55%) scale(1.15); }
    100% { transform: translate(-55%, -45%) scale(0.9); }
}

.auth-card {
    position: relative;
    width: 100%;
    padding: 2.25rem 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html.dark .auth-card,
[data-theme='dark'] .auth-card {
    background: rgba(11, 15, 25, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-card__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-card__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-card__subtitle {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
}

.auth-card__footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
    color: var(--primary-contrast);
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(0, 167, 255, 0.25);
}

/* Floating toast error badge */
.floating-toast {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    font-size: .85rem;
    animation: toast-slide-up 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .floating-toast,
[data-theme='dark'] .floating-toast {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-prefix {
    position: absolute;
    inset-inline-start: .75rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    font-size: .875rem;
    pointer-events: none;
    z-index: 2;
}

.auth-prefix-code {
    font-weight: 600;
    font-family: var(--font-mono);
}

.auth-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.auth-input {
    padding-inline-start: 3.5rem !important;
}

.auth-input-suffix-btn {
    position: absolute;
    inset-inline-end: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: .25rem;
    border-radius: var(--radius-xs);
    z-index: 2;
}

.auth-input-suffix-btn:hover {
    color: var(--text);
}

.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: .75rem 0 1.25rem;
}

.auth-submit-btn {
    height: 2.75rem;
    font-size: .95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(0, 167, 255, 0.3);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 167, 255, 0.4);
}

.form-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-secondary);
}

.form-switch input[type='checkbox'] {
    width: 2.2rem;
    height: 1.25rem;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 9999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.form-switch input[type='checkbox']::after {
    content: '';
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: calc(1.25rem - 6px);
    height: calc(1.25rem - 6px);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.form-switch input[type='checkbox']:checked {
    background: var(--primary);
    border-color: var(--primary);
}

html[dir='rtl'] .form-switch input[type='checkbox']:checked::after {
    transform: translateX(calc(-2.2rem + 1.25rem - 2px));
}

html[dir='ltr'] .form-switch input[type='checkbox']:checked::after {
    transform: translateX(calc(2.2rem - 1.25rem + 2px));
}

@keyframes toast-slide-up {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ------------------------------------------------------------------ utils */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.muted { color: var(--muted); }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; align-items: center; gap: .5rem; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

/* -------------------------------------------------------------- pagination */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pagination__info {
    color: var(--muted);
    font-size: .875rem;
    flex: 1;
    text-align: center;
}

/* -------------------------------------------------------------- filters */

.filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
}

.filter-bar .form-group {
    min-width: 11rem;
    flex: 1 1 11rem;
}

.filter-bar__actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.tree-indent {
    display: inline-block;
}

.thumb-sm {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.color-dot {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.badge--muted {
    background: var(--surface-2);
    color: var(--muted);
}

.repeat-row {
    display: grid;
    gap: .5rem;
    align-items: end;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    margin-bottom: .75rem;
}

.repeat-row__fields {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.repeat-row__remove {
    justify-self: end;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
}

[x-cloak] {
    display: none !important;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.error-page__inner {
    max-width: 32rem;
    text-align: center;
}

.error-page__code {
    font-size: clamp(4rem, 16vw, 8rem);
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.error-page__title {
    margin-top: .5rem;
    font-size: 1.5rem;
}

.error-page__message {
    margin: 1rem 0 1.5rem;
    color: var(--muted);
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}
