/* Zonify Admin Panel v2 — stylesheet
 * Design tokens:
 *   primary:     #0d9488 (teal)  / dark variant #0f766e
 *   sidebar:     #2a303d
 *   canvas:      #f9f9ff
 *   card:        #ffffff
 *   section:     #f1f3ff
 *   fonts:       Manrope (headline) + Inter (body)
 *   radius:      0.5rem (8px) default, full for pills
 * Philosophy: no 1px divider lines, tonal surface shifts instead.
 */

:root {
    --coral:          #0d9488;
    --coral-dark:     #0f766e;
    --coral-soft:     #ccfbf1;

    --canvas:         #f9f9ff;
    --section:        #f1f3ff;
    --card:           #ffffff;
    --card-hover:     #f5f7ff;

    --sidebar:        #2a303d;
    --sidebar-muted:  #3a4150;
    --sidebar-text:   #e8ecf5;
    --sidebar-text-dim: #8b94a8;

    --text:           #161c27;
    --text-muted:     #594f56;
    --text-dim:       #8b8390;

    --success:        #16a34a;
    --success-soft:   #dcfce7;
    --warning:        #f59e0b;
    --warning-soft:   #fef3c7;
    --danger:         #dc2626;
    --danger-soft:    #fee2e2;
    --info:           #2563eb;
    --info-soft:      #dbeafe;

    --radius:         0.5rem;
    --radius-lg:      0.75rem;
    --radius-xl:      1rem;
    --radius-full:    9999px;

    --shadow-sm:      0 1px 2px rgba(22, 28, 39, 0.04);
    --shadow-md:      0 4px 12px rgba(22, 28, 39, 0.06);
    --shadow-lg:      0 32px 64px -16px rgba(22, 28, 39, 0.18);

    --sidebar-width:  240px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ─── Sidebar ──────────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 28px 18px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding: 0 8px;
}

.sidebar-logo-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    display: grid; place-items: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 162, 242, 0.4);
}

.sidebar-brand-name {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.sidebar-brand-sub {
    font-size: 11px;
    color: var(--sidebar-text-dim);
    letter-spacing: 0.02em;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text-dim);
    padding: 0 12px 8px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius);
    color: var(--sidebar-text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
    position: relative;
}
.sidebar-nav-item:hover {
    background: var(--sidebar-muted);
    color: var(--sidebar-text);
}
.sidebar-nav-item.is-active {
    background: rgba(0, 162, 242, 0.12);
    color: #fff;
}
.sidebar-nav-item.is-active::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 10px; bottom: 10px;
    width: 3px;
    background: var(--coral);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    margin-top: 24px;
}
.sidebar-admin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--sidebar-muted);
    margin-bottom: 8px;
}
.sidebar-admin-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    display: grid; place-items: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 15px;
}
.sidebar-admin-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.sidebar-admin-role {
    font-size: 11px;
    color: var(--sidebar-text-dim);
}
.sidebar-signout-form { margin: 0; }
.sidebar-signout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    border-radius: var(--radius);
    color: var(--sidebar-text-dim);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidebar-signout-btn:hover {
    background: var(--sidebar-muted);
    color: #fff;
}

/* ─── Main area ────────────────────────────────────────────────── */

.main {
    margin-left: var(--sidebar-width);
    padding: 36px 48px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 28px;
}
.breadcrumb {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.page-title {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.page-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}

/* ─── Stats row ────────────────────────────────────────────────── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
}
.stat-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.stat-value {
    font-family: 'Manrope', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.stat-sub strong { color: var(--text); font-weight: 600; }

/* ─── Filter row ───────────────────────────────────────────────── */

.filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.search-field {
    flex: 1;
    min-width: 280px;
    position: relative;
}
.search-field .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}
.search-field input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: var(--radius);
    background: var(--card);
    border: 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: box-shadow 0.15s;
}
.search-field input:focus {
    outline: 0;
    box-shadow: 0 0 0 2px var(--coral);
}
.filter-select {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--card);
    border: 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.filter-select:focus {
    outline: 0;
    box-shadow: 0 0 0 2px var(--coral);
}

/* ─── Buttons ──────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 0;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    line-height: 1.2;
}
.btn-primary {
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 162, 242, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 162, 242, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: var(--card);
    color: var(--text);
}
.btn-secondary:hover { background: var(--card-hover); }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: var(--section); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ─── Users table ──────────────────────────────────────────────── */

.users-table-wrap {
    background: var(--card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 20px;
}
.users-table {
    width: 100%;
    border-collapse: collapse;
}
.users-table thead {
    background: var(--section);
}
.users-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.users-table td {
    padding: 14px 20px;
    vertical-align: middle;
    font-size: 13px;
}
.users-table tbody tr {
    transition: background 0.15s;
}
.users-table tbody tr:hover {
    background: var(--card-hover);
}
.users-table tbody tr + tr td {
    box-shadow: inset 0 1px 0 var(--section);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--section);
    display: grid; place-items: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--coral-dark);
    flex-shrink: 0;
}
.user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 2px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-meta {
    font-size: 12px;
    color: var(--text-dim);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-id { color: var(--text-muted); font-weight: 500; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.pf-shopify { background: #e3fcef; color: #047857; }
.pf-woo     { background: #ede9fe; color: #5b21b6; }
.pf-jump    { background: var(--section); color: var(--text-muted); }
.pf-bigc    { background: #ccfbf1; color: #0f766e; }
.pf-wix     { background: #dbeafe; color: #1d4ed8; }
.pf-other   { background: var(--section); color: var(--text-muted); }

/* Editorify plan enum: 0=Editorify, 1=Free, 2=Gold, 3=Diamond */
.pill-plan-0 { background: var(--coral-soft); color: var(--coral-dark); } /* Editorify blue */
.pill-plan-1 { background: var(--section);    color: var(--text-muted); } /* Free gray */
.pill-plan-2 { background: var(--warning-soft); color: #92400e; }         /* Gold amber */
.pill-plan-3 { background: #ede9fe; color: #5b21b6; }                     /* Diamond purple */

.pill-status-active    { background: var(--success-soft); color: #166534; }
.pill-status-pending   { background: var(--warning-soft); color: #92400e; }
.pill-status-inactive  { background: var(--section); color: var(--text-muted); }
.pill-status-cancelled { background: var(--danger-soft); color: var(--danger); }
.pill-status-none      { background: var(--section); color: var(--text-dim); }

.col-actions { text-align: right; white-space: nowrap; }

.row-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0, 162, 242, 0.25);
}
.row-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 162, 242, 0.35);
}
.row-action svg { flex-shrink: 0; }

/* Impersonation handoff interstitial */
.handoff-card { text-align: center; }
.handoff-card .auth-brand { justify-content: center; }
.handoff-spinner {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 28px 0 20px;
}
.handoff-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--coral);
    opacity: 0.3;
    animation: handoff-pulse 1.2s ease-in-out infinite;
}
.handoff-dot:nth-child(2) { animation-delay: 0.2s; }
.handoff-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes handoff-pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
    40%           { opacity: 1;   transform: scale(1.2); }
}
.handoff-note {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin: 0;
}
.handoff-note a { color: var(--coral-dark); font-weight: 500; }
.handoff-note a:hover { color: var(--coral); }

/* Sidebar impersonation indicator — compact, only shows when a
   customer is currently impersonated (cookies are set). */
.sidebar-impersonation {
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(0, 162, 242, 0.12);
    color: var(--sidebar-text);
    margin-bottom: 10px;
    border-left: 3px solid var(--coral);
}
.sidebar-impersonation-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--coral);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.sidebar-impersonation-label { line-height: 1; }
.sidebar-impersonation-store {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    font-family: 'Manrope', sans-serif;
}
.sidebar-impersonation form { margin: 0; }
.sidebar-impersonation-clear {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text-dim);
    border: 0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.sidebar-impersonation-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.row-action-form { margin: 0; display: inline-block; }
.row-action-form .row-action { border: 0; cursor: pointer; font-family: inherit; }

.actions-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.row-action-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: var(--radius);
    background: var(--section);
    color: var(--text-muted);
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.row-action-edit:hover {
    background: var(--coral-soft);
    color: var(--coral-dark);
    transform: translateY(-1px);
}

/* ─── Alpine.js x-cloak ─────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ─── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 28, 39, 0.55);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 9999;
}
.modal {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}
.modal-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.modal-title {
    font-family: 'Manrope', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--section);
    color: var(--text-muted);
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover {
    background: var(--danger-soft);
    color: var(--danger);
}
.modal-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 8px 0 20px 0;
}
.modal-sub strong {
    color: var(--text);
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
}
.modal-sub-id { color: var(--text-dim); font-size: 12px; }
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}
.modal-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--section);
    border: 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23594f56' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.modal-select:focus {
    outline: 0;
    box-shadow: 0 0 0 2px var(--coral);
    background-color: var(--card);
}
.modal-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.modal-error {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.modal-actions .btn { min-width: 100px; justify-content: center; }

/* ─── Wix store info section inside the edit modal ─────────────── */
.store-info-section {
    margin-top: -8px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--section);
    border-radius: var(--radius);
}
.store-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.store-info-header svg { color: #1d4ed8; }

.store-info-state {
    padding: 10px 0;
    font-size: 12px;
    color: var(--text-muted);
}
.store-info-state-error {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--danger);
    font-weight: 500;
}
.store-info-retry {
    padding: 6px 12px;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.store-info-retry:hover { background: var(--card-hover); }

.store-info-loading {
    display: flex;
    align-items: center;
    gap: 6px;
}
.store-info-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--coral);
    opacity: 0.3;
    animation: handoff-pulse 1.2s ease-in-out infinite;
}
.store-info-dot:nth-child(2) { animation-delay: 0.2s; }
.store-info-dot:nth-child(3) { animation-delay: 0.4s; }
.store-info-loading-label {
    margin-left: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.store-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.store-info-item-wide { grid-column: 1 / -1; }
.store-info-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 2px;
}
.store-info-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}
.store-info-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.imports-cell { display: flex; gap: 6px; }
.import-chip {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    background: var(--section);
    color: var(--text-dim);
    letter-spacing: 0.02em;
}
.import-chip.is-on {
    background: var(--coral-soft);
    color: var(--coral-dark);
}

.ts-rel { color: var(--text-muted); font-size: 12px; }

.users-table-empty {
    padding: 60px 20px !important;
    text-align: center;
}
.empty-state { color: var(--text-muted); }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-sub   { font-size: 13px; }

/* ─── Pagination ───────────────────────────────────────────────── */

.pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-info strong { color: var(--text); }
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}
.page-btn {
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s;
}
.page-btn:hover { background: var(--card-hover); }
.page-btn.is-disabled { color: var(--text-dim); cursor: not-allowed; background: transparent; }
.page-indicator { font-size: 13px; color: var(--text-muted); padding: 0 8px; }

/* ─── Auth pages (login, code, error) ──────────────────────────── */

.chromeless {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--canvas);
}
.auth-page {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.auth-brand-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    display: grid; place-items: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 162, 242, 0.35);
}
.auth-brand-name {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 18px;
}
.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.auth-title.error-title { color: var(--danger); }
.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 28px 0;
}
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input {
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--section);
    border: 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: box-shadow 0.15s, background 0.15s;
}
.field input:focus {
    outline: 0;
    background: var(--card);
    box-shadow: 0 0 0 2px var(--coral);
}
.field-code {
    font-family: 'Manrope', sans-serif;
    font-size: 24px !important;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
    padding-left: 24px !important;
}
.auth-footer {
    margin-top: 28px;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-footer-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}
.auth-footer-link { color: var(--coral-dark); font-weight: 500; }
.auth-footer-link:hover { color: var(--coral); }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
}
.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
}

/* ─── Responsive niceties ──────────────────────────────────────── */

@media (max-width: 1024px) {
    .main { margin-left: 0; padding: 24px; }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 16px 20px;
    }
    .sidebar-brand { margin-bottom: 0; margin-right: auto; }
    .sidebar-nav { display: flex; gap: 4px; }
    .sidebar-nav-section { display: none; }
    .sidebar-nav-item { padding: 8px 14px; margin: 0; }
    .sidebar-nav-item.is-active::before { display: none; }
    .sidebar-footer { margin-top: 0; }
    .sidebar-admin-card { display: none; }
    .stats-row { grid-template-columns: 1fr; }
    .page-title { font-size: 28px; }
}
