@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --app-primary: #4f46e5;
    --app-primary-light: #818cf8;
    --app-primary-dark: #3730a3;
    --app-primary-rgb: 79, 70, 229;
    --app-primary-soft: rgba(79, 70, 229, 0.1);
    --app-primary-glow: rgba(79, 70, 229, 0.25);
    --app-brand-gradient: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #7c3aed 100%);
    --app-brand-gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.04) 100%);
    --app-sidebar: #0b1220;
    --app-sidebar-hover: #151b2e;
    --app-sidebar-muted: #9ca3af;
    --app-sidebar-active: rgba(79, 70, 229, 0.18);
    --app-background: #f4f5fb;
    --app-card: #ffffff;
    --app-border: #e5e7eb;
    --app-text: #111827;
    --app-muted: #6b7280;
    --app-danger: #dc2626;
    --app-warning: #d97706;
    --app-success: #16a34a;
    --app-info: #0284c7;
    --app-radius: 0.625rem;
    --app-radius-lg: 0.875rem;
    --app-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    --app-shadow-brand: 0 4px 14px rgba(79, 70, 229, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
    --app-shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(79, 70, 229, 0.08);
    --app-sidebar-width: 260px;
    --app-sidebar-collapsed-width: 72px;
    --app-topbar-height: 64px;
    --brand-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --brand-duration: 0.35s;
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-hover-color: #4338ca;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-focus-ring-color: rgba(79, 70, 229, 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

body.admin-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--app-background);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.07), transparent),
        radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.04), transparent 50%);
    color: var(--app-text);
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    min-width: 0;
}

/* Sidebar — Indigo Harbor */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--app-sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: #0b1220;
    color: #fff;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 9rem;
    background: radial-gradient(ellipse at top, rgba(79, 70, 229, 0.22), transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.admin-sidebar > * {
    position: relative;
    z-index: 1;
}

.admin-sidebar.collapsed {
    width: var(--app-sidebar-collapsed-width);
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    min-height: var(--app-topbar-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}

.admin-sidebar-brand:hover {
    color: #fff;
}

.admin-sidebar-brand .brand-logo-full {
    height: 36px;
    width: auto;
    max-width: 210px;
    max-height: 36px;
    display: block;
    flex: 1 1 auto;
}

.admin-sidebar-brand .brand-icon {
    display: none;
    width: 38px;
    height: 38px;
    background: transparent;
    border-radius: 0.6rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
    animation: brandIconPulse 3s ease-in-out infinite;
}

.admin-sidebar-brand .brand-icon img {
    width: 38px;
    height: 38px;
    max-width: none;
    display: block;
}

.admin-sidebar.collapsed .admin-sidebar-brand {
    justify-content: center;
    padding: 0.9rem 0.65rem;
}

.admin-sidebar.collapsed .brand-logo-full {
    display: none;
}

.admin-sidebar.collapsed .admin-sidebar-brand .brand-icon {
    display: flex;
}

@keyframes brandIconPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(129, 140, 248, 0.6); }
}

.admin-sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.2;
}

.admin-sidebar-search {
    flex-shrink: 0;
    padding: 0.85rem 0.85rem 0.35rem;
}

.admin-sidebar-search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-sidebar-search-field > .bi-search {
    position: absolute;
    left: 0.7rem;
    color: #94a3b8;
    font-size: 0.8125rem;
    pointer-events: none;
    z-index: 1;
}

.admin-body .admin-sidebar-search-field .form-control,
.admin-sidebar-search-field .form-control {
    height: 2.35rem;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.55rem;
    color: #e5e7eb !important;
    padding-left: 2rem;
    padding-right: 3.35rem;
    font-size: 0.8125rem;
    box-shadow: none !important;
    transform: none !important;
}

.admin-sidebar-search-field .form-control::placeholder {
    color: #94a3b8;
}

.admin-body .admin-sidebar-search-field .form-control:hover:not(:focus):not(:disabled),
.admin-body .admin-sidebar-search-field .form-control:focus,
.admin-sidebar-search-field .form-control:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(129, 140, 248, 0.45) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
    transform: none !important;
}

.admin-sidebar-search-kbd {
    position: absolute;
    right: 0.45rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.3rem;
    padding: 0.12rem 0.32rem;
    pointer-events: none;
}

.admin-sidebar-search-empty {
    margin: 0.5rem 0.25rem 0;
    font-size: 0.75rem;
    color: var(--app-sidebar-muted);
}

.admin-nav-item.nav-search-hidden,
.admin-nav-sub > li.nav-search-hidden {
    display: none !important;
}

.admin-sidebar.collapsed .admin-sidebar-search {
    display: none;
}

.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.55rem 0 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.admin-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-section-label {
    padding: 0.75rem 1.25rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-sidebar-muted);
    white-space: nowrap;
}

.admin-sidebar.collapsed .nav-section-label,
.admin-sidebar.collapsed .brand-logo-full,
.admin-sidebar.collapsed .nav-link-text,
.admin-sidebar.collapsed .nav-chevron {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.admin-nav,
.admin-nav-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.9rem;
    margin: 0.15rem 0.7rem;
    border-radius: 0.6rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    border: 0;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav-link.active {
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 52%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.38);
}

.admin-nav-link.active .nav-link-icon,
.admin-nav-link.active .nav-chevron {
    color: #fff;
}

.admin-nav-link .nav-link-icon {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
}

/* Parent items that open a sub-list */
.admin-nav-toggle {
    width: calc(100% - 1.4rem);
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.admin-nav-toggle.active-parent:not(.active) {
    color: #e5e7eb;
    background: rgba(79, 70, 229, 0.14);
}

.admin-nav-toggle.active-parent:not(.active) .nav-link-icon {
    color: #a5b4fc;
}

.nav-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.admin-nav-item.open > .admin-nav-toggle .nav-chevron {
    transform: rotate(180deg);
}

/* Sub-lists animate open using a max-height transition */
.admin-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.admin-nav-item.open > .admin-nav-sub {
    max-height: 30rem;
}

.admin-nav-sublink {
    display: block;
    position: relative;
    padding: 0.45rem 0.9rem 0.45rem 2.85rem;
    margin: 0.08rem 0.7rem;
    border-radius: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.admin-nav-sublink::before {
    content: '';
    position: absolute;
    left: 1.55rem;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
}

.admin-nav-sublink:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-nav-sublink.active {
    background: rgba(79, 70, 229, 0.28);
    color: #fff;
}

.admin-nav-sublink.active::before {
    background: #a5b4fc;
    opacity: 1;
}

.admin-sidebar-footer {
    flex-shrink: 0;
    padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-collapse {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.55rem;
    color: #cbd5e1;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.admin-sidebar.collapsed .admin-sidebar-collapse {
    padding: 0.55rem 0;
}

.admin-sidebar.collapsed .admin-sidebar-footer {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

/* Collapsed rail shows icons only, so sub-lists stay hidden */
.admin-sidebar.collapsed .admin-nav-sub {
    display: none;
}

.admin-sidebar.collapsed .admin-nav-link {
    justify-content: center;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: var(--app-sidebar-width);
    min-width: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

.admin-sidebar.collapsed ~ .admin-main,
body.sidebar-collapsed .admin-main {
    margin-left: var(--app-sidebar-collapsed-width);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--app-card);
    border-bottom: 1px solid var(--app-border);
    min-height: var(--app-topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-wrap: nowrap;
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.admin-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--app-border);
    background: var(--app-card);
    color: var(--app-muted);
    font-size: 0.8125rem;
}

/* Cards & stats */
.admin-card {
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

/* Order item product mapping autocomplete (ported to body to escape table overflow) */
.order-product-results-floating {
    position: fixed;
    z-index: 2000;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    padding: 1.15rem 1.2rem;
    box-shadow: var(--app-shadow);
    transition: transform 0.25s var(--brand-ease), box-shadow 0.25s var(--brand-ease), border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--stat-accent, var(--app-primary));
    opacity: 0.9;
}

.stat-card-link:hover,
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--app-shadow-hover);
    border-color: rgba(var(--app-primary-rgb), 0.2);
    color: inherit;
}

.stat-card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: var(--stat-icon-bg, var(--app-primary-soft));
    color: var(--stat-accent, var(--app-primary));
    transition: transform 0.25s var(--brand-ease);
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.08) rotate(-3deg);
}

.stat-card-meta {
    min-width: 0;
    text-align: right;
}

.stat-card-value {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--app-text);
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--app-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.stat-card-cta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--stat-accent, var(--app-primary));
    opacity: 0.85;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.stat-card-link:hover .stat-card-cta {
    opacity: 1;
}

.stat-card-link:hover .stat-card-cta i {
    transform: translateX(3px);
    display: inline-block;
    transition: transform 0.2s var(--brand-ease);
}

.stat-card--green { --stat-accent: #4f46e5; --stat-icon-bg: rgba(79, 70, 229, 0.12); }
.stat-card--indigo { --stat-accent: #4f46e5; --stat-icon-bg: rgba(79, 70, 229, 0.12); }
.stat-card--amber { --stat-accent: #d97706; --stat-icon-bg: rgba(217, 119, 6, 0.12); }
.stat-card--rose { --stat-accent: #e11d48; --stat-icon-bg: rgba(225, 29, 72, 0.12); }
.stat-card--sky { --stat-accent: #0284c7; --stat-icon-bg: rgba(2, 132, 199, 0.12); }
.stat-card--slate { --stat-accent: #64748b; --stat-icon-bg: rgba(100, 116, 139, 0.12); }

/* Fulfillment dashboard */
.fulfillment-pipeline-bar {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.06);
    gap: 2px;
}

.fulfillment-pipeline-seg {
    height: 100%;
    min-width: 4px;
    transition: width 0.2s ease;
}

.fulfillment-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}

a:hover .fulfillment-stage-card {
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.08);
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--app-text);
    margin: 0;
}

.page-header-subtitle {
    color: var(--app-muted);
    font-size: 0.9375rem;
    margin: 0.25rem 0 0;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.status-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge-success { background: #dcfce7; color: #166534; }
.status-badge-warning { background: #fef3c7; color: #92400e; }
.status-badge-danger { background: #fee2e2; color: #991b1b; }
.status-badge-info { background: #e0f2fe; color: #075985; }
.status-badge-secondary { background: #f3f4f6; color: #374151; }
.status-badge-primary { background: #eef2ff; color: var(--app-primary-dark); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--app-background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--app-muted);
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--app-muted);
    max-width: 400px;
    margin: 0 auto 1.25rem;
    font-size: 0.9375rem;
}

/* Filter bar */
.filter-bar {
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Tables */
.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    background: var(--app-background);
    border-bottom: 1px solid var(--app-border);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-muted);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--app-border);
    font-size: 0.875rem;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* Forms */
.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.btn-outline-primary {
    color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-outline-primary:hover {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--app-primary-rgb), 0.15);
}

.form-label.required::after {
    content: ' *';
    color: var(--app-danger);
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: admin-spin 0.6s linear infinite;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

/* Image preview card */
.image-preview-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
    background: var(--app-card);
}

.image-preview-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--app-background);
}

.image-preview-card-body {
    padding: 0.75rem;
}

/* Product grid */
.product-grid-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
    background: var(--app-card);
    transition: box-shadow 0.15s;
}

.product-grid-card:hover {
    box-shadow: var(--app-shadow);
}

.product-grid-card .product-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    background: var(--app-background);
}

/* Auth layout */
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--app-background);
}

.auth-wrapper .btn-primary {
    background: var(--app-brand-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.auth-wrapper .btn-primary:hover,
.auth-wrapper .btn-primary:focus {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #3730a3 100%);
    border: none;
}

.auth-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #0b1220 0%, #312e81 48%, #4f46e5 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -8rem;
    top: -6rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.45), transparent 70%);
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-brand-logo {
    width: 56px;
    height: 56px;
    background: transparent;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
}

.auth-brand-logo img {
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.auth-brand-tagline {
    font-size: 1.0625rem;
    opacity: 0.85;
    line-height: 1.6;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--app-background);
    max-width: 560px;
}

.auth-form-card {
    width: 100%;
    max-width: 420px;
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.08), var(--app-shadow);
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-form-subtitle {
    color: var(--app-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* Registration wizard progress */
.auth-wizard-steps {
    font-size: 0.8125rem;
}

.auth-wizard-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--app-border, #e5e7eb);
    color: var(--app-muted, #6b7280);
    font-weight: 600;
    flex-shrink: 0;
}

.auth-wizard-steps .is-current .auth-wizard-bullet,
.auth-wizard-steps .is-complete .auth-wizard-bullet {
    background: var(--app-primary, #4f46e5);
    color: #fff;
}

.auth-wizard-steps .is-current .auth-wizard-label {
    color: var(--app-primary, #4f46e5);
    font-weight: 600;
}

.auth-wizard-label {
    color: var(--app-muted, #6b7280);
    white-space: nowrap;
}

.auth-wizard-divider {
    height: 1px;
    background: var(--app-border, #e5e7eb);
    min-width: 1.5rem;
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--app-muted);
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.password-toggle-wrap .form-control {
    padding-right: 2.5rem;
}

/* Store switcher */
.store-switcher-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: 0.5rem;
    background: var(--app-card);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 220px;
}

.store-switcher-btn .store-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Breadcrumb */
.admin-breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.admin-breadcrumb .breadcrumb-item a {
    color: var(--app-muted);
    text-decoration: none;
}

.admin-breadcrumb .breadcrumb-item.active {
    color: var(--app-text);
}

/* Flash messages */
.flash-messages .alert {
    border-radius: var(--app-radius);
    border: none;
    box-shadow: var(--app-shadow);
}

/* Sidebar overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

/* Responsive */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: min(var(--app-sidebar-width), 86vw);
        box-shadow: 12px 0 40px rgba(11, 18, 32, 0.35);
    }

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

    .admin-main {
        margin-left: 0 !important;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .auth-wrapper {
        flex-direction: column;
    }

    .auth-brand-panel {
        display: flex;
        flex: 0 0 auto;
        padding: 1.5rem 1.25rem 1.25rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .auth-brand-panel::after {
        width: 14rem;
        height: 14rem;
        top: -4rem;
        right: -3rem;
    }

    .auth-brand-logo {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .auth-brand-title {
        font-size: 1.35rem;
        margin-bottom: 0.35rem;
    }

    .auth-brand-tagline,
    .auth-brand-panel .list-unstyled {
        display: none;
    }

    .auth-form-panel {
        max-width: none;
        padding: 1.25rem;
        align-items: flex-start;
    }

    .auth-form-card {
        padding: 1.5rem 1.25rem;
        box-shadow: none;
        border: none;
        background: transparent;
        max-width: none;
    }

    .admin-topbar {
        padding: 0 0.85rem;
        gap: 0.5rem;
    }

    .admin-content,
    .admin-footer {
        padding: 1rem;
    }

    .admin-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .admin-nav-link,
    .admin-nav-sublink {
        min-height: 44px;
    }

    .dash-hero {
        padding: 1.25rem;
    }

    .dash-hero-title {
        font-size: 1.35rem;
    }

    .page-header-title {
        font-size: 1.25rem;
    }

    .store-switcher-btn {
        max-width: 9.5rem;
        padding: 0.3rem 0.55rem;
    }

    .dash-actions-grid {
        grid-template-columns: 1fr;
    }

    .dash-panel-head {
        flex-direction: column;
        gap: 0.35rem;
    }
}

@media (min-width: 992px) {
    .auth-form-panel {
        min-width: 480px;
    }
}

/* ------------------------------------------------------------------ Product hunting */

.hunt-page {
    max-width: 1100px;
}

.hunt-hero {
    position: relative;
    overflow: hidden;
    border: none;
    background: var(--app-brand-gradient);
    color: #fff;
    box-shadow: var(--app-shadow-brand);
}

.hunt-hero-glow {
    position: absolute;
    inset: auto -20% -60% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
    pointer-events: none;
}

.hunt-hero-body {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
}

.hunt-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 0.4rem;
}

.hunt-kicker-dark {
    color: var(--app-primary);
    opacity: 1;
    background: var(--app-primary-soft);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.hunt-hero-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.hunt-hero-text {
    margin: 0;
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.hunt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hunt-panel {
    background: var(--app-card);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow);
    overflow: hidden;
}

.hunt-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem 0.25rem;
}

.hunt-panel-body {
    padding: 1rem 1.35rem 1.35rem;
}

.hunt-panel-title {
    font-size: 1rem;
    font-weight: 650;
    margin: 0 0 0.15rem;
    color: var(--app-text);
}

.hunt-panel-sub {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--app-muted);
    line-height: 1.4;
}

.hunt-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    flex: 0 0 auto;
    border-radius: 0.55rem;
    background: var(--app-brand-gradient);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.hunt-step-sm {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.75rem;
}

.hunt-select {
    border-radius: 0.75rem;
}

.hunt-empty-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    background: var(--app-brand-gradient-subtle);
    color: var(--app-muted);
    font-size: 0.875rem;
}

.hunt-keyword-field {
    position: relative;
}

.hunt-keyword-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-muted);
    font-size: 1.05rem;
    pointer-events: none;
}

.hunt-keyword-input {
    padding-left: 2.75rem !important;
    border-radius: 0.85rem !important;
    border: 1.5px solid var(--app-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hunt-keyword-input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 4px var(--app-primary-glow);
}

.hunt-source-pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    background: #f8fafc;
}

.hunt-source-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
}

.hunt-source-dot.is-live {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.hunt-source-dot.is-local {
    background: #64748b;
}

.hunt-preset {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    padding: 1rem 1rem 1rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: 0.9rem;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.18s var(--brand-ease), box-shadow 0.18s var(--brand-ease), transform 0.18s var(--brand-ease), background-color 0.18s ease;
}

.hunt-preset:hover {
    border-color: var(--app-primary);
    background: var(--app-primary-soft);
    transform: translateY(-1px);
}

.hunt-preset .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hunt-preset:has(.form-check-input:checked) {
    border-color: var(--app-primary);
    background: rgba(79, 70, 229, 0.07);
    box-shadow: 0 0 0 1px var(--app-primary), var(--app-shadow-brand);
}

.hunt-preset-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 1rem;
}

.hunt-preset:has(.form-check-input:checked) .hunt-preset-icon {
    background: var(--app-primary);
    color: #fff;
}

.hunt-preset-title {
    display: block;
    font-weight: 650;
    font-size: 0.9375rem;
    margin-bottom: 0.2rem;
}

.hunt-preset-text {
    display: block;
    font-size: 0.8rem;
    color: var(--app-muted);
    line-height: 1.4;
}

.hunt-advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.35rem;
    border: 0;
    background: transparent;
    text-align: left;
}

.hunt-advanced-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hunt-advanced-chevron {
    margin-left: auto;
    color: var(--app-muted);
    transition: transform 0.2s ease;
}

.hunt-advanced-toggle[aria-expanded="true"] .hunt-advanced-chevron {
    transform: rotate(180deg);
}

.hunt-divider {
    height: 1px;
    background: var(--app-border);
    margin: 0.5rem 0 1.25rem;
}

.hunt-actions-bar {
    position: sticky;
    bottom: 0.75rem;
    z-index: 20;
    margin-top: 0.25rem;
}

.hunt-actions-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.hunt-search-btn {
    min-width: 10rem;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.hunt-actions-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--app-muted);
}

.hunt-actions-hint i {
    color: var(--app-warning);
}

/* Results page — compact review workspace */

.hr-page {
    max-width: 1180px;
}

.hr-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.hr-top-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.hr-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    border: 1px solid var(--app-border);
    background: #fff;
    color: var(--app-text);
    text-decoration: none;
    flex: 0 0 auto;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hr-back:hover {
    background: var(--app-primary-soft);
    border-color: rgba(79, 70, 229, 0.3);
    color: var(--app-primary);
}

.hr-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.hr-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.hr-pill {
    display: inline-flex;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hr-query {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--app-text);
    font-weight: 500;
}

.hr-note {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--app-primary);
    font-weight: 500;
}

.hr-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hr-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.hr-tab {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid var(--app-border);
    background: #fff;
    text-decoration: none;
    color: var(--app-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hr-tab strong {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.hr-tab span {
    font-size: 0.75rem;
    color: var(--app-muted);
    font-weight: 500;
}

.hr-tab:hover {
    border-color: rgba(79, 70, 229, 0.35);
    background: #fafafe;
}

.hr-tab.is-active {
    border-color: var(--app-primary);
    background: var(--app-primary-soft);
    box-shadow: 0 0 0 1px var(--app-primary);
}

.hr-tab-pending.is-active { border-color: #d97706; box-shadow: 0 0 0 1px #d97706; background: rgba(217, 119, 6, 0.08); }
.hr-tab-selected.is-active { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a; background: rgba(22, 163, 74, 0.08); }
.hr-tab-rejected.is-active { border-color: #dc2626; box-shadow: 0 0 0 1px #dc2626; background: rgba(220, 38, 38, 0.08); }

.hr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 0.9rem;
}

.hr-search {
    position: relative;
    flex: 1 1 220px;
    min-width: 180px;
}

.hr-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-muted);
    font-size: 0.9rem;
}

.hr-search input {
    width: 100%;
    border: 1px solid var(--app-border);
    border-radius: 0.65rem;
    padding: 0.5rem 0.75rem 0.5rem 2.15rem;
    background: #f8fafc;
    font-size: 0.875rem;
}

.hr-search input:focus {
    outline: none;
    border-color: var(--app-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--app-primary-glow);
}

.hr-select {
    width: auto;
    min-width: 7.5rem;
    border-radius: 0.65rem;
}

.hr-per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--app-muted);
    white-space: nowrap;
}

.hr-per-page .form-select {
    width: auto;
    min-width: 4.5rem;
    border-radius: 0.65rem;
}

.hr-source {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.35rem;
    background: #111827;
    color: #fff;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
}

.hr-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 1.15rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 0.9rem;
}

.hr-footer-count {
    font-size: 0.875rem;
    color: var(--app-muted);
}

.hr-footer-count strong {
    color: var(--app-text);
}

.hr-footer-per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.hr-footer-per-page .form-select {
    width: auto;
    min-width: 4.75rem;
}

.hr-pager {
    margin-left: auto;
    margin-top: 0;
}

.hr-pager .pagination {
    margin-bottom: 0;
}

.hr-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    position: sticky;
    top: 0.4rem;
    z-index: 20;
}

.hr-bulk-select {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--app-muted);
    cursor: pointer;
}

.hr-bulk-select em {
    font-style: normal;
    font-weight: 600;
    color: var(--app-text);
}

.hr-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

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

.hr-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s var(--brand-ease), box-shadow 0.2s var(--brand-ease);
}

.hr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.hr-card-rejected {
    opacity: 0.72;
}

.hr-card-selected {
    border-color: rgba(22, 163, 74, 0.28);
}

.hr-card-media {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 100%);
}

.hr-card-media img {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
    transition: transform 0.3s var(--brand-ease);
}

.hr-card:hover .hr-card-media img {
    transform: scale(1.05);
}

.hr-card-ph {
    color: #94a3b8;
    font-size: 1.75rem;
}

.hr-card-check {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    margin: 0;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.45rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.hr-card-check input {
    margin: 0;
}

.hr-score {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.hr-score-good { background: #16a34a; }
.hr-score-mid { background: #d97706; }
.hr-score-low { background: #dc2626; }

.hr-status {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 650;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.hr-status-pending { color: #b45309; }
.hr-status-selected { color: #15803d; }
.hr-status-rejected { color: #b91c1c; }

.hr-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.95rem 1rem 1rem;
}

.hr-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.hr-brand {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.hr-catalog {
    font-size: 0.68rem;
    font-weight: 650;
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.hr-card-title {
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0 0 0.7rem;
    color: var(--app-text);
    min-height: 2.5rem;
}

.hr-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.hr-price {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--app-text);
}

.hr-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 0.75rem;
    color: var(--app-muted);
}

.hr-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.hr-stats .bi-star-fill {
    color: #f59e0b;
}

.hr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

.hr-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    font-weight: 650;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.hr-chip.is-pass {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.hr-chip.is-fail {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.hr-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hr-action-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 600;
    border-radius: 0.7rem;
    padding: 0.55rem 0.75rem;
}

.hr-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hr-action-row .btn {
    border-radius: 0.6rem;
}

.hr-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border: 1px dashed var(--app-border);
    border-radius: 1rem;
}

.hr-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 1.4rem;
}

.hr-empty h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.hr-empty p {
    color: var(--app-muted);
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
}

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

@media (max-width: 767.98px) {
    .hunt-hero-body {
        padding: 1.15rem;
    }

    .hunt-actions-hint {
        margin-left: 0;
        width: 100%;
    }

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

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

    .hr-title {
        font-size: 1.15rem;
    }

    .hr-pager {
        margin-left: 0;
        width: 100%;
    }

    .hr-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .hr-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-per-page {
        width: 100%;
        justify-content: space-between;
    }
}

/* Legacy result class kept for older markup */
.hunt-result {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.hunt-result:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hunt-result-muted {
    opacity: 0.62;
}

.hunt-result-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    background: #f8fafc;
    border-bottom: 1px solid var(--app-border, #e5e7eb);
}

.hunt-result-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hunt-result-check {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #fff;
    border-radius: 0.375rem;
    padding: 0.125rem 0.375rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.hunt-result-score {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    min-width: 2rem;
}

.hunt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.hunt-chip-pass {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.hunt-chip-fail {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* Numbered markers for the two-step fetch-then-generate flow. */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--app-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Order workspace */
.order-workspace {
    --tone-violet: #7c3aed;
    --tone-violet-soft: rgba(124, 58, 237, 0.12);
    --tone-amber: #d97706;
    --tone-amber-soft: rgba(217, 119, 6, 0.12);
    --tone-sky: #0284c7;
    --tone-sky-soft: rgba(2, 132, 199, 0.12);
    --tone-rose: #e11d48;
    --tone-rose-soft: rgba(225, 29, 72, 0.12);
    --tone-emerald: #059669;
    --tone-emerald-soft: rgba(5, 150, 105, 0.12);
    --tone-indigo: #4f46e5;
    --tone-indigo-soft: rgba(79, 70, 229, 0.12);
    --tone-teal: #0d9488;
    --tone-teal-soft: rgba(13, 148, 136, 0.12);
    --tone-slate: #64748b;
    --tone-slate-soft: rgba(100, 116, 139, 0.12);
}

.order-workspace-header {
    overflow: hidden;
}

.order-workspace-hero {
    background:
        linear-gradient(120deg, rgba(79, 70, 229, 0.14) 0%, rgba(124, 58, 237, 0.08) 35%, rgba(2, 132, 199, 0.06) 70%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid var(--app-border);
}

.order-workspace-title {
    font-weight: 700;
    color: var(--app-text);
}

.order-workspace-subtitle {
    color: var(--app-muted);
}

.order-workflow-track {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.order-workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 4.5rem;
    border: 0;
    background: transparent;
    padding: 0.25rem;
    color: var(--app-muted);
    transition: color 0.15s ease;
}

.order-workflow-step:hover {
    color: var(--app-primary);
}

.order-workflow-step-marker {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--app-border);
    background: #fff;
    font-size: 0.95rem;
}

.order-workflow-step.is-done .order-workflow-step-marker {
    border-color: var(--app-primary);
    background: var(--app-primary);
    color: #fff;
}

.order-workflow-step.is-current .order-workflow-step-marker {
    border-color: var(--app-primary);
    color: var(--app-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.order-workflow-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.order-workflow-step.is-current .order-workflow-step-label {
    color: var(--app-primary);
}

.order-workflow-connector {
    flex: 1 1 auto;
    min-width: 1.5rem;
    height: 2px;
    background: var(--app-border);
    margin: 0 0.25rem 1.25rem;
}

.order-workflow-connector.is-done {
    background: var(--app-primary);
}

.order-workflow-next {
    font-size: 0.875rem;
}

.order-workspace-nav {
    position: sticky;
    top: var(--app-topbar-height);
    z-index: 20;
    background: color-mix(in srgb, var(--app-background) 92%, white);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--app-border);
    gap: 0.25rem;
    padding: 0.35rem 0 0;
    margin-bottom: 1rem !important;
}

.order-workspace-nav .nav-link {
    white-space: nowrap;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--app-muted);
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.order-workspace-nav .nav-link.active {
    color: var(--app-primary);
    border-bottom-color: var(--app-primary);
    background: transparent;
}

.order-workspace-nav .nav-link:hover:not(.active) {
    color: var(--app-text);
    border-bottom-color: var(--app-border);
}

.order-fulfillment-checklist li {
    padding: 0.35rem 0;
    color: var(--app-muted);
}

.order-fulfillment-checklist li.is-done {
    color: var(--app-text);
}

.order-fulfillment-checklist li.is-done i {
    color: var(--app-primary);
}

.order-po-card:hover {
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.order-section-card {
    border-left: 3px solid var(--app-primary);
}

.order-label-step {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-left: 3px solid rgba(79, 70, 229, 0.35);
}

.order-label-step-num {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--app-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Order workspace — colorful tones */
.order-badge-etsy {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-weight: 600;
}

.order-badge-amazon {
    background: linear-gradient(135deg, #334155, #0f172a);
    color: #fff;
    font-weight: 600;
}

.order-badge-platform {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-weight: 600;
}

.order-badge-paid {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 600;
}

.order-badge-status {
    font-weight: 600;
}

.order-workspace-ids {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 12rem;
}

.order-id-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.order-id-chip span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.order-id-chip strong {
    font-size: 0.875rem;
    color: var(--app-text);
    word-break: break-all;
}

.order-kpi {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.order-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.order-kpi-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.order-kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.order-kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.order-kpi--indigo { background: linear-gradient(135deg, #eef2ff, #e0e7ff); border-color: rgba(79, 70, 229, 0.2); color: #312e81; }
.order-kpi--indigo .order-kpi-icon { background: var(--tone-indigo); color: #fff; }

.order-kpi--sky { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: rgba(2, 132, 199, 0.2); color: #0c4a6e; }
.order-kpi--sky .order-kpi-icon { background: var(--tone-sky); color: #fff; }

.order-kpi--rose { background: linear-gradient(135deg, #fff1f2, #ffe4e6); border-color: rgba(225, 29, 72, 0.2); color: #881337; }
.order-kpi--rose .order-kpi-icon { background: var(--tone-rose); color: #fff; }

.order-kpi--emerald { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: rgba(5, 150, 105, 0.2); color: #064e3b; }
.order-kpi--emerald .order-kpi-icon { background: var(--tone-emerald); color: #fff; }

.order-kpi--amber { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: rgba(217, 119, 6, 0.2); color: #78350f; }
.order-kpi--amber .order-kpi-icon { background: var(--tone-amber); color: #fff; }

.order-kpi--violet { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border-color: rgba(124, 58, 237, 0.2); color: #4c1d95; }
.order-kpi--violet .order-kpi-icon { background: var(--tone-violet); color: #fff; }

.order-kpi--teal { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); border-color: rgba(13, 148, 136, 0.2); color: #134e4a; }
.order-kpi--teal .order-kpi-icon { background: var(--tone-teal); color: #fff; }

.order-workflow-step.tone-violet.is-done .order-workflow-step-marker,
.order-workflow-step.tone-violet.is-current .order-workflow-step-marker { border-color: var(--tone-violet); }
.order-workflow-step.tone-violet.is-done .order-workflow-step-marker { background: var(--tone-violet); }
.order-workflow-step.tone-violet.is-current .order-workflow-step-marker { color: var(--tone-violet); box-shadow: 0 0 0 4px var(--tone-violet-soft); }
.order-workflow-step.tone-violet.is-current .order-workflow-step-label { color: var(--tone-violet); }

.order-workflow-step.tone-amber.is-done .order-workflow-step-marker,
.order-workflow-step.tone-amber.is-current .order-workflow-step-marker { border-color: var(--tone-amber); }
.order-workflow-step.tone-amber.is-done .order-workflow-step-marker { background: var(--tone-amber); }
.order-workflow-step.tone-amber.is-current .order-workflow-step-marker { color: var(--tone-amber); box-shadow: 0 0 0 4px var(--tone-amber-soft); }
.order-workflow-step.tone-amber.is-current .order-workflow-step-label { color: var(--tone-amber); }

.order-workflow-step.tone-sky.is-done .order-workflow-step-marker,
.order-workflow-step.tone-sky.is-current .order-workflow-step-marker { border-color: var(--tone-sky); }
.order-workflow-step.tone-sky.is-done .order-workflow-step-marker { background: var(--tone-sky); }
.order-workflow-step.tone-sky.is-current .order-workflow-step-marker { color: var(--tone-sky); box-shadow: 0 0 0 4px var(--tone-sky-soft); }
.order-workflow-step.tone-sky.is-current .order-workflow-step-label { color: var(--tone-sky); }

.order-workflow-step.tone-rose.is-done .order-workflow-step-marker,
.order-workflow-step.tone-rose.is-current .order-workflow-step-marker { border-color: var(--tone-rose); }
.order-workflow-step.tone-rose.is-done .order-workflow-step-marker { background: var(--tone-rose); }
.order-workflow-step.tone-rose.is-current .order-workflow-step-marker { color: var(--tone-rose); box-shadow: 0 0 0 4px var(--tone-rose-soft); }
.order-workflow-step.tone-rose.is-current .order-workflow-step-label { color: var(--tone-rose); }

.order-workflow-step.tone-emerald.is-done .order-workflow-step-marker,
.order-workflow-step.tone-emerald.is-current .order-workflow-step-marker { border-color: var(--tone-emerald); }
.order-workflow-step.tone-emerald.is-done .order-workflow-step-marker { background: var(--tone-emerald); }
.order-workflow-step.tone-emerald.is-current .order-workflow-step-marker { color: var(--tone-emerald); box-shadow: 0 0 0 4px var(--tone-emerald-soft); }
.order-workflow-step.tone-emerald.is-current .order-workflow-step-label { color: var(--tone-emerald); }

.order-workflow-connector.tone-violet.is-done { background: var(--tone-violet); }
.order-workflow-connector.tone-amber.is-done { background: var(--tone-amber); }
.order-workflow-connector.tone-sky.is-done { background: var(--tone-sky); }
.order-workflow-connector.tone-rose.is-done { background: var(--tone-rose); }

.order-next-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 700;
}

.order-next-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 0;
    color: #fff;
    font-weight: 600;
}

.order-next-btn:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    color: #fff;
}

.order-complete-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    font-size: 0.8rem;
    font-weight: 700;
}

.order-workspace-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.order-tab-icon {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: rgba(100, 116, 139, 0.1);
    font-size: 0.85rem;
}

.order-tab-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.15);
    color: var(--app-muted);
}

.order-workspace-nav .nav-link.tone-slate.active { color: var(--tone-slate); border-bottom-color: var(--tone-slate); }
.order-workspace-nav .nav-link.tone-slate.active .order-tab-icon { background: var(--tone-slate-soft); color: var(--tone-slate); }
.order-workspace-nav .nav-link.tone-violet.active { color: var(--tone-violet); border-bottom-color: var(--tone-violet); }
.order-workspace-nav .nav-link.tone-violet.active .order-tab-icon { background: var(--tone-violet-soft); color: var(--tone-violet); }
.order-workspace-nav .nav-link.tone-amber.active { color: var(--tone-amber); border-bottom-color: var(--tone-amber); }
.order-workspace-nav .nav-link.tone-amber.active .order-tab-icon { background: var(--tone-amber-soft); color: var(--tone-amber); }
.order-workspace-nav .nav-link.tone-sky.active { color: var(--tone-sky); border-bottom-color: var(--tone-sky); }
.order-workspace-nav .nav-link.tone-sky.active .order-tab-icon { background: var(--tone-sky-soft); color: var(--tone-sky); }
.order-workspace-nav .nav-link.tone-rose.active { color: var(--tone-rose); border-bottom-color: var(--tone-rose); }
.order-workspace-nav .nav-link.tone-rose.active .order-tab-icon { background: var(--tone-rose-soft); color: var(--tone-rose); }
.order-workspace-nav .nav-link.tone-emerald.active { color: var(--tone-emerald); border-bottom-color: var(--tone-emerald); }
.order-workspace-nav .nav-link.tone-emerald.active .order-tab-icon { background: var(--tone-emerald-soft); color: var(--tone-emerald); }
.order-workspace-nav .nav-link.tone-indigo.active { color: var(--tone-indigo); border-bottom-color: var(--tone-indigo); }
.order-workspace-nav .nav-link.tone-indigo.active .order-tab-icon { background: var(--tone-indigo-soft); color: var(--tone-indigo); }
.order-workspace-nav .nav-link.tone-teal.active { color: var(--tone-teal); border-bottom-color: var(--tone-teal); }
.order-workspace-nav .nav-link.tone-teal.active .order-tab-icon { background: var(--tone-teal-soft); color: var(--tone-teal); }

.order-workspace-nav .nav-link.active .order-tab-badge {
    background: currentColor;
    color: #fff;
    opacity: 0.9;
}

.order-panel {
    border-left: 4px solid transparent;
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
}

.order-panel-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.order-panel-head i {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.order-panel--sky { border-left-color: var(--tone-sky); background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%); }
.order-panel--sky .order-panel-head { color: #0c4a6e; }
.order-panel--sky .order-panel-head i { background: var(--tone-sky-soft); color: var(--tone-sky); }

.order-panel--violet { border-left-color: var(--tone-violet); background: linear-gradient(135deg, #fff 0%, #f5f3ff 100%); }
.order-panel--violet .order-panel-head { color: #4c1d95; }
.order-panel--violet .order-panel-head i { background: var(--tone-violet-soft); color: var(--tone-violet); }

.order-panel--emerald { border-left-color: var(--tone-emerald); background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%); }
.order-panel--emerald .order-panel-head { color: #064e3b; }
.order-panel--emerald .order-panel-head i { background: var(--tone-emerald-soft); color: var(--tone-emerald); }

.order-panel--amber { border-left-color: var(--tone-amber); background: linear-gradient(135deg, #fff 0%, #fffbeb 100%); }
.order-panel--amber .order-panel-head { color: #78350f; }
.order-panel--amber .order-panel-head i { background: var(--tone-amber-soft); color: var(--tone-amber); }

.order-panel--indigo { border-left-color: var(--tone-indigo); background: linear-gradient(135deg, #fff 0%, #eef2ff 100%); }
.order-panel--indigo .order-panel-head { color: #312e81; }
.order-panel--indigo .order-panel-head i { background: var(--tone-indigo-soft); color: var(--tone-indigo); }

.order-panel--rose { border-left-color: var(--tone-rose); background: linear-gradient(135deg, #fff 0%, #fff1f2 100%); }
.order-panel--rose .order-panel-head { color: #881337; }
.order-panel--rose .order-panel-head i { background: var(--tone-rose-soft); color: var(--tone-rose); }

.order-section-card.order-panel--rose {
    border-left-width: 4px;
    border-left-color: var(--tone-rose);
}

.order-label-step--sky {
    border-left-color: var(--tone-sky);
    background: linear-gradient(135deg, #fff, #f0f9ff);
}

.order-label-step--sky .order-label-step-num {
    background: var(--tone-sky);
}

.order-label-step--rose {
    border-left-color: var(--tone-rose);
    background: linear-gradient(135deg, #fff, #fff1f2);
}

.order-label-step--rose .order-label-step-num {
    background: var(--tone-rose);
}

.order-fulfillment-checklist li.is-done i {
    color: var(--tone-emerald);
}

.order-workspace-content .tab-pane {
    animation: none;
}

.order-workspace-section {
    scroll-margin-top: calc(var(--app-topbar-height) + 3.75rem);
    margin-bottom: 1.75rem;
    padding-bottom: 0.25rem;
}

.order-workspace-section[data-section-title]::before {
    content: attr(data-section-title);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-muted);
    margin-bottom: 0.85rem;
}

.order-workspace-section + .order-workspace-section {
    border-top: 1px solid var(--app-border);
    padding-top: 1.5rem;
}

@keyframes orderTabFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-profit-flow {
    border-left: 4px solid var(--tone-indigo);
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.order-profit-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-profit-step {
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid var(--app-border);
    background: #fff;
}

.order-profit-step--subtotal,
.order-profit-step--base {
    border-color: rgba(79, 70, 229, 0.25);
    background: linear-gradient(135deg, #eef2ff, #fff);
}

.order-profit-step--deduction {
    border-left: 3px solid rgba(225, 29, 72, 0.35);
}

.order-profit-step--total,
.order-profit-step--highlight {
    border-color: rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, #ecfdf5, #fff);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08);
}

.order-profit-step--highlight.order-profit-step--total .order-profit-step-amount {
    font-size: 1.35rem;
    font-weight: 700;
}

.order-profit-step-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.order-profit-step-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-weight: 600;
}

.order-profit-step-note {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--app-muted);
}

.order-profit-step-amount {
    font-weight: 700;
    white-space: nowrap;
}

.order-profit-step-balance {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--app-border);
    font-size: 0.8rem;
}

.order-profit-formula {
    line-height: 1.5;
}

/* ================================================================== Brand UI */

@keyframes brandFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes brandFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes brandScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes brandSlideRow {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes brandShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Page content stagger reveal (JS adds .brand-reveal) */
.brand-reveal {
    animation: brandFadeUp var(--brand-duration) var(--brand-ease) both;
    animation-delay: var(--brand-stagger, 0ms);
}

.brand-table-row {
    animation: brandSlideRow 0.4s var(--brand-ease) both;
    animation-delay: var(--brand-row-delay, 0ms);
}

/* Page header */
.page-header {
    position: relative;
    padding-bottom: 0.25rem;
}

.page-header-title {
    position: relative;
    display: inline-block;
}

.page-header-title::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-top: 0.5rem;
    border-radius: 999px;
    background: var(--app-brand-gradient);
    animation: brandFadeIn 0.6s var(--brand-ease) 0.2s both;
}

/* Cards */
.admin-card {
    /* Keep overflow visible so row action dropdowns are not clipped. */
    overflow: visible;
    transition: box-shadow 0.25s var(--brand-ease), transform 0.25s var(--brand-ease), border-color 0.25s ease;
}

.admin-card:hover {
    box-shadow: var(--app-shadow-hover);
}

.admin-card > .table-responsive:first-child,
.admin-card > form:first-child .table-responsive {
    border-radius: var(--app-radius) var(--app-radius) 0 0;
}

/* Filter bar */
.filter-bar {
    position: relative;
    box-shadow: var(--app-shadow);
    transition: box-shadow 0.25s var(--brand-ease), border-color 0.25s ease;
}

.filter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--app-brand-gradient);
    border-radius: var(--app-radius) var(--app-radius) 0 0;
    opacity: 0.85;
}

.filter-bar:focus-within {
    border-color: rgba(var(--app-primary-rgb), 0.35);
    box-shadow: var(--app-shadow-brand);
}

.filter-bar .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--app-muted);
    margin-bottom: 0.35rem;
}

/* Forms — global brand styling */
.admin-body .form-control,
.admin-body .form-select {
    border-radius: 0.5rem;
    border-color: var(--app-border);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        transform 0.15s var(--brand-ease);
}

.admin-body .form-control:hover:not(:focus):not(:disabled),
.admin-body .form-select:hover:not(:focus):not(:disabled) {
    border-color: rgba(var(--app-primary-rgb), 0.35);
}

.admin-body .form-control:focus,
.admin-body .form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px var(--app-primary-soft), 0 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.admin-body .form-label {
    font-weight: 500;
    color: var(--app-text);
}

.admin-body textarea.form-control {
    min-height: 5rem;
}

.admin-body .form-check-input:checked {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.admin-body .form-check-input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem var(--app-primary-soft);
}

/* Buttons */
.admin-body .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s var(--brand-ease),
        color 0.2s ease;
}

.admin-body .btn:active:not(:disabled) {
    transform: scale(0.98);
}

.admin-body .btn-primary {
    background: var(--app-brand-gradient);
    border: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.admin-body .btn-primary:hover,
.admin-body .btn-primary:focus {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #3730a3 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
    transform: translateY(-1px);
}

.admin-body .btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.18);
}

/* Tables */
.admin-table {
    --bs-table-hover-bg: rgba(79, 70, 229, 0.04);
}

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 2px solid rgba(var(--app-primary-rgb), 0.12);
}

.admin-table tbody tr {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.05);
    box-shadow: inset 3px 0 0 var(--app-primary);
}

.admin-table tbody td a:not(.btn) {
    transition: color 0.15s ease;
}

.admin-table tbody td a:not(.btn):hover {
    color: var(--app-primary) !important;
}

.table-responsive {
    border-radius: inherit;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Row actions — menus are portaled to body while open */
.table-row-actions-menu {
    z-index: 3000 !important;
    min-width: 12.5rem;
    padding: 0.4rem;
    border: 1px solid var(--app-border);
    background-color: #ffffff !important;
    background-image: none !important;
    opacity: 1 !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.admin-table .dropdown-menu,
.table-row-actions .dropdown-menu {
    z-index: 2000;
    min-width: 12.5rem;
    padding: 0.4rem;
    border: 1px solid var(--app-border);
    background-color: #ffffff !important;
    background-image: none !important;
    opacity: 1 !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.table-row-actions-menu .dropdown-item,
.admin-table .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.45rem;
    margin: 0.1rem 0;
    padding: 0.5rem 0.7rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
}

.table-row-actions-menu .dropdown-item:hover,
.table-row-actions-menu .dropdown-item:focus,
.admin-table .dropdown-item:hover,
.admin-table .dropdown-item:focus {
    background-color: rgba(79, 70, 229, 0.08);
}

.table-row-actions-menu .dropdown-item i,
.admin-table .dropdown-item i {
    width: 1rem;
    text-align: center;
    opacity: 0.85;
}

.table-row-actions-menu .dropdown-item.text-danger:hover,
.table-row-actions-menu .dropdown-item.text-danger:focus,
.admin-table .dropdown-item.text-danger:hover,
.admin-table .dropdown-item.text-danger:focus {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.admin-table td.text-end {
    position: static;
    overflow: visible;
}

.admin-table tbody tr {
    position: relative;
    z-index: 1;
}

/* Pagination */
.brand-pagination {
    animation: brandFadeUp 0.45s var(--brand-ease) both;
}

.admin-card > .p-3:has(> .brand-pagination),
.admin-card .p-3:has(> .brand-pagination) {
    padding: 0 !important;
}

.brand-pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    border-top: 1px solid var(--app-border);
    border-radius: 0 0 var(--app-radius) var(--app-radius);
}

.brand-pagination-summary {
    font-size: 0.8125rem;
    color: var(--app-muted);
    margin: 0;
}

.brand-pagination-summary strong {
    color: var(--app-text);
    font-weight: 600;
}

.admin-body .brand-pagination .pagination {
    gap: 0.25rem;
    margin: 0;
}

.admin-body .brand-pagination .page-item .page-link {
    border: 1px solid var(--app-border);
    border-radius: 0.5rem !important;
    color: var(--app-text);
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 2.25rem;
    text-align: center;
    padding: 0.375rem 0.625rem;
    margin: 0;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s var(--brand-ease),
        box-shadow 0.2s ease;
}

.admin-body .brand-pagination .page-item .page-link:hover:not(.disabled) {
    background: var(--app-primary-soft);
    border-color: rgba(var(--app-primary-rgb), 0.35);
    color: var(--app-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.12);
}

.admin-body .brand-pagination .page-item.active .page-link {
    background: var(--app-brand-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

.admin-body .brand-pagination .page-item.disabled .page-link {
    background: #f9fafb;
    color: var(--app-muted);
    opacity: 0.7;
}

/* Empty state */
.empty-state {
    animation: brandScaleIn 0.5s var(--brand-ease) both;
}

.empty-state-icon {
    background: var(--app-brand-gradient-subtle);
    color: var(--app-primary);
    transition: transform 0.3s var(--brand-ease);
}

.empty-state:hover .empty-state-icon {
    transform: scale(1.05);
}

/* Flash messages */
.flash-messages .alert {
    animation: brandFadeUp 0.4s var(--brand-ease) both;
    border-left: 4px solid transparent;
}

.flash-messages .alert-success {
    border-left-color: var(--app-success);
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.08) 0%, #fff 30%);
}

.flash-messages .alert-danger {
    border-left-color: var(--app-danger);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08) 0%, #fff 30%);
}

.flash-messages .alert-warning {
    border-left-color: var(--app-warning);
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08) 0%, #fff 30%);
}

.flash-messages .alert-info {
    border-left-color: var(--app-info);
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.08) 0%, #fff 30%);
}

/* Stat cards */
.stat-card {
    animation: brandFadeUp 0.45s var(--brand-ease) both;
}

.stat-card-icon {
    transition: transform 0.25s var(--brand-ease);
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.08);
}

/* Status badges pulse on load */
.status-badge {
    animation: brandScaleIn 0.35s var(--brand-ease) both;
}

/* Topbar subtle brand line */
.admin-topbar {
    border-bottom: 1px solid var(--app-border);
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.admin-topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--app-primary-rgb), 0.25), transparent);
    pointer-events: none;
}

.admin-topbar {
    position: sticky;
}

/* Dropdown menus */
.admin-body .dropdown-menu {
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border);
    background-color: #ffffff;
    background-image: none;
    opacity: 1;
    box-shadow: var(--app-shadow-hover);
}

.admin-body .dropdown-item {
    border-radius: 0.375rem;
    margin: 0.125rem 0.375rem;
    padding: 0.4375rem 0.75rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-body .dropdown-item:hover,
.admin-body .dropdown-item:focus {
    background: var(--app-primary-soft);
    color: var(--app-primary-dark);
}

/* Nav tabs (generic) */
.admin-body .nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.admin-body .nav-tabs .nav-link.active {
    color: var(--app-primary);
    border-bottom-color: var(--app-primary);
    font-weight: 600;
}

/* Auth panels */
.auth-form-card {
    animation: brandScaleIn 0.5s var(--brand-ease) both;
}

/* Hunt preset — align with brand */
.hunt-preset:hover {
    border-color: var(--app-primary);
    background: var(--app-primary-soft);
}

.hunt-preset:has(.form-check-input:checked) {
    border-color: var(--app-primary);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 0 0 1px var(--app-primary), var(--app-shadow-brand);
}

.hunt-preset:has(.form-check-input:checked) .hunt-preset-icon {
    background: var(--app-primary);
    color: #fff;
}

.auth-wizard-steps .is-current .auth-wizard-bullet,
.auth-wizard-steps .is-complete .auth-wizard-bullet {
    background: var(--app-primary);
    color: #fff;
}

.auth-wizard-steps .is-current .auth-wizard-label {
    color: var(--app-primary);
}

/* ================================================================== Dashboard */

.dash-hero {
    position: relative;
    overflow: hidden;
    border: none;
    background:
        linear-gradient(125deg, #312e81 0%, #4f46e5 48%, #7c3aed 100%);
    color: #fff;
    padding: 1.75rem 1.75rem 1.85rem;
    box-shadow: 0 12px 32px rgba(67, 56, 202, 0.28);
}

.dash-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

.dash-hero-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

.dash-hero-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dash-hero-subtitle {
    margin: 0.4rem 0 0;
    max-width: 36rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-hero-actions .btn-light {
    color: var(--app-primary-dark);
    font-weight: 600;
}

.dash-hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
}

.dash-hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.dash-hero-glow {
    position: absolute;
    width: 22rem;
    height: 22rem;
    right: -4rem;
    top: -8rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.5), transparent 70%);
    pointer-events: none;
    animation: brandFadeIn 1s ease both;
}

.dash-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-muted);
    margin: 0 0 0.75rem;
}

.dash-panel {
    padding: 1.25rem 1.35rem 1.35rem;
}

.dash-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.dash-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--app-text);
}

.dash-panel-sub {
    font-size: 0.8125rem;
    color: var(--app-muted);
    margin-top: 0.15rem;
}

.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s var(--brand-ease), box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-action:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--app-primary-rgb), 0.3);
    box-shadow: var(--app-shadow-brand);
    color: inherit;
}

.dash-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dash-action-icon--sky { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.dash-action-icon--amber { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.dash-action-icon--violet { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.dash-action-icon--rose { background: rgba(225, 29, 72, 0.12); color: #e11d48; }
.dash-action-icon--slate { background: rgba(100, 116, 139, 0.12); color: #64748b; }

.dash-action-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-action-text strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.dash-action-text small {
    font-size: 0.75rem;
    color: var(--app-muted);
}

.dash-activity {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-activity-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--app-border);
    animation: brandFadeUp 0.4s var(--brand-ease) both;
}

.dash-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-activity-item:first-child {
    padding-top: 0;
}

.dash-activity-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: var(--app-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    flex-shrink: 0;
}

.dash-activity-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.dash-activity-text {
    font-size: 0.875rem;
    color: var(--app-text);
}

.dash-activity-time {
    font-size: 0.75rem;
    color: var(--app-muted);
}

.dash-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--app-muted);
}

.dash-empty i {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--app-primary);
    opacity: 0.7;
}

.dash-snapshot-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dash-snapshot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #f8fafc, #f3f4f6);
    border: 1px solid var(--app-border);
}

.dash-snapshot-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-muted);
}

.dash-snapshot-value {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

.dash-storage {
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(255, 255, 255, 0.95) 50%),
        var(--app-card);
}

.dash-storage-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--app-text);
}

.dash-storage-meta {
    font-size: 0.8125rem;
    color: var(--app-muted);
    margin-top: 0.25rem;
}

.dash-storage-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dash-storage-bar-fill {
    display: block;
    height: 100%;
    width: 42%;
    border-radius: 999px;
    background: var(--app-brand-gradient);
    animation: brandShimmer 2.5s linear infinite;
    background-size: 200% 100%;
}

/* List / products toolbar polish */
.admin-card > form > .border-bottom,
.admin-card .p-3.border-bottom {
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.admin-table img.rounded {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s var(--brand-ease), box-shadow 0.2s ease;
}

.admin-table tbody tr:hover img.rounded {
    transform: scale(1.06);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.page-header--brand .page-header-actions .btn {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Reports & Analytics */
.report-kpi-strip {
    padding: 0;
    overflow: hidden;
}

.report-kpi-strip-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-kpi-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.9rem 0.65rem;
    text-align: center;
    border-right: 1px solid var(--app-border);
}

.report-kpi-metric:last-child {
    border-right: none;
}

.report-kpi-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
    white-space: nowrap;
}

.report-kpi-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.report-data-card {
    overflow: hidden;
}

.report-data-head {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-background);
}

.report-pnl-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--app-border);
}

.report-pnl-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 1.15rem 1rem;
    text-align: center;
}

.report-pnl-summary-item--income {
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.6), #fff);
    border-right: 1px solid var(--app-border);
}

.report-pnl-summary-item--expense {
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.55), #fff);
}

.report-pnl-summary-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.report-pnl-summary-sub {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.report-pnl-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    margin-top: 0.15rem;
}

.report-pnl-body {
    padding: 0;
}

.report-pnl-table {
    table-layout: fixed;
    width: 100%;
}

.report-pnl-table th:last-child,
.report-pnl-table td:last-child {
    width: 10rem;
    font-variant-numeric: tabular-nums;
}

.report-row-subtotal td {
    background: #eef2ff !important;
    font-weight: 600;
    border-top: 1px solid #c7d2fe;
}

.report-row-result td {
    background: #e0e7ff !important;
    font-weight: 700;
}

.report-row-note td {
    color: var(--app-muted);
    font-size: 0.8125rem;
    background: #fff !important;
    border-bottom-style: dashed;
}

.report-sort-link {
    color: inherit;
    text-decoration: none;
}

.report-sort-link:hover {
    color: var(--app-primary);
    text-decoration: underline;
}

.report-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-background);
}

.report-category-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 8rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid var(--app-border);
}

.report-category-name {
    font-size: 0.75rem;
    color: var(--app-muted);
}

.report-category-amount {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--app-text);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 992px) {
    .report-kpi-strip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-kpi-metric:nth-child(3) {
        border-right: none;
    }

    .report-kpi-metric:nth-child(n+4) {
        border-top: 1px solid var(--app-border);
    }
}

@media (max-width: 576px) {
    .report-kpi-strip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-kpi-metric:nth-child(2n) {
        border-right: none;
    }

    .report-kpi-metric:nth-child(n+3) {
        border-top: 1px solid var(--app-border);
    }

    .report-pnl-summary {
        grid-template-columns: 1fr;
    }

    .report-pnl-summary-item--income {
        border-right: none;
        border-bottom: 1px solid var(--app-border);
    }
}

@media (max-width: 767.98px) {
    .rpt-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .dash-hero-actions {
        width: 100%;
    }

    .dash-hero-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .filter-bar .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .stat-card-value {
        font-size: 1.35rem;
    }

    .admin-table thead th,
    .admin-table tbody td {
        padding: 0.7rem 0.75rem;
        font-size: 0.8125rem;
    }

    .admin-body .btn {
        min-height: 38px;
    }
}

@media (max-width: 575.98px) {
    .admin-content {
        padding: 0.85rem 0.75rem 1.25rem;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }

    .admin-topbar {
        padding: 0 0.65rem;
        gap: 0.4rem;
        min-height: 56px;
    }

    .store-switcher-btn .store-name {
        display: none;
    }

    .store-switcher-btn {
        max-width: none;
        padding: 0.35rem 0.5rem;
    }

    .dash-hero {
        padding: 1.1rem;
        border-radius: 0.85rem;
    }

    .dash-hero-subtitle {
        font-size: 0.875rem;
    }

    .rpt-kpi-value {
        font-size: 1.125rem;
    }

    .page-header-actions .btn {
        flex: 1 1 100%;
    }

    .admin-breadcrumb {
        font-size: 0.75rem;
    }
}

@media (max-width: 399.98px) {
    .rpt-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.order-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-form-section {
    padding: 1.35rem 1.5rem 1.5rem;
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

.order-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--app-border);
}

.order-form-section-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(var(--app-primary-rgb), 0.12);
    color: var(--app-primary);
    font-size: 1.1rem;
}

.order-form-section-icon.tone-sky {
    background: rgba(14, 165, 233, 0.14);
    color: #0284c7;
}

.order-form-section-icon.tone-emerald {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.order-form-section-icon.tone-violet {
    background: rgba(139, 92, 246, 0.14);
    color: #7c3aed;
}

.order-form-section-icon.tone-amber {
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
}

.order-form-section-title {
    font-size: 1.05rem;
    font-weight: 650;
    margin: 0;
    letter-spacing: -0.01em;
}

.order-form-section-copy {
    margin: 0.15rem 0 0;
    color: var(--app-muted);
    font-size: 0.84rem;
}

.order-form-items {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.order-form-item {
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    padding: 1rem 1.1rem 1.15rem;
    background: rgba(var(--app-primary-rgb), 0.03);
}

.order-form-item-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.order-form-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.order-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.9rem 0 0.25rem;
    background: linear-gradient(180deg, transparent, var(--app-background) 28%);
}

/* ------------------------------------------------------------------ 3PL Downloads file browser */

.tpl-fm {
    max-width: 1280px;
}

.tpl-fm-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding: 1.25rem 1.4rem;
    border-radius: 1rem;
    background: var(--app-brand-gradient);
    color: #fff;
    box-shadow: var(--app-shadow-brand);
}

.tpl-fm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.9;
}

.tpl-fm-title {
    margin: 0.3rem 0 0.25rem;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.tpl-fm-sub {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
}

.tpl-fm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.tpl-fm-view-toggle {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.16);
}

.tpl-fm-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #fff;
    text-decoration: none;
    opacity: 0.75;
}

.tpl-fm-view-btn:hover,
.tpl-fm-view-btn.is-active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.tpl-fm-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.tpl-fm-sidebar,
.tpl-fm-panel {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: var(--app-shadow);
}

.tpl-fm-sidebar {
    padding: 1rem;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tpl-fm-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.tpl-fm-sidebar-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.tpl-fm-sidebar-sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--app-muted);
}

.tpl-fm-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.tpl-fm-search {
    position: relative;
    margin-bottom: 0.85rem;
}

.tpl-fm-search > i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.tpl-fm-search input[type="search"] {
    width: 100%;
    border: 1px solid var(--app-border);
    border-radius: 0.7rem;
    background: #f8fafc;
    padding: 0.55rem 2.4rem 0.55rem 2.15rem;
    font-size: 0.8125rem;
}

.tpl-fm-search input:focus {
    outline: none;
    border-color: var(--app-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--app-primary-glow);
}

.tpl-fm-search button {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--app-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tpl-fm-tree {
    overflow: auto;
    flex: 1;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}

.tpl-fm-tree-group {
    margin-bottom: 0.35rem;
}

.tpl-fm-node {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.7rem;
    text-decoration: none;
    color: var(--app-text);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tpl-fm-node:hover {
    background: #f8fafc;
    color: var(--app-text);
}

.tpl-fm-node.is-active,
.tpl-fm-node.is-open {
    background: var(--app-primary-soft);
    border-color: rgba(79, 70, 229, 0.18);
}

.tpl-fm-node.is-active .tpl-fm-node-title {
    color: var(--app-primary-dark);
    font-weight: 700;
}

.tpl-fm-node-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--app-primary);
    flex: 0 0 auto;
    font-size: 0.85rem;
}

.tpl-fm-node-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tpl-fm-node-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.tpl-fm-node-meta {
    font-size: 0.7rem;
    color: var(--app-muted);
}

.tpl-fm-node-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--app-muted);
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.tpl-fm-node--child {
    margin-left: 0.85rem;
    padding: 0.4rem 0.55rem;
}

.tpl-fm-children {
    margin-top: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tpl-fm-empty-side {
    text-align: center;
    padding: 1.5rem 0.75rem;
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.tpl-fm-empty-side i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.4rem;
}

.tpl-fm-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tpl-fm-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: var(--app-shadow);
}

.tpl-fm-summary-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-brand-gradient-subtle);
    color: var(--app-primary);
    font-size: 1.15rem;
}

.tpl-fm-summary-copy {
    min-width: 0;
    flex: 1;
}

.tpl-fm-summary-copy h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.tpl-fm-summary-copy p {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--app-muted);
}

.tpl-fm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.tpl-fm-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.tpl-fm-toolbar-form label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.78rem;
    color: var(--app-muted);
}

.tpl-fm-toolbar-form .form-select {
    width: auto;
    min-width: 5.5rem;
    border-radius: 0.55rem;
}

.tpl-fm-toolbar-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: var(--app-muted);
}

.tpl-fm-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.5rem;
    border: 1px solid var(--app-border);
    color: var(--app-muted);
    text-decoration: none;
}

.tpl-fm-refresh:hover {
    color: var(--app-primary);
    border-color: rgba(79, 70, 229, 0.3);
    background: var(--app-primary-soft);
}

.tpl-fm-table {
    --bs-table-bg: transparent;
}

.tpl-fm-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-muted);
    font-weight: 650;
    background: #f8fafc;
    border-bottom: 1px solid var(--app-border);
    padding: 0.7rem 1rem;
}

.tpl-fm-table tbody td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.tpl-fm-table tbody tr:hover {
    background: #fafafe;
}

.tpl-fm-name {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--app-text);
    font-weight: 600;
    font-size: 0.875rem;
}

.tpl-fm-name:hover {
    color: var(--app-primary);
}

.tpl-fm-file-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--app-primary);
    flex: 0 0 auto;
}

.tpl-fm-type {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.tpl-fm-details {
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.tpl-fm-row-btn {
    border-radius: 0.55rem;
    font-weight: 600;
}

.tpl-fm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
}

.tpl-fm-grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--app-border);
    border-radius: 0.9rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--app-text);
    background: #fff;
    transition: transform 0.18s var(--brand-ease), box-shadow 0.18s ease, border-color 0.18s ease;
}

.tpl-fm-grid-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow-hover);
    border-color: rgba(79, 70, 229, 0.25);
    color: var(--app-text);
}

.tpl-fm-grid-preview {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #f8fafc, #eef2ff);
    color: var(--app-primary);
    font-size: 1.75rem;
}

.tpl-fm-grid-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tpl-fm-grid-body {
    padding: 0.7rem 0.8rem 0.85rem;
}

.tpl-fm-grid-name {
    font-size: 0.8125rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpl-fm-grid-meta {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--app-muted);
}

.tpl-fm-grid-detail {
    margin-top: 0.2rem;
    font-size: 0.7rem;
    color: #94a3b8;
}

.tpl-fm-empty {
    text-align: center;
    padding: 3rem 1.25rem;
    color: var(--app-muted);
}

.tpl-fm-empty-icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.85rem;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 1.35rem;
}

.tpl-fm-empty h4 {
    margin: 0 0 0.25rem;
    color: var(--app-text);
    font-size: 1rem;
}

.tpl-fm-empty p {
    margin: 0;
    font-size: 0.85rem;
}

.tpl-fm-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--app-border);
    background: #fafbff;
    border-radius: 0 0 1rem 1rem;
}

.tpl-fm-footer-count {
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.tpl-fm-footer-count strong {
    color: var(--app-text);
}

.tpl-fm-pager {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tpl-fm-page-btn {
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    border: 1px solid var(--app-border);
    background: #fff;
    color: var(--app-text);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
}

.tpl-fm-page-btn:hover {
    border-color: rgba(79, 70, 229, 0.35);
    color: var(--app-primary);
}

.tpl-fm-page-btn.is-active {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

.tpl-fm-page-ellipsis {
    color: var(--app-muted);
    padding: 0 0.2rem;
}

@media (max-width: 991.98px) {
    .tpl-fm-layout {
        grid-template-columns: 1fr;
    }

    .tpl-fm-sidebar {
        position: static;
        max-height: none;
    }

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

@media (max-width: 575.98px) {
    .tpl-fm-grid {
        grid-template-columns: 1fr;
    }

    .tpl-fm-hero {
        padding: 1rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .brand-reveal,
    .brand-table-row,
    .brand-pagination,
    .empty-state,
    .stat-card,
    .status-badge,
    .flash-messages .alert,
    .auth-form-card,
    .admin-sidebar-brand .brand-icon,
    .dash-activity-item,
    .dash-hero-glow,
    .dash-storage-bar-fill {
        animation: none !important;
    }

    .admin-body .btn-primary:hover,
    .admin-body .btn-outline-primary:hover,
    .admin-body .form-control:focus,
    .admin-body .form-select:focus,
    .admin-body .brand-pagination .page-item .page-link:hover,
    .stat-card:hover,
    .stat-card-link:hover,
    .dash-action:hover {
        transform: none;
    }
}
