/* ============================================
   Spice House B2B Portal — Дизайн-система по ТЗ
   ============================================ */

:root {
    /* Цвета по ТЗ */
    --color-bg: #F9F6F0;
    --color-bg-alt: #F0EDE5;
    --color-text: #3A3A3A;
    --color-text-muted: #6B6B6B;
    --color-text-light: #999;
    --color-accent: #C25E2C;
    --color-accent-hover: #A64E24;
    --color-accent-light: #F5E6DF;
    --color-secondary: #5B7553;
    --color-secondary-hover: #4A6043;
    --color-secondary-light: #E8EFE5;
    --color-border: #E0DCD0;
    --color-border-focus: #C25E2C;
    --color-error: #C0392B;
    --color-error-bg: #FDEDEC;
    --color-error-border: #E8B4B4;
    --color-success: #27AE60;
    --color-success-bg: #E8F8F0;
    --color-success-border: #A3D9B8;
    --color-white: #FFFFFF;

    /* Тени */
    --shadow-sm: 0 1px 2px rgba(58,58,58,0.05);
    --shadow-md: 0 4px 12px rgba(58,58,58,0.08);
    --shadow-lg: 0 8px 24px rgba(58,58,58,0.1);

    /* Радиусы */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Переходы */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1E1E1E;
        --color-bg-alt: #282828;
        --color-text: #F0EDE5;
        --color-text-muted: #B0B0B0;
        --color-text-light: #888;
        --color-border: #3A3A3A;
        --color-white: #2A2A2A;
    }
}

/* ============ Сброс и базовые ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ============ Утилиты ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.leading-tight { line-height: 1.25; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-10 { margin-top: 2.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-xl); }
.border-t { border-top: 1px solid var(--color-border); }
.hover\:shadow-md:hover { box-shadow: var(--shadow-md); }
.transition-transform { transition: transform var(--transition-normal); }
.transition-shadow { transition: box-shadow var(--transition-normal); }
.duration-300 { transition-duration: 300ms; }
.object-cover { object-fit: cover; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.not-italic { font-style: normal; }
.underline { text-decoration: underline; }
.min-h-screen { min-height: 100vh; }
.text-base { font-size: 1rem; line-height: 1.5; }
.text-left { text-align: left; }
.gap-1 { gap: 0.25rem; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.group { }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-full { height: 100%; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.hover-text-accent:hover { color: var(--color-accent) !important; }

/* Адаптив */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:hidden { display: none; }
    .sm\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .sm\:p-12 { padding: 3rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .sm\:gap-4 { gap: 1rem; }
    .sm\:text-2xl { font-size: 1.5rem; }
    .sm\:text-3xl { font-size: 1.875rem; }
    .sm\:text-4xl { font-size: 2.25rem; }
    .sm\:w-auto { width: auto; }
}
@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:grid { display: grid; }
    .lg\:text-left { text-align: left; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    .lg\:w-1\/2 { width: 50%; }
    .lg\:p-16 { padding: 4rem; }
    .lg\:mx-0 { margin-left: 0; margin-right: 0; }
    .lg\:text-5xl { font-size: 3rem; }
    .lg\:justify-start { justify-content: flex-start; }
}

/* ============ Компоненты ============ */

/* Кнопки */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
}
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn-outline:hover { background: var(--color-bg-alt); color: var(--color-text); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--color-text);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn-ghost:hover { background: var(--color-bg-alt); color: var(--color-text); }

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--color-error);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
}
.btn-danger:hover { background: #A93226; color: #fff; }

/* Карточки */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}
.card-hover:hover { box-shadow: var(--shadow-md); }

/* Формы */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}
.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-light);
}
.form-input::placeholder { color: var(--color-text-light); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition-fast);
}
.form-select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent-light); }

/* Алерты */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}
.alert-error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: var(--color-error);
}
.alert-success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: var(--color-success);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: 24rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.2s ease-out;
}
.toast-success { background: var(--color-success); color: #fff; }
@keyframes slideIn {
    from { transform: translateY(1rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* ============ Админка ============ */

/* Таблицы */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--color-bg); }
.admin-table .cell-id { font-family: monospace; font-size: 0.75rem; color: var(--color-text-light); }
.admin-table .cell-name { font-weight: 500; }
.admin-table .cell-muted { color: var(--color-text-muted); font-size: 0.8125rem; }
.admin-table .cell-actions { text-align: right; white-space: nowrap; }

/* Статусы */
.status { display: inline-block; padding: 0.2rem 0.625rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 500; }
.status-new { background: #FEF3C7; color: #92400E; }
.status-processed { background: var(--color-success-bg); color: var(--color-success); }
.status-deleted { background: var(--color-bg-alt); color: var(--color-text-light); }

/* Типы заявок */
.type-badge { display: inline-block; padding: 0.2rem 0.625rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 500; }
.type-callback { background: #FEF3C7; color: #92400E; }
.type-inquiry { background: #DBEAFE; color: #1E40AF; }
.type-contact { background: var(--color-bg-alt); color: var(--color-text-muted); }

/* Фильтры */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.filter-link {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.filter-link:hover { background: var(--color-bg-alt); color: var(--color-text); }
.filter-link.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.filter-link.active-emerald { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.filter-link.active-blue { background: #2563EB; color: #fff; border-color: #2563EB; }

/* Карточка деталей */
.detail-row { display: flex; align-items: baseline; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 0.8125rem; color: var(--color-text-muted); }
.detail-value { font-size: 0.875rem; font-weight: 500; color: var(--color-text); text-align: right; max-width: 60%; word-break: break-word; }

/* Поиск */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-bar .form-input { flex: 1; }

/* Кнопки小型 */
.btn-sm {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
}
.btn-sm:hover { background: var(--color-bg-alt); }
.btn-sm.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-sm-emerald { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn-sm-emerald:hover { background: #047857; }
.btn-sm-red { color: var(--color-error); border-color: var(--color-error-border); }
.btn-sm-red:hover { background: var(--color-error-bg); }

/* Пустое состояние */
.empty-state { padding: 3rem; text-align: center; color: var(--color-text-muted); }

/* ============ Django-style Admin ============ */

/* Layout */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: #1E1E1E;
    color: #ccc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.admin-sidebar-brand {
    padding: 1.25rem 1rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-sidebar-brand svg { flex-shrink: 0; }
.admin-sidebar-section {
    padding: 0.75rem 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #777;
    padding-left: 1rem;
}
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #bbb;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    border-left: 3px solid transparent;
}
.admin-sidebar-link:hover { background: #2a2a2a; color: #fff; }
.admin-sidebar-link.active { background: #2a2a2a; color: #fff; border-left-color: var(--color-accent); }
.admin-sidebar-link .sidebar-count {
    margin-left: auto;
    background: #333;
    color: #999;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
}
.admin-sidebar-link.active .sidebar-count { background: var(--color-accent); color: #fff; }
.admin-sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 1rem;
    border-top: 1px solid #333;
}
.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #999;
    text-decoration: none;
    padding: 0.375rem 0;
}
.admin-sidebar-footer a:hover { color: #fff; }

/* Content */
.admin-content {
    flex: 1;
    margin-left: 240px;
    background: var(--color-bg);
    min-height: 100vh;
}
.admin-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}
.admin-content-header h1 { font-size: 1.125rem; font-weight: 700; }
.admin-content-body { padding: 1.5rem 2rem; }

/* Action bar */
.action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.action-bar label { display: flex; align-items: center; gap: 0.375rem; color: var(--color-text-muted); cursor: pointer; }
.action-bar input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-accent); }
.action-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--color-text);
    background: var(--color-white);
}
.action-btn {
    padding: 0.375rem 0.875rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.action-btn:hover { background: var(--color-accent-hover); }
.action-count { color: var(--color-text-muted); font-size: 0.8125rem; margin-left: 0.25rem; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--color-text);
    background: var(--color-white);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.page-link:hover { background: var(--color-bg-alt); color: var(--color-text); }
.page-link.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }
.page-info { font-size: 0.8125rem; color: var(--color-text-muted); margin: 0 0.5rem; }

/* Fieldsets */
.fieldset {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.fieldset-title {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.fieldset-body { padding: 1rem; }
.fieldset-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.field-help {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* Checkbox in table */
.admin-table .cell-check { width: 40px; text-align: center; }
.admin-table .cell-check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-accent); cursor: pointer; }
.admin-table th.cell-check { text-align: center; }

/* Mobile */
@media (max-width: 768px) {
    .admin-sidebar { width: 56px; }
    .admin-sidebar-brand span,
    .admin-sidebar-link span:not(.sidebar-count),
    .admin-sidebar-section,
    .admin-sidebar-footer span { display: none; }
    .admin-sidebar-brand { justify-content: center; padding: 1rem 0.5rem; }
    .admin-sidebar-link { justify-content: center; padding: 0.625rem 0; border-left: none; }
    .admin-sidebar-link.active { border-left: none; border-bottom: 2px solid var(--color-accent); }
    .admin-content { margin-left: 56px; }
    .admin-content-body { padding: 1rem; }
    .fieldset-row { grid-template-columns: 1fr; }
    .action-bar { flex-wrap: wrap; }
}

/* Header responsive nav */
.desktop-nav { display: flex; }
.mobile-nav { display: none; }
@media (max-width: 640px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: flex; flex-wrap: wrap; }
}
