/**
 * Admin On-Theme CSS - Unified Design System
 * Used by Services, Quotes, and other admin pages
 * 
 * @package FreeconomyToday
 * @subpackage CSS\Admin
 */

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
    --ase-primary: #228B22;
    --ase-primary-dark: #006400;
    --ase-primary-light: #32CD32;
    --ase-primary-container: #dcfce7;
    --ase-on-primary: #ffffff;
    --ase-secondary: #4c616c;
    --ase-tertiary: #00450d;
    --ase-tertiary-light: #a3f69c;
    --ase-surface: #f7fbf1;
    --ase-surface-container: #ecefe6;
    --ase-surface-container-low: #f2f5ec;
    --ase-surface-container-high: #e6e9e0;
    --ase-surface-dim: #d8dbd2;
    --ase-outline: #717a6d;
    --ase-outline-variant: #c0c9bb;
    --ase-danger: #dc2626;
    --ase-danger-container: #fee2e2;
    --ase-info-container: #dcfce7;
    --ase-info: #166534;
    --ase-text: #1a202c;
    --ase-text-muted: #6b7280;
    
    /* Modal tokens */
    --modal-bg: #ffffff;
    --modal-header-bg: #f8fafc;
    --primary-gradient: linear-gradient(135deg, #228B22 0%, #006400 100%);
    --primary-glow: 0 0 15px rgba(34, 139, 34, 0.4);
    --border-color: #e2e8f0;
    --input-focus: #228B22;
    --text-main: #1e293b;
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================================
   Base Layout
   ============================================================ */
.admin-on-theme,
.admin-service-edit {
    max-width: 84rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ---------- Hero Section ---------- */
.admin-on-theme__hero,
.admin-service-edit__hero {
    margin-bottom: 3rem;
}

.admin-on-theme__hero-inner,
.admin-service-edit__hero-inner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ase-surface-container-low) 0%, var(--ase-primary-container) 100%);
    border-radius: 2rem;
    padding: 3rem;
}

.admin-on-theme__hero-glow,
.admin-service-edit__hero-glow {
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 22rem;
    height: 22rem;
    background: var(--ase-primary-light);
    opacity: 0.25;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.admin-on-theme__hero-content,
.admin-service-edit__hero-content {
    position: relative;
    z-index: 1;
    max-width: 48rem;
}

.admin-on-theme__hero-badge,
.admin-service-edit__hero-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--ase-primary);
    color: var(--ase-on-primary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.admin-on-theme__hero-title,
.admin-service-edit__hero-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-color, #1a202c);
    margin: 0 0 1.25rem;
}

.admin-on-theme__hero-title--accent {
    color: var(--ase-primary-dark);
    display: block;
}

.admin-on-theme__hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted, #4a5568);
    line-height: 1.6;
    margin: 0 0 1.75rem;
    max-width: 38rem;
}

.admin-on-theme__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-on-theme__hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: var(--ase-primary-dark);
    font-weight: 500;
}

.admin-on-theme__hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-on-theme__hero-meta-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
}

.admin-on-theme__hero-meta-dot--active {
    background: var(--ase-primary);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.15);
}

.admin-on-theme__hero-meta-dot--inactive {
    background: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.15);
}

/* ============================================================
   Unified Action Buttons (Single Source of Truth)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn:hover {
    text-decoration: none;
}

.btn--primary,
.btn-primary {
    background: linear-gradient(135deg, var(--ase-primary) 0%, var(--ase-primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2);
}

.btn--primary:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
    opacity: 0.95;
}

.btn--ghost,
.btn-ghost {
    background: white;
    color: var(--ase-primary-dark);
    border: 1px solid var(--ase-outline-variant);
}

.btn--ghost:hover,
.btn-ghost:hover {
    background: var(--ase-surface-container-low);
    border-color: var(--ase-primary);
}

.btn--danger,
.btn-danger {
    background: var(--ase-danger);
    color: white;
}

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

.btn--secondary,
.btn-secondary {
    background: var(--ase-surface-container);
    color: var(--ase-text);
    border: 1px solid var(--ase-outline-variant);
}

.btn--secondary:hover,
.btn-secondary:hover {
    background: var(--ase-surface-container-high);
}

.btn--outline-primary,
.btn-outline-primary {
    background: var(--ase-primary-container);
    color: var(--ase-primary-dark);
    border: 1px solid var(--ase-primary);
}

.btn--outline-primary:hover {
    background: var(--ase-primary);
    color: white;
}

.btn--outline-danger,
.btn-outline-danger {
    background: var(--ase-danger-container);
    color: var(--ase-danger);
    border: 1px solid var(--ase-danger);
}

.btn--outline-danger:hover {
    background: var(--ase-danger);
    color: white;
}

.btn--sm,
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.btn--lg,
.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

.btn--glow,
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn--glow::after,
.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn--glow:hover::after,
.btn-glow:hover::after {
    opacity: 1;
}

/* Legacy admin-on-theme__btn aliases */
.admin-on-theme__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.admin-on-theme__btn--primary {
    background: linear-gradient(135deg, var(--ase-primary) 0%, var(--ase-primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2);
}

.admin-on-theme__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
}

.admin-on-theme__btn--ghost {
    background: white;
    color: var(--ase-primary-dark);
    border: 1px solid var(--ase-outline-variant);
}

.admin-on-theme__btn--ghost:hover {
    background: var(--ase-surface-container-low);
    border-color: var(--ase-primary);
}

.admin-on-theme__btn--danger {
    background: var(--ase-danger);
    color: white;
}

.admin-on-theme__btn--sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.admin-on-theme__btn--lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

/* ============================================================
   Stats Cards
   ============================================================ */
.admin-on-theme__stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card--total::before { background: linear-gradient(90deg, #228B22 0%, #006400 100%); }
.stat-card--pending::before { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.stat-card--quoted::before, .stat-card--processed::before { background: linear-gradient(90deg, #228B22 0%, #32CD32 100%); }
.stat-card--approved::before, .stat-card--accepted::before { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.stat-card--rejected::before { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }
.stat-card--average::before { background: linear-gradient(90deg, #228B22 0%, #32CD32 100%); }
.stat-card--filled::before { background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); }
.stat-card--started::before, .stat-card--in-progress::before { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.stat-card--submitted::before { background: linear-gradient(90deg, #228B22 0%, #32CD32 100%); }

.stat-card__icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ase-text);
    margin-bottom: 0.25rem;
}

.stat-card__label {
    font-size: 0.75rem;
    color: var(--ase-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   Filters Section
   ============================================================ */
.admin-on-theme__filters {
    background: white;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-on-theme__filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-on-theme__filters-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ase-text);
    margin: 0;
}

.admin-on-theme__filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.admin-on-theme__filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-on-theme__filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ase-text);
}

.admin-on-theme__filter-group--actions {
    justify-content: flex-end;
}

.admin-on-theme__filter-input,
.admin-on-theme__filter-select {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 0.625rem;
    font-size: 0.9rem;
    color: var(--ase-text);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.admin-on-theme__filter-input:focus,
.admin-on-theme__filter-select:focus {
    outline: none;
    border-color: var(--ase-primary);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

/* ============================================================
   Grid Layout (Two Column)
   ============================================================ */
.admin-on-theme__section {
    margin-top: 2rem;
}

.admin-on-theme__grid {
    display: grid;
    gap: 1.5rem;
}

.admin-on-theme__grid--two-col {
    grid-template-columns: 1fr 320px;
}

.admin-on-theme__grid-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-on-theme__grid-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .admin-on-theme__grid--two-col {
        grid-template-columns: 1fr;
    }
    
    .admin-on-theme__grid-sidebar {
        order: -1;
    }
}

/* ============================================================
   Card Component
   ============================================================ */
.admin-on-theme__card {
    background: white;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 1rem;
    overflow: hidden;
}

.admin-on-theme__card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--ase-surface-container-low);
    border-bottom: 1px solid var(--ase-outline-variant);
}

.admin-on-theme__card-header h2,
.admin-on-theme__card-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ase-text-primary, #111);
}

.admin-on-theme__card-header--primary {
    background: linear-gradient(135deg, var(--ase-primary-container) 0%, var(--ase-surface-container-low) 100%);
    border-bottom-color: var(--ase-primary);
}

.admin-on-theme__card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ase-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-on-theme__card-title i,
.admin-on-theme__card-title .fas {
    color: var(--ase-primary);
}

.admin-on-theme__card-body {
    padding: 1.25rem;
}

/* ============================================================
   Details Grid (Key-Value Pairs)
   ============================================================ */
.admin-on-theme__details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__detail-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ase-surface-container);
}

.admin-on-theme__detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-on-theme__detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ase-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-on-theme__detail-value {
    font-size: 0.9rem;
    color: var(--ase-text);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .admin-on-theme__detail-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ============================================================
   Timeline
   ============================================================ */
.admin-on-theme__timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
}

.admin-on-theme__timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2.5rem;
    bottom: -1rem;
    width: 2px;
    background: var(--ase-outline-variant);
}

.admin-on-theme__timeline-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ase-surface-container);
    border: 2px solid var(--ase-outline-variant);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.admin-on-theme__timeline-icon--info {
    background: var(--ase-info-container);
    border-color: var(--ase-info);
    color: var(--ase-info);
}

.admin-on-theme__timeline-icon--success {
    background: var(--ase-primary-container);
    border-color: var(--ase-primary);
    color: var(--ase-primary);
}

.admin-on-theme__timeline-icon--warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #b45309;
}

.admin-on-theme__timeline-icon--danger {
    background: var(--ase-danger-container);
    border-color: var(--ase-danger);
    color: var(--ase-danger);
}

.admin-on-theme__timeline-content {
    flex: 1;
    padding-bottom: 0.5rem;
}

.admin-on-theme__timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.admin-on-theme__timeline-header strong {
    font-weight: 600;
    color: var(--ase-text);
}

.admin-on-theme__timeline-date {
    font-size: 0.75rem;
    color: var(--ase-text-muted);
}

.admin-on-theme__timeline-details {
    font-size: 0.85rem;
    color: var(--ase-text-muted);
    line-height: 1.5;
}

/* ============================================================
   Forms
   ============================================================ */
.admin-on-theme__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-on-theme__form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-on-theme__form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ase-text);
}

.admin-on-theme__form-textarea,
.admin-on-theme__form-input,
.admin-on-theme__form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 0.625rem;
    font-size: 0.9rem;
    color: var(--ase-text);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.admin-on-theme__form-textarea:focus,
.admin-on-theme__form-input:focus,
.admin-on-theme__form-select:focus {
    outline: none;
    border-color: var(--ase-primary);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.admin-on-theme__form-textarea {
    resize: vertical;
    min-height: 100px;
}

.admin-on-theme__form-hint {
    font-size: 0.8rem;
    color: var(--ase-text-muted);
}

.admin-on-theme__form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

/* ============================================================
   Action List
   ============================================================ */
.admin-on-theme__action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================================
   Tabs Navigation
   ============================================================ */
.admin-on-theme__tabs {
    display: flex;
    gap: 0.25rem;
    margin: 1.5rem 0 1rem;
    border-bottom: 2px solid var(--ase-outline-variant);
    overflow-x: auto;
    padding-bottom: 0;
}

.admin-on-theme__tab {
    padding: 0.75rem 1.25rem;
    color: var(--ase-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-on-theme__tab:hover {
    color: var(--ase-primary-dark);
    border-bottom-color: var(--ase-primary-light);
}

.admin-on-theme__tab--active {
    color: var(--ase-primary-dark);
    border-bottom-color: var(--ase-primary);
    font-weight: 600;
}

/* ============================================================
   Service Tags (color-coded per-service status)
   ============================================================ */
.admin-on-theme__service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-on-theme__service-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
}

.admin-on-theme__service-tag--pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.3);
}

.admin-on-theme__service-tag--approved {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.admin-on-theme__service-tag--rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
}

.admin-on-theme__service-tag--inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border-color: rgba(107, 114, 128, 0.3);
}

.admin-on-theme__service-tag-primary {
    color: #f59e0b;
    font-size: 0.85rem;
    margin-left: 0.15rem;
}

/* ============================================================
   Checkbox
   ============================================================ */
.admin-on-theme__checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

.admin-on-theme__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.admin-on-theme__checkbox-mark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid var(--ase-outline-variant);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.admin-on-theme__checkbox input[type="checkbox"]:hover + .admin-on-theme__checkbox-mark {
    border-color: var(--ase-primary);
}

.admin-on-theme__checkbox input[type="checkbox"]:checked + .admin-on-theme__checkbox-mark {
    background: var(--ase-primary);
    border-color: var(--ase-primary);
}

.admin-on-theme__checkbox input[type="checkbox"]:checked + .admin-on-theme__checkbox-mark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.admin-on-theme__checkbox input[type="checkbox"]:focus + .admin-on-theme__checkbox-mark {
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.15);
}

/* ============================================================
   Inline Badges
   ============================================================ */
.admin-on-theme__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-on-theme__badge--primary {
    background: var(--ase-primary-container);
    color: var(--ase-primary-dark);
}

.admin-on-theme__badge--info {
    background: var(--ase-info-container);
    color: var(--ase-info);
}

.admin-on-theme__badge--success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.admin-on-theme__badge--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.admin-on-theme__badge--danger {
    background: var(--ase-danger-container);
    color: var(--ase-danger);
}

/* ============================================================
   Status Badges (Extended)
   ============================================================ */
.admin-on-theme__status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.admin-on-theme__status-badge--pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.admin-on-theme__status-badge--approved,
.admin-on-theme__status-badge--accepted {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.admin-on-theme__status-badge--rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.admin-on-theme__status-badge--submitted {
    background: rgba(34, 139, 34, 0.1);
    color: #006400;
}

.admin-on-theme__status-badge--under-review {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

/* ============================================================
   Button Variants (Missing)
   ============================================================ */
.admin-on-theme__btn--success,
.btn--success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.admin-on-theme__btn--success:hover,
.btn--success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.admin-on-theme__btn--block,
.btn--block {
    width: 100%;
    justify-content: flex-start;
}

/* ============================================================
   Standalone Table (No Section Wrapper)
   ============================================================ */
.admin-on-theme__table {
    width: 100%;
    border-collapse: collapse;
}

.admin-on-theme__table thead {
    background: var(--ase-surface-container-low);
    border-bottom: 2px solid var(--ase-outline-variant);
}

.admin-on-theme__table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ase-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-on-theme__table tbody tr {
    border-bottom: 1px solid var(--ase-outline-variant);
    transition: background 0.15s ease;
}

.admin-on-theme__table tbody tr:hover {
    background: var(--ase-primary-container);
}

.admin-on-theme__table tbody tr:last-child {
    border-bottom: none;
}

.admin-on-theme__table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--ase-text);
    vertical-align: middle;
}

/* ============================================================
   Table Section
   ============================================================ */
.admin-on-theme__table-section {
    background: white;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.admin-on-theme__table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--ase-surface-container-low);
    border-bottom: 1px solid var(--ase-outline-variant);
}

.admin-on-theme__table-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ase-text);
    margin: 0;
}

.admin-on-theme__record-count {
    font-size: 0.875rem;
    color: var(--ase-text-muted);
}

.admin-on-theme__table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--ase-surface-container-low);
    border-bottom: 2px solid var(--ase-outline-variant);
}

.data-table thead th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ase-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--ase-outline-variant);
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: var(--ase-primary-container);
}

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

.data-table tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--ase-text);
    vertical-align: middle;
}

/* Table Cell Variants */
.table-link {
    font-family: monospace;
    font-weight: 600;
    color: var(--ase-primary);
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.table-cell-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.table-cell-primary {
    font-weight: 600;
}

.table-cell-secondary {
    font-size: 0.75rem;
    color: var(--ase-text-muted);
}

.table-cell-simple {
    font-size: 0.875rem;
}

.table-amount {
    font-weight: 700;
    color: #059669;
}

/* Action Buttons in Table - Solid colored, rounded with border, no icons */
.admin-on-theme__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-on-theme__action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}

/* View - Lighter green outline (subtle/secondary) */
.admin-on-theme__action-btn--view {
    background: var(--ase-surface-container-low);
    color: var(--ase-primary-dark);
    border-color: var(--ase-outline-variant);
}

.admin-on-theme__action-btn--view:hover {
    background: var(--ase-primary-container);
    border-color: var(--ase-primary);
    color: var(--ase-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 139, 34, 0.15);
}

/* Edit - Green (primary brand) */
.admin-on-theme__action-btn--edit {
    background: var(--ase-primary-container);
    color: var(--ase-primary-dark);
    border-color: var(--ase-primary);
}

.admin-on-theme__action-btn--edit:hover {
    background: var(--ase-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 139, 34, 0.25);
}

/* Delete/Reject - Red */
.admin-on-theme__action-btn--delete,
.admin-on-theme__action-btn--reject {
    background: var(--ase-danger-container);
    color: var(--ase-danger);
    border-color: var(--ase-danger);
}

.admin-on-theme__action-btn--delete:hover,
.admin-on-theme__action-btn--reject:hover {
    background: var(--ase-danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Approve/Accept/Convert - Solid green */
.admin-on-theme__action-btn--approve,
.admin-on-theme__action-btn--convert,
.admin-on-theme__action-btn--accept {
    background: var(--ase-primary);
    color: white;
    border-color: var(--ase-primary);
}

.admin-on-theme__action-btn--approve:hover,
.admin-on-theme__action-btn--convert:hover,
.admin-on-theme__action-btn--accept:hover {
    background: var(--ase-primary-light);
    color: white;
    border-color: var(--ase-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 139, 34, 0.4);
}

/* Resend/Assign/Edit neutral - Amber */
.admin-on-theme__action-btn--resend,
.admin-on-theme__action-btn--assign {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-color: #f59e0b;
}

.admin-on-theme__action-btn--resend:hover,
.admin-on-theme__action-btn--assign:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* ============================================================
   Status Badges
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-badge--draft { background: rgba(107, 114, 128, 0.1); color: #374151; }
.status-badge--submitted { background: rgba(34, 139, 34, 0.1); color: #006400; }
.status-badge--under-review { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.status-badge--quoted,
.status-badge--pending,
.status-badge--processed { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.status-badge--approved,
.status-badge--accepted { background: rgba(16, 185, 129, 0.1); color: #047857; }
.status-badge--rejected { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.status-badge--cancelled { background: rgba(156, 163, 175, 0.1); color: #4b5563; }
.status-badge--converted { background: rgba(34, 139, 34, 0.1); color: #166534; }
.status-badge--paid { background: rgba(16, 185, 129, 0.1); color: #047857; }
.status-badge--internal { background: rgba(34, 139, 34, 0.1); color: #166534; }
.status-badge--inactive { background: rgba(156, 163, 175, 0.1); color: #4b5563; }
.status-badge--filled,
.status-badge--assigned { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.status-badge--started,
.status-badge--in-progress { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.status-badge--partial { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.status-badge--unpaid { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.status-badge--converted-to-job { background: rgba(34, 139, 34, 0.1); color: #166534; }
.status-badge--declined { background: rgba(156, 163, 175, 0.1); color: #4b5563; }

/* ============================================================
   Empty State
   ============================================================ */
.admin-on-theme__empty {
    text-align: center;
    padding: 3rem 2rem;
}

.admin-on-theme__empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.admin-on-theme__empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ase-text);
    margin: 0 0 0.5rem;
}

.admin-on-theme__empty p {
    color: var(--ase-text-muted);
    margin: 0;
}

.admin-on-theme__empty a {
    color: var(--ase-primary);
}

/* ============================================================
   Pagination
   ============================================================ */
.admin-on-theme__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-on-theme__pagination-info {
    font-size: 0.875rem;
    color: var(--ase-text-muted);
}

.admin-on-theme__pagination-nav {
    display: flex;
    gap: 0.5rem;
}

.admin-on-theme__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 0.5rem;
    background: white;
    color: var(--ase-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.admin-on-theme__pagination-link:hover {
    background: var(--ase-primary);
    color: white;
    border-color: var(--ase-primary);
}

.admin-on-theme__pagination-link--active {
    background: var(--ase-primary);
    color: white;
    border-color: var(--ase-primary);
}

/* ============================================================
   Workflow Help
   ============================================================ */
.workflow-help {
    background: var(--ase-primary-container);
    border: 1px solid var(--ase-primary);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.workflow-help summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ase-primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-help__toggle {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--ase-text-muted);
    margin-left: auto;
}

.workflow-help__content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-primary);
    color: var(--ase-primary-dark);
    font-size: 0.9rem;
    line-height: 1.6;
}

.workflow-help__content p {
    margin: 0 0 0.75rem;
}

.workflow-help__content ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.workflow-help__content code {
    background: rgba(0,0,0,0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .admin-on-theme {
        padding: 1rem 1rem 3rem;
    }

    .admin-on-theme__hero-inner {
        padding: 2rem;
        border-radius: 1.5rem;
    }

    .admin-on-theme__stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-on-theme__filters-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .admin-on-theme__hero-inner {
        padding: 1.5rem;
    }

    .admin-on-theme__hero-title {
        font-size: 1.75rem;
    }

    .admin-on-theme__stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-on-theme__filters-row {
        grid-template-columns: 1fr;
    }

    .admin-on-theme__filter-group--actions {
        flex-direction: column;
    }

    .admin-on-theme__filter-group--actions .admin-on-theme__btn {
        width: 100%;
    }

    .admin-on-theme__pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-on-theme__pagination-nav {
        justify-content: center;
    }
}

/* ============================================================
   Breadcrumb Trail
   ------------------------------------------------------------
   Used by views that need a Home › Section › Current breadcrumb
   above their hero (KB articles, etc.). Renders from a list of
   crumbs passed by the view as an array of {url, label}; the
   last crumb is rendered as a non-link <span>.
   ============================================================ */
.admin-on-theme__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    font-size: 0.875rem;
    color: var(--ase-text-muted);
}

.admin-on-theme__breadcrumb a {
    color: var(--ase-primary-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

.admin-on-theme__breadcrumb a:hover {
    color: var(--ase-primary);
    text-decoration: underline;
}

.admin-on-theme__breadcrumb-separator {
    color: var(--ase-outline);
    user-select: none;
}

.admin-on-theme__breadcrumb-current {
    color: var(--ase-text);
    font-weight: 500;
}

/* ============================================================
   Sidebar Nav List (used inside grid-sidebar cards)
   ------------------------------------------------------------
   Vertical category tree rendered alongside KB list views.
   Modifier --child indents a sub-level link; --active marks
   the current page with the primary background.
   ============================================================ */
.admin-on-theme__nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-on-theme__nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--ase-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.admin-on-theme__nav-link:hover {
    background: var(--ase-primary-container);
    color: var(--ase-primary-dark);
}

.admin-on-theme__nav-link--child {
    padding-left: 2rem;
    font-size: 0.85rem;
    font-weight: 400;
}

.admin-on-theme__nav-link--active,
.admin-on-theme__nav-link--active:hover {
    background: var(--ase-primary);
    color: var(--ase-on-primary);
}

/* ============================================================
   Modal
   ------------------------------------------------------------
   Centered overlay dialog used for inline-editing (e.g. category
   rename). Pair with [data-modal-open="id"] / [data-modal-close]
   buttons and a tiny JS toggle — class .admin-on-theme__modal--open
   shows the overlay.
   ============================================================ */
.admin-on-theme__modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-on-theme__modal--open {
    display: flex;
}

.admin-on-theme__modal-content {
    background: var(--modal-bg);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
}

.admin-on-theme__modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant);
    margin-top: 1rem;
}

/* ============================================================
   Utility Modifiers + KB-specific blocks
   ------------------------------------------------------------
   Small, reusable patterns that surfaced during the KB migration.
   Keeping them in the design system so views stay inline-style-free.
   ============================================================ */

/* Generic flex row — wraps, centred, gap 0.5rem (used for badge rows) */
.admin-on-theme__row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Hidden row (used by filter-pill JS to hide table rows without inline styles) */
.admin-on-theme__row--hidden {
    display: none;
}

/* Button group — flex row, gap 0.5rem, no wrap by default */
.admin-on-theme__btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Vertical utility — nudge content down 1rem without inline style */
.admin-on-theme__mt-1 { margin-top: 1rem; }

/* Render a <form> inline so it sits next to a sibling button (e.g. Delete) */
.admin-on-theme__inline-form { display: inline; }

/* Search/text input that grows to fill but caps at 24rem (hero search form) */
.admin-on-theme__input-flex {
    flex: 1;
    max-width: 24rem;
}

/* Muted subtitle line rendered below a card title (e.g. article excerpt) */
.admin-on-theme__card-subtitle {
    margin: 0.75rem 0 0;
    color: var(--ase-text-muted);
}

/* Icon-led meta line below a card body (category / author / date / views) */
.admin-on-theme__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--ase-text-muted);
}

/* Top-bordered footer with right-aligned admin actions (Edit / Delete) */
.admin-on-theme__card-actions {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--ase-outline-variant);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Top-bordered footer with last-updated text on the left + nav buttons right */
.admin-on-theme__card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--ase-outline-variant);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Details-grid with extra bottom space (used above the article body) */
.admin-on-theme__details-grid--spaced { margin-bottom: 1.5rem; }

/* Rich-text editor host (Quill container) inside the article form */
.admin-on-theme__editor-host {
    min-height: 450px;
    background: white;
    border: 1px solid var(--ase-outline-variant);
    border-radius: 0.625rem;
}

/* Multi-select form field (e.g. role assignment — taller than single select) */
.admin-on-theme__form-select--multi { height: 120px; }

/* Small muted text under a table cell (e.g. category description) */
.admin-on-theme__description {
    color: var(--ase-text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Indented child row inside a tree-like table (subcategory cells) */
.admin-on-theme__category-child {
    padding-left: 2.5rem;
    color: var(--ase-text-muted);
}

/* Upload-page error summary */
.admin-on-theme__upload-errors {
    color: var(--ase-danger);
    margin-bottom: 1rem;
}

/* Dark Theme (Deep Forest Green Design System) */
[data-theme="dark"] {
    --ase-primary: #15803d;
    --ase-primary-dark: #0f5c2b;
    --ase-primary-light: #22c55e;
    --ase-primary-container: #0d381b;
    --ase-on-primary: #ffffff;
    --ase-secondary: #334155;
    --ase-tertiary: #042f13;
    --ase-tertiary-light: #86efac;
    
    --ase-surface: #070d08;
    --ase-surface-container-low: #0d170f;
    --ase-surface-container: #132216;
    --ase-surface-container-high: #1a2e1e;
    --ase-surface-dim: #0a130b;
    
    --ase-outline: #2d5234;
    --ase-outline-variant: #203b25;
    
    --ase-danger: #ef4444;
    --ase-danger-container: #450a0a;
    --ase-info-container: #083344;
    --ase-info: #06b6d4;
    
    --ase-text: #f0fdf4;
    --ase-text-muted: #94a3b8;
    
    --modal-bg: #0f1e11;
    --modal-header-bg: #152818;
    --primary-gradient: linear-gradient(135deg, #15803d 0%, #0b4620 100%);
    --primary-glow: 0 0 20px rgba(34, 197, 94, 0.35);
    --border-color: #203b25;
    --input-focus: #22c55e;
    --text-main: #f0fdf4;
    --text-muted: #94a3b8;
    --shadow-premium: 0 20px 30px -10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(22, 128, 61, 0.15);
}

[data-theme="dark"] body,
body[data-theme="dark"] {
    background-color: var(--ase-surface, #070d08);
    color: var(--ase-text, #f0fdf4);
}

[data-theme="dark"] .admin-on-theme {
    background-color: var(--ase-surface, #070d08);
}

[data-theme="dark"] .admin-on-theme__hero-inner {
    background: linear-gradient(135deg, #0b1a0e 0%, #142e18 60%, #0d2412 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(74, 222, 128, 0.15);
}

[data-theme="dark"] .admin-on-theme__hero-glow {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, rgba(21, 128, 61, 0.15) 60%, transparent 80%);
    opacity: 0.7;
    filter: blur(55px);
}

[data-theme="dark"] .admin-on-theme__hero-badge {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .admin-on-theme__filters,
[data-theme="dark"] .admin-on-theme__table-section {
    background: #101d12;
    border-color: #1f3823;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .stat-card:hover {
    border-color: #22c55e;
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.7), 0 0 18px rgba(34, 197, 94, 0.25);
    transform: translateY(-3px);
}

[data-theme="dark"] .admin-on-theme__btn--ghost {
    background: rgba(21, 128, 61, 0.15);
    color: #86efac;
    border: 1px solid #203b25;
}

[data-theme="dark"] .admin-on-theme__btn--ghost:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(34, 197, 94, 0.12);
}

[data-theme="dark"] .admin-on-theme__hero-title,
[data-theme="dark"] .admin-on-theme__table-title,
[data-theme="dark"] .stat-card__value {
    color: #f0fdf4;
}

[data-theme="dark"] .workflow-help {
    background: rgba(21, 128, 61, 0.18);
    border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .workflow-help summary {
    color: #86efac;
}

[data-theme="dark"] .workflow-help__content {
    color: #f0fdf4;
    border-top-color: rgba(34, 197, 94, 0.3);
}

/* Dark theme: Cards */
[data-theme="dark"] .admin-on-theme__card {
    background: #101d12;
    border-color: #1f3823;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .admin-on-theme__card-header {
    background: #0b150c;
    border-bottom-color: #1f3823;
}

[data-theme="dark"] .admin-on-theme__card-header--primary {
    background: rgba(21, 128, 61, 0.25);
    border-bottom: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .admin-on-theme__card-title {
    color: #f0fdf4;
}

[data-theme="dark"] .admin-on-theme__detail-item {
    border-bottom-color: #182c1b;
}

[data-theme="dark"] .admin-on-theme__detail-label {
    color: #94a3b8;
}

[data-theme="dark"] .admin-on-theme__detail-value {
    color: #f0fdf4;
}

/* Dark theme: Timeline */
[data-theme="dark"] .admin-on-theme__timeline-icon {
    background: #132216;
    border-color: #22c55e;
    color: #4ade80;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .admin-on-theme__timeline-item:not(:last-child)::before {
    background: #1f3823;
}

[data-theme="dark"] .admin-on-theme__timeline-header strong {
    color: #f0fdf4;
}

[data-theme="dark"] .admin-on-theme__timeline-date {
    color: #94a3b8;
}

/* Dark theme: Forms */
[data-theme="dark"] .admin-on-theme__form-textarea,
[data-theme="dark"] .admin-on-theme__form-input,
[data-theme="dark"] .admin-on-theme__form-select {
    background: #09120a;
    border-color: #203b25;
    color: #f0fdf4;
}

[data-theme="dark"] .admin-on-theme__form-textarea:focus,
[data-theme="dark"] .admin-on-theme__form-input:focus,
[data-theme="dark"] .admin-on-theme__form-select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    outline: none;
}

[data-theme="dark"] .admin-on-theme__form-label {
    color: #f0fdf4;
}

/* Dark theme: Table (standalone) */
[data-theme="dark"] .admin-on-theme__table {
    color: #f0fdf4;
}

[data-theme="dark"] .admin-on-theme__table thead {
    background: #0b150c;
    border-bottom-color: #1f3823;
}

[data-theme="dark"] .admin-on-theme__table thead th {
    color: #86efac;
}

[data-theme="dark"] .admin-on-theme__table tbody tr {
    border-bottom-color: #182c1b;
}

[data-theme="dark"] .admin-on-theme__table tbody tr:hover {
    background: rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .admin-on-theme__table tbody td {
    color: #e2e8f0;
}

/* ============================================================
   Location Pair field (BEM: admin-on-theme__location-pair__*)
   ------------------------------------------------------------
   Used by the pickup + dropoff autocomplete field in quote + job forms.
   BEM convention:
     .admin-on-theme__location-pair                           (block)
     .admin-on-theme__location-pair__<element>                (element)
     .admin-on-theme__location-pair--<modifier>               (modifier/variant)
     .admin-on-theme__location-pair__<element>--<modifier>    (element modifier)
   ============================================================ */

.admin-on-theme__location-pair {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Two-column grid for pickup + dropoff inputs */
.admin-on-theme__location-pair__locations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    .admin-on-theme__location-pair__locations {
        grid-template-columns: 1fr;
    }
}

/* Wrapper for each pickup/dropoff column (anchors the suggestion dropdown) */
.admin-on-theme__location-pair__input-wrap {
    position: relative;
}

/* Autocomplete suggestion dropdown (Nominatim results) */
.admin-on-theme__location-pair__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
}

.admin-on-theme__location-pair__suggestion {
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}

.admin-on-theme__location-pair__suggestion:hover {
    background-color: #f0fdf4;
}

.admin-on-theme__location-pair__suggestion:last-child {
    border-bottom: 0;
}

.admin-on-theme__location-pair__suggestion--empty {
    color: #9ca3af;
    cursor: default;
    font-style: italic;
}

.admin-on-theme__location-pair__suggestion--empty:hover {
    background-color: transparent;
}

.admin-on-theme__location-pair__suggestion--loading {
    color: #6b7280;
    cursor: default;
    font-style: italic;
}

.admin-on-theme__location-pair__suggestion--loading:hover {
    background-color: transparent;
}

.admin-on-theme__location-pair__suggestion-primary {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.admin-on-theme__location-pair__suggestion-secondary {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Leaflet map container */
.admin-on-theme__location-pair__map {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin: 0.75rem 0;
    display: none;
    z-index: 0;
}

/* Numbered Leaflet marker pin (1 = pickup, 2 = dropoff) */
.admin-on-theme__location-pair__marker {
    background: transparent !important;
    border: none !important;
}

.admin-on-theme__location-pair__marker-pin {
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.admin-on-theme__location-pair__marker-pin--ghost {
    opacity: 0.6;
    animation: admin-on-theme__location-pair-pulse 1.4s ease-in-out infinite;
}

@keyframes admin-on-theme__location-pair-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.55; }
    50%      { transform: scale(1.15); opacity: 1; }
}

/* Loading spinner (used inside the suggestion dropdown + summary line) */
.admin-on-theme__location-pair__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #d1d5db;
    border-top-color: #228B22;
    border-radius: 50%;
    animation: admin-on-theme__location-pair-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}

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

/* Validation: red border on input when no-match error shown */
.admin-on-theme__location-pair .admin-on-theme__form-input--invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ============================================================
   Status Filter Tabs (used on list pages — e.g. /admin/jobs,
   /admin/services). Matches the green admin-on-theme palette.
   ============================================================ */
.admin-on-theme__status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 0 1rem 0;
    border-bottom: 1px solid var(--ase-outline-variant);
    margin-bottom: 1.25rem;
}

.admin-on-theme__status-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--ase-outline-variant);
    color: var(--ase-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.admin-on-theme__status-tab:hover {
    border-color: var(--ase-primary);
    color: var(--ase-primary-dark);
    background: var(--ase-primary-container);
}

.admin-on-theme__status-tab.active {
    background: var(--ase-primary);
    border-color: var(--ase-primary);
    color: var(--ase-on-primary);
}

.admin-on-theme__status-tab.active .admin-on-theme__tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: var(--ase-on-primary);
}

.admin-on-theme__tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--ase-surface-container-low);
    color: var(--ase-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* ============================================================
   Sortable column headers
   Used by /admin/services and any other list table that needs
   click-to-sort behaviour. The <a> inside <th> gets the
   admin-on-theme__sort-link class; the trailing span carries the
   active-column arrow.
   ============================================================ */
.data-table thead th .admin-on-theme__sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ase-primary-dark);
    text-decoration: none;
    text-transform: inherit;
    letter-spacing: inherit;
    font: inherit;
}

.data-table thead th .admin-on-theme__sort-link:hover {
    color: var(--ase-primary);
}

.data-table thead th .admin-on-theme__sort-link[aria-sort="ascending"],
.data-table thead th .admin-on-theme__sort-link[aria-sort="descending"] {
    color: var(--ase-primary);
    font-weight: 700;
}

.admin-on-theme__sort-indicator {
    display: inline-block;
    width: 0.85em;
    font-size: 0.85em;
    color: var(--ase-primary);
    line-height: 1;
}

.data-table thead th .admin-on-theme__sort-link:hover .admin-on-theme__sort-indicator {
    color: var(--ase-primary);
    opacity: 0.5;
}

.data-table thead th .admin-on-theme__sort-link[aria-sort="ascending"] .admin-on-theme__sort-indicator,
.data-table thead th .admin-on-theme__sort-link[aria-sort="descending"] .admin-on-theme__sort-indicator {
    opacity: 1;
}

/* ============================================================
   Filter result count line (e.g. "3 of 7 services")
   Lives next to the table title.
   ============================================================ */
.admin-on-theme__record-count--muted {
    color: var(--ase-text-muted);
    font-weight: 500;
}

/* ============================================================
   Radio Group Styling
   Used in quote form for radio field types
   ============================================================ */
.admin-on-theme__radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.admin-on-theme__radio-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ase-text);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.admin-on-theme__radio-label:hover {
    background: var(--ase-primary-container);
    border-color: var(--ase-outline);
}

.admin-on-theme__radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ase-primary);
    flex-shrink: 0;
}

/* Checkbox group styling (similar to radio) */
.admin-on-theme__checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.admin-on-theme__checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ase-text);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.admin-on-theme__checkbox-label:hover {
    background: var(--ase-primary-container);
    border-color: var(--ase-outline);
}

.admin-on-theme__checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--ase-primary);
    flex-shrink: 0;
}

/* ============================================================
   List Items (row of icon + body + meta + arrow)
   Used by dashboards and any list rendered inside a card.
   ============================================================ */
.admin-on-theme__list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ase-border-light, #f3f4f6);
}

.admin-on-theme__list-item:last-child {
    border-bottom: none;
}

.admin-on-theme__list-item--link {
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    margin: 0 -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.admin-on-theme__list-item--link:hover {
    background: var(--ase-bg-surface, #f9fafb);
}

/* Stacked variant: header row + sub-content (e.g. pattern header + day chips) */
.admin-on-theme__list-item--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.admin-on-theme__list-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.admin-on-theme__list-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.admin-on-theme__list-icon {
    flex-shrink: 0;
}

/* Round avatar (40px circle in primary colour) used as lead icon in a list-item */
.admin-on-theme__list-icon--avatar {
    width: 40px;
    height: 40px;
    background: var(--ase-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-on-theme__list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-on-theme__list-title {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--ase-text, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-on-theme__list-subtitle {
    font-size: 0.8125rem;
    color: var(--ase-text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-on-theme__list-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.admin-on-theme__list-date {
    font-size: 0.8125rem;
    color: var(--ase-text-muted, #6b7280);
    white-space: nowrap;
}

.admin-on-theme__list-arrow {
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* ============================================================
   Details Grid column variants
   Default grid is 3 columns. These modifiers override the count.
   ============================================================ */
.admin-on-theme__details-grid--two-col   { grid-template-columns: repeat(2, 1fr); }
.admin-on-theme__details-grid--three-col { grid-template-columns: repeat(3, 1fr); }
.admin-on-theme__details-grid--four-col  { grid-template-columns: repeat(4, 1fr); }
.admin-on-theme__details-grid--six-col   { grid-template-columns: repeat(6, 1fr); }
.admin-on-theme__details-grid--seven-col { grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }

/* ============================================================
   Stat Tile (icon + value + label row, used in hero / dashboards)
   Use as a single compact card on a backgound-tinted base.
   ============================================================ */
.admin-on-theme__stat-tile {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
}

.admin-on-theme__stat-tile__icon {
    font-size: 1.75rem;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ase-primary);
    color: #fff;
    border-radius: 12px;
}

.admin-on-theme__stat-tile__body {
    flex: 1;
    line-height: 1.15;
}

.admin-on-theme__stat-tile__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ase-text, #111827);
    line-height: 1;
}

.admin-on-theme__stat-tile__label {
    font-size: 0.72rem;
    color: var(--ase-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* ============================================================
   Day-chip — small availability indicator (green = available)
   ============================================================ */
.admin-on-theme__day-chip {
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    background: var(--ase-bg-surface, #f3f4f6);
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-on-theme__day-chip--available {
    background: var(--ase-primary);
    color: #fff;
}

/* ============================================================
   Status Grid + Status Tile (compact centred stat cards)
   The admin dashboard uses this pattern: a 3-column grid of small
   bordered tiles, each showing a value + label, centred.
   ============================================================ */
.admin-on-theme__status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .admin-on-theme__status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-on-theme__status-tile {
    background: var(--ase-bg-surface, #f9fafb);
    border: 1px solid var(--ase-border, #e5e7eb);
    border-radius: var(--ase-radius-md, 0.5rem);
    padding: 0.875rem;
    text-align: center;
}

.admin-on-theme__status-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ase-text, #111827);
    line-height: 1.2;
}

.admin-on-theme__status-tile-label {
    font-size: 0.75rem;
    color: var(--ase-text-muted, #6b7280);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

/* ============================================================
   Text and layout utilities
   ============================================================ */
.admin-on-theme__text-right { text-align: right; }

.admin-on-theme__card-subtitle {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--ase-text, #111827);
}

/* ============================================================
   Status messages (informational banner inside a card body)
   ============================================================ */
.admin-on-theme__status-message {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--ase-bg-surface, #f9fafb);
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__status-message--success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.admin-on-theme__status-message--error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

/* ============================================================
   Service grid (cards-on-a-grid for the contractor services page)
   ============================================================ */
.admin-on-theme__service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.admin-on-theme__service-card {
    border: 1px solid var(--ase-outline-variant);
    border-radius: 0.75rem;
    padding: 1rem;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-on-theme__service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.admin-on-theme__service-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ase-text, #111827);
}

.admin-on-theme__service-card-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ase-text-muted, #6b7280);
}

/* ============================================================
   Alert (flash messages at the top of a page)
   ============================================================ */
.admin-on-theme__alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.admin-on-theme__alert--success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.admin-on-theme__alert--error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
}

.admin-on-theme__alert--info {
    background: rgba(33, 150, 243, 0.1);
    color: #0c5460;
    border-color: rgba(33, 150, 243, 0.3);
}

/* ============================================================
   Modal helpers
   ------------------------------------------------------------
   Pair with .admin-on-theme__modal / .admin-on-theme__modal-content
   (see the Modal block above). These cover the parts that the
   vanilla modal base doesn't define: X close button, and the
   optional inline regions that need to be toggled by JS.
   ============================================================ */
.admin-on-theme__modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ase-text-muted, #6b7280);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.admin-on-theme__modal-close:hover {
    background: var(--ase-bg-surface, #f5f5f5);
    color: var(--ase-text, #111827);
}

.admin-on-theme__availability-options {
    display: none;
    margin-top: 1rem;
}

.admin-on-theme__availability-options--open {
    display: block;
}

.admin-on-theme__admin-notes {
    display: none;
    margin-bottom: 1rem;
}

.admin-on-theme__admin-notes--show {
    display: block;
}

/* ============================================================
   Security page additions (dashboard/security.php)
   ------------------------------------------------------------
   Alert variant, color utilities, score ring, feature tiles,
   danger zone, password strength meter, login-history table.
   ============================================================ */

/* Warning variant for flash messages */
.admin-on-theme__alert--warning {
    background: rgba(234, 179, 8, 0.1);
    color: #92400e;
    border-color: rgba(234, 179, 8, 0.3);
}

/* Text color utilities */
.admin-on-theme__text-success { color: #047857; }
.admin-on-theme__text-warning { color: #b45309; }
.admin-on-theme__text-danger  { color: #b91c1c; }
.admin-on-theme__text-muted   { color: var(--ase-text-muted, #6b7280); }

/* Score tile (card inside a 3-col details grid on security page) */
.admin-on-theme__score-tile {
    background: var(--ase-bg-surface, #f9fafb);
    border: 1px solid var(--ase-border, #e5e7eb);
    border-radius: var(--ase-radius-md, 0.75rem);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.admin-on-theme__score-tile .admin-on-theme__card-subtitle {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    align-self: stretch;
    text-align: left;
    margin: 0 0 0.5rem 0;
}

/* Score ring (SVG circular progress) */
.admin-on-theme__score-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.admin-on-theme__score-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.admin-on-theme__score-ring-track {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}

.admin-on-theme__score-ring-fill {
    fill: none;
    stroke-width: 3;
    transition: stroke-dasharray 0.4s ease;
}

.admin-on-theme__score-ring--green  { stroke: #22c55e; }
.admin-on-theme__score-ring--yellow { stroke: #eab308; }
.admin-on-theme__score-ring--orange { stroke: #f97316; }
.admin-on-theme__score-ring--red    { stroke: #ef4444; }

.admin-on-theme__score-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.admin-on-theme__score-ring-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ase-text, #111827);
    line-height: 1;
}

.admin-on-theme__score-ring-label {
    font-size: 0.65rem;
    color: var(--ase-text-muted, #6b7280);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.admin-on-theme__score-label {
    font-weight: 600;
}

/* Login-stat list (label + value rows) */
.admin-on-theme__stat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-self: stretch;
}

.admin-on-theme__stat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.admin-on-theme__stat-list-value {
    font-weight: 600;
    color: var(--ase-text, #111827);
}

/* Security checklist */
.admin-on-theme__checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-self: stretch;
}

.admin-on-theme__checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__check-icon {
    display: inline-flex;
    width: 1.25rem;
    justify-content: center;
    font-weight: 700;
}

.admin-on-theme__check-icon--ok   { color: #22c55e; }
.admin-on-theme__check-icon--warn { color: #f97316; }
.admin-on-theme__check-icon--fail { color: #ef4444; }

/* Feature tile (3 security cards: Password / 2FA / Sessions) */
.admin-on-theme__feature-tile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-on-theme__feature-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ase-primary, #2563eb);
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-on-theme__feature-tile-title {
    font-weight: 600;
    color: var(--ase-text, #111827);
    font-size: 1.1rem;
}

.admin-on-theme__card-header--accent {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(34, 197, 94, 0.04) 100%);
}

/* Danger zone */
.admin-on-theme__card-header--danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
}

.admin-on-theme__danger-zone {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
}

.admin-on-theme__danger-zone-icon {
    width: 48px;
    height: 48px;
    background: #ef4444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-on-theme__danger-zone-content {
    flex: 1;
}

.admin-on-theme__danger-zone-title {
    font-weight: 600;
    color: #b91c1c;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.admin-on-theme__danger-zone-text {
    color: #7f1d1d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.admin-on-theme__danger-zone-list {
    margin: 0.5rem 0 1.5rem 1.5rem;
    color: #7f1d1d;
    font-size: 0.9rem;
}

/* Password change form */
.admin-on-theme__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 700px) {
    .admin-on-theme__form-row {
        grid-template-columns: 1fr;
    }
}

/* Password strength meter */
.admin-on-theme__password-strength {
    margin: 1.5rem 0;
}

.admin-on-theme__password-strength-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.admin-on-theme__password-strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.admin-on-theme__password-strength-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.admin-on-theme__password-strength-bar {
    height: 100%;
    width: var(--strength-width, 0%);
    background: #ef4444;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.admin-on-theme__password-strength-bar[data-level="weak"]   { background: #ef4444; }
.admin-on-theme__password-strength-bar[data-level="fair"]   { background: #f97316; }
.admin-on-theme__password-strength-bar[data-level="good"]   { background: #eab308; }
.admin-on-theme__password-strength-bar[data-level="strong"] { background: #22c55e; }

.admin-on-theme__requirements {
    list-style: none;
    margin: 0.75rem 0 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--ase-text-muted, #6b7280);
}

@media (max-width: 600px) {
    .admin-on-theme__requirements {
        grid-template-columns: 1fr;
    }
}

.admin-on-theme__requirement {
    transition: color 0.3s ease;
}

.admin-on-theme__requirement--met {
    color: #22c55e;
}

.admin-on-theme__requirement--met::before {
    content: '✓ ';
    font-weight: 700;
}

/* Login history table helpers */
.admin-on-theme__login-history-table code {
    background: transparent;
    padding: 0;
    font-size: 0.85rem;
}

.admin-on-theme__login-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.admin-on-theme__login-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-on-theme__login-status-dot--ok   { background: #22c55e; }
.admin-on-theme__login-status-dot--fail { background: #ef4444; }

/* Responsive table -> stacked cards on small screens for login history */
@media (max-width: 768px) {
    .admin-on-theme__login-history-table thead {
        display: none;
    }

    .admin-on-theme__login-history-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--ase-outline-variant, #e5e7eb);
        border-radius: 8px;
        padding: 1rem;
    }

    .admin-on-theme__login-history-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }
}

/* ============================================================
   Profile page additions
   ------------------------------------------------------------
   Modal layout primitives (header / title / body / footer),
   required-field asterisk, and postcode validation feedback.
   ============================================================ */
.admin-on-theme__modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-on-theme__modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ase-text);
}

.admin-on-theme__modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant);
}

.admin-on-theme__required {
    color: var(--danger, #dc2626);
    margin-left: 0.125rem;
}

.admin-on-theme__validation-success {
    font-size: 0.8rem;
    color: #047857;
    margin-top: 0.25rem;
}

.admin-on-theme__validation-error {
    font-size: 0.8rem;
    color: #b91c1c;
    margin-top: 0.25rem;
}

/* ============================================================
   Addresses settings page
   ------------------------------------------------------------
   Two-column layout (form + saved list), address cards,
   badges, and checkbox row layout used by
   user/settings/addresses.php.
   ============================================================ */
.admin-on-theme__addresses-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.admin-on-theme__addresses-form-card {
    position: sticky;
    top: 1.5rem;
}

.admin-on-theme__address-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__checkbox-row {
    flex-direction: row;
    align-items: center;
}

.admin-on-theme__checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.admin-on-theme__saved-addresses {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__address-list {
    display: grid;
    gap: 1rem;
}

.admin-on-theme__address-card {
    position: relative;
    background: var(--ase-bg-surface, #fff);
    border: 1px solid var(--ase-border, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-on-theme__address-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.admin-on-theme__address-card--primary {
    border-color: var(--ase-primary, #228B22);
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.05) 0%, rgba(50, 205, 50, 0.02) 100%);
}

.admin-on-theme__address-primary-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-on-theme__address-type-badge {
    display: inline-block;
    background: var(--ase-bg-surface-alt, #f3f4f6);
    color: var(--ase-text-muted, #6b7280);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.admin-on-theme__address-details {
    margin: 1rem 0;
}

.admin-on-theme__address-line {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__address-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--ase-border, #e5e7eb);
}

.admin-on-theme__alert--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

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

    .admin-on-theme__addresses-form-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .admin-on-theme__address-card {
        padding: 1rem;
    }

    .admin-on-theme__address-actions {
        flex-direction: column;
    }

    .admin-on-theme__address-actions .admin-on-theme__action-btn {
        width: 100%;
        justify-content: center;
    }
}

[data-theme="dark"] .admin-on-theme__address-card {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .admin-on-theme__address-card--primary {
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.1) 0%, rgba(34, 139, 34, 0.05) 100%);
    border-color: rgba(50, 205, 50, 0.5);
}

[data-theme="dark"] .admin-on-theme__address-type-badge {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   User Settings page additions (notifications.php + related)
   ------------------------------------------------------------
   Used by app/Views/user/settings/*.php converted to the
   admin-on-theme BEM framework. Kept here (instead of inline
   styles in the view) so the look stays consistent.
   ============================================================ */

.admin-on-theme__alert--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

.admin-on-theme__badge--gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

/* Quick Actions strip (notifications.php top bar) */
.admin-on-theme__quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-on-theme__quick-actions-text {
    flex: 1;
    min-width: 0;
}

.admin-on-theme__quick-actions-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ase-text);
}

.admin-on-theme__quick-actions-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Toggle row used inside list-item (notifications.php rows) */
.admin-on-theme__list-item--toggle {
    padding: 1rem 1.25rem;
    border: 1px solid var(--ase-border-light, #f3f4f6);
    border-radius: 0.625rem;
    margin-bottom: 0.75rem;
    background: var(--ase-bg-surface, #fff);
}

.admin-on-theme__list-item--toggle:last-child {
    margin-bottom: 0;
}

.admin-on-theme__list-item--disabled {
    opacity: 0.6;
}

/* iOS-style toggle switch */
.admin-on-theme__toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.admin-on-theme__toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.admin-on-theme__toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #d1d5db;
    transition: background-color 0.2s ease;
    border-radius: 26px;
}

.admin-on-theme__toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    transition: transform 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-on-theme__toggle-input:checked + .admin-on-theme__toggle-slider {
    background: var(--ase-primary, #228B22);
}

.admin-on-theme__toggle-input:checked + .admin-on-theme__toggle-slider::before {
    transform: translateX(22px);
}

.admin-on-theme__toggle-input:disabled + .admin-on-theme__toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

.admin-on-theme__toggle-input:focus-visible + .admin-on-theme__toggle-slider {
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.25);
}

/* Info box (notifications.php note + help highlights) */
.admin-on-theme__info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(50, 205, 50, 0.08);
    border: 1px solid rgba(34, 139, 34, 0.2);
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.admin-on-theme__info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    color: var(--ase-primary, #228B22);
}

.admin-on-theme__info-content {
    flex: 1;
    font-size: 0.95rem;
    color: var(--ase-text);
    line-height: 1.6;
}

/* Help sections (notifications.php help card) */
.admin-on-theme__help-content {
    display: grid;
    gap: 1.25rem;
}

.admin-on-theme__help-section {
    padding: 1.25rem 1.5rem;
    background: var(--ase-bg-surface, #f9fafb);
    border-left: 4px solid var(--ase-primary, #2563eb);
    border-radius: 0.5rem;
}

.admin-on-theme__help-section p {
    margin: 0 0 0.5rem;
    color: var(--ase-text);
    line-height: 1.5;
}

.admin-on-theme__help-section ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--ase-text-muted);
    font-size: 0.9rem;
}

.admin-on-theme__help-section li {
    margin-bottom: 0.25rem;
}

.admin-on-theme__help-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ase-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-on-theme__help-highlight {
    color: #b91c1c;
    font-weight: 500;
}

.admin-on-theme__help-section--danger {
    border-left-color: #dc2626;
}

.admin-on-theme__help-section--admin {
    border-left-color: #DC2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
}

/* ============================================================
   Emergency Contacts page — additions
   ------------------------------------------------------------
   One-off layout/helpers for app/Views/user/settings/emergency-contacts.php.
   Puts the form sidebar on the LEFT (standard __grid--two-col puts
   it on the right). Also adds a contact-detail row, info-box callout,
   warning alert variant, form-hint text, and a text variant for the
   status-tile value (used to show a primary contact name with ellipsis).
   ============================================================ */
.admin-on-theme__grid--two-col-left {
    grid-template-columns: 380px 1fr;
}

@media (max-width: 900px) {
    .admin-on-theme__grid--two-col-left {
        grid-template-columns: 1fr;
    }
}

.admin-on-theme__alert--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

.admin-on-theme__status-tile-value--text {
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-on-theme__form-help {
    display: block;
    font-size: 0.8rem;
    color: var(--ase-text-muted, #6b7280);
    margin-top: 0.25rem;
}

.admin-on-theme__form-input--disabled {
    background: var(--ase-bg-surface, #f3f4f6);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Full-width detail item (spans every column in a multi-col details grid) */
.admin-on-theme__detail-item--full {
    grid-column: 1 / -1;
}

.admin-on-theme__contact-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

.admin-on-theme__contact-detail-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.admin-on-theme__contact-detail-link {
    color: var(--ase-primary, #228B22);
    text-decoration: none;
    transition: color 0.15s ease;
}

.admin-on-theme__contact-detail-link:hover {
    text-decoration: underline;
}

.admin-on-theme__info-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(34, 139, 34, 0.05);
    border: 1px solid rgba(34, 139, 34, 0.2);
    border-radius: 0.75rem;
}

.admin-on-theme__info-box-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-on-theme__info-box-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ase-text, #111827);
}

.admin-on-theme__info-box-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .admin-on-theme__info-box {
    background: rgba(34, 139, 34, 0.1);
    border-color: rgba(34, 139, 34, 0.3);
}

/* ============================================================
   Profile page (PLAN-roles-and-profile-consolidation)
   ============================================================ */

/* Utility: small horizontal margin between adjacent inline elements */
.admin-on-theme__ml-1 { margin-left: 0.5rem; }
.admin-on-theme__ml-2 { margin-left: 0.75rem; }
.admin-on-theme__mt-2 { margin-top: 1.5rem; }
.admin-on-theme__mb-1 { margin-bottom: 1rem; }

/* Status badge: missing "draft" variant for application rows */
.admin-on-theme__status-badge--draft {
    background: #fef3c7;
    color: #92400e;
}

/* Form section divider — used between sub-sections inside a card body
   (e.g. Business / Credentials / Capacity on the contractor tab) */
.admin-on-theme__form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #00450d;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 69, 13, 0.1);
}
.admin-on-theme__form-section-title:first-child {
    margin-top: 0;
}
.admin-on-theme__form-section-title small {
    color: #888;
    font-weight: 400;
}

/* Form row that auto-fits rather than locks to 2 columns (profile fields
   have 1, 2, or 3 columns depending on the row) */
.profile-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Form group whose child dropdown is absolutely positioned (e.g. postcode
   type-ahead that hangs below the input) */
.profile-form-group--relative { position: relative; }

/* Postcode input grows to fill its row */
.profile-input-flex { flex: 1; }

/* Customer-tab "Add Address" button wrapper (separate card-like row) */
.profile-customer-actions { margin-top: 1.5rem; }

/* ============================================================
   Profile tab pills
   ============================================================ */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}
.profile-tabs__tab {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: var(--text-light, #6b7280);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}
.profile-tabs__tab:hover {
    background: rgba(0, 69, 13, 0.06);
    color: #00450d;
}
.profile-tabs__tab--active {
    background: #00450d;
    color: white;
}

/* Tab content visibility — only one tab visible at a time */
[data-tab-content] { display: none; }
[data-tab-content].is-active { display: block; }

/* ============================================================
   Add Address modal (Customer tab)
   ============================================================ */
.profile-modal[hidden] { display: none; }
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.profile-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: min(640px, 92vw);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.profile-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #00450d 0%, #065f18 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
}
.profile-modal__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.profile-modal__close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-modal__close:hover { background: rgba(255, 255, 255, 0.3); }
.profile-modal__body { padding: 1.25rem; }

/* Type-ahead suggestion list that hangs below the postcode input */
.profile-suggestions {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0.25rem 0 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 280px;
    overflow-y: auto;
}
.profile-suggestions[hidden] { display: none; }
.profile-suggestions li {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}
.profile-suggestions li:last-child { border-bottom: none; }
.profile-suggestions li:hover { background: #f0fdf4; }
.profile-suggestions li.active { background: #dcfce7; }
.profile-suggestions li small {
    color: #6b7280;
    display: block;
    margin-top: 2px;
}
.profile-suggestions .empty {
    color: #6b7280;
    font-style: italic;
    cursor: default;
}
.profile-suggestions .empty:hover { background: transparent; }

/* ============================================================
   Knowledge Base — public landing (hero + mosaic + latest grid)
   ============================================================ */
.kb-mosaic {
    margin: 0 0 3rem;
}

.kb-mosaic__header {
    margin-bottom: 1.5rem;
}

.kb-mosaic__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--text-color, #1a202c);
}

.kb-mosaic__subtitle {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

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

@media (max-width: 1100px) {
    .kb-mosaic__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .kb-mosaic__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .kb-mosaic__grid { grid-template-columns: 1fr; }
}

.kb-mosaic__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--ase-surface-container-low, #f4f7f4) 100%);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    isolation: isolate;
}

.kb-mosaic__tile::before {
    content: "";
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 7rem;
    height: 7rem;
    background: var(--ase-primary-light, #4caf50);
    opacity: 0.08;
    border-radius: 50%;
    filter: blur(20px);
    transition: opacity 0.2s ease;
    z-index: -1;
}

.kb-mosaic__tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(34, 139, 34, 0.12);
    border-color: var(--ase-primary, #228b22);
}

.kb-mosaic__tile:hover::before { opacity: 0.18; }

.kb-mosaic__tile--all {
    background: linear-gradient(135deg, var(--ase-primary, #228b22) 0%, var(--ase-primary-light, #4caf50) 100%);
    color: #fff;
    border-color: transparent;
}

.kb-mosaic__tile--all::before {
    background: #fff;
    opacity: 0.18;
}

.kb-mosaic__tile--all:hover { border-color: transparent; }

.kb-mosaic__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.kb-mosaic__name {
    font-weight: 700;
    font-size: 1.05rem;
}

.kb-mosaic__count {
    font-size: 0.85rem;
    opacity: 0.8;
}

.kb-mosaic__tile--all .kb-mosaic__count { opacity: 0.9; }

.kb-latest {
    margin: 0 0 3rem;
}

.kb-latest__header {
    margin-bottom: 1.5rem;
}

.kb-latest__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Active category tile (in-place ?cat= filter) */
.kb-mosaic__tile--active {
    border-color: var(--ase-primary, #228b22);
    box-shadow: 0 0 0 2px rgba(34, 139, 34, 0.18);
}

.kb-mosaic__tile--all.kb-mosaic__tile--active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.kb-hero__clear {
    color: var(--ase-primary-dark, #1b6b1b);
    font-weight: 600;
    text-decoration: underline;
}

/* ============================================================
   Article Detail (show.php) — slim hero + reading column
   ============================================================ */
.kb-article-page {
    max-width: 920px;
    margin: 0 auto;
}

.kb-article-hero {
    margin: 0 0 1rem;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, var(--ase-surface-container-low, #f4f7f4) 0%, var(--ase-primary-container, #e8f5e9) 100%);
    border-radius: 1.25rem;
}

.kb-article-hero__inner {
    position: relative;
}

.kb-article-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.kb-article-hero__title {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-color, #1a202c);
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
}

.kb-article-hero__excerpt {
    font-size: 1.1rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
    max-width: 56ch;
}

.kb-article-hero__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    align-items: center;
}

/* Reading column */
.kb-article {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.kb-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
    font-size: 0.875rem;
    color: #6b7280;
}

.kb-article__meta-item strong { color: var(--text-color, #1a202c); font-weight: 600; }
.kb-article__meta-sep { color: #d1d5db; }

/* Quill HTML typography */
.kb-article__body { font-size: 1.05rem; line-height: 1.7; color: #2d3748; }

.kb-article__body > *:first-child { margin-top: 0; }
.kb-article__body > *:last-child { margin-bottom: 0; }

.kb-article__body h1,
.kb-article__body h2,
.kb-article__body h3,
.kb-article__body h4,
.kb-article__body h5,
.kb-article__body h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color, #1a202c);
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.005em;
}

.kb-article__body h1 { font-size: 1.875rem; margin-top: 2.5rem; }
.kb-article__body h2 {
    font-size: 1.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--ase-primary, #228b22);
    display: inline-block;
}
.kb-article__body h3 { font-size: 1.25rem; color: var(--ase-primary-dark, #1b6b1b); }
.kb-article__body h4 { font-size: 1.1rem; }

.kb-article__body p { margin: 0 0 1.1rem; }

.kb-article__body a {
    color: var(--ase-primary, #228b22);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.kb-article__body a:hover { color: var(--ase-primary-dark, #1b6b1b); }

.kb-article__body ul,
.kb-article__body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}
.kb-article__body li { margin-bottom: 0.4rem; }
.kb-article__body li::marker { color: var(--ase-primary, #228b22); }

.kb-article__body blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid var(--ase-primary, #228b22);
    background: var(--ase-surface-container-low, #f4f7f4);
    border-radius: 0 0.5rem 0.5rem 0;
    color: #4b5563;
    font-style: italic;
}
.kb-article__body blockquote p:last-child { margin-bottom: 0; }

.kb-article__body code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #f1f5f9;
    color: #be185d;
    padding: 0.15em 0.4em;
    border-radius: 0.3rem;
}

.kb-article__body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 0.625rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.55;
}
.kb-article__body pre code { background: transparent; color: inherit; padding: 0; font-size: 0.875rem; }

.kb-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.625rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kb-article__body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.kb-article__body th,
.kb-article__body td {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    text-align: left;
}
.kb-article__body th {
    background: var(--ase-surface-container-low, #f4f7f4);
    font-weight: 600;
}

.kb-article__updated {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ase-outline-variant, #e5e7eb);
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

/* Related articles */
.kb-related {
    margin: 2.5rem 0 1rem;
}

.kb-related__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color, #1a202c);
    margin: 0 0 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--ase-primary, #228b22);
}

.kb-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.kb-related__card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}
.kb-related__card:hover {
    border-color: var(--ase-primary, #228b22);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(34, 139, 34, 0.08);
}
.kb-related__type { font-size: 1.2rem; }
.kb-related__name { font-weight: 600; color: var(--text-color, #1a202c); }
.kb-related__excerpt { font-size: 0.875rem; color: #6b7280; line-height: 1.4; }

/* Bottom nav */
.kb-article-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 3rem;
    flex-wrap: wrap;
}

/* ============================================================
   Phase 6 fleet migration — design-system extensions
   Added 2026-08-10. Ponytail: each one is a small BEM extension
   covering patterns the legacy fleet CSS used. If you find
   yourself adding a custom style for one view, promote it here
   instead so the next migration has a place to land.
   ============================================================ */

/* Form structure — section/card wrappers used by driver/vehicle forms */
.admin-on-theme__form-section {
    background: var(--ase-bg-surface, #fff);
    border: 1px solid var(--ase-border-light, #e5e7eb);
    border-radius: var(--ase-radius-lg, 12px);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-on-theme__form-section-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ase-text-primary, #111);
}

.admin-on-theme__form-section-desc {
    margin: 0 0 1rem 0;
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.875rem;
}

.admin-on-theme__form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.admin-on-theme__form-grid .admin-on-theme__form-group--full {
    grid-column: 1 / -1;
}

.admin-on-theme__form-error {
    color: var(--ase-danger, #dc2626);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Breadcrumb link variant (anchor inside breadcrumb had no own class) */
.admin-on-theme__breadcrumb-link {
    color: var(--ase-primary, #228b22);
    text-decoration: none;
}

.admin-on-theme__breadcrumb-link:hover {
    text-decoration: underline;
}

/* Table cell variants — cell with avatar + meta + primary/secondary text */
.admin-on-theme__cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-on-theme__cell--user {
    /* same as .admin-on-theme__cell; explicit modifier for clarity */
}

.admin-on-theme__cell-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-on-theme__cell-primary {
    font-weight: 600;
    color: var(--ase-text-primary, #111);
}

.admin-on-theme__cell-meta {
    font-size: 0.75rem;
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ase-primary-container, #d1f4d1);
    color: var(--ase-primary-dark, #1a6b1a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Empty state — explicit title/text classes (existing __empty only had h3/p) */
.admin-on-theme__empty-title {
    margin: 0.5rem 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ase-text-primary, #111);
}

.admin-on-theme__empty-text {
    margin: 0;
    color: var(--ase-text-muted, #6b7280);
}

/* List / icon — used by attention cards and recent-item lists */
.admin-on-theme__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-on-theme__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--ase-bg-surface-alt, #f3f4f6);
    color: var(--ase-text-primary, #111);
    flex-shrink: 0;
}

/* Pagination ellipsis (existing only had link + active) */
.admin-on-theme__pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--ase-text-muted, #6b7280);
}

/* ============================================================
   Tabs — added Phase 6.1, used by vehicles/edit.php.
   JS contract: tab-btn[data-tab] toggles .active on itself and
   on the matching #tab-{data-tab} panel.
   ============================================================ */

.admin-on-theme__tab-nav {
    display: flex;
    gap: 0.25rem;
    background: var(--ase-bg-surface-alt, #f5f5f5);
    padding: 0.5rem;
    border-radius: var(--ase-radius-lg, 12px);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.admin-on-theme__tab-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--ase-radius-md, 8px);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ase-text-muted, #6b7280);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.admin-on-theme__tab-btn:hover {
    background: var(--ase-bg-surface, #fff);
    color: var(--ase-text-primary, #111);
}

.admin-on-theme__tab-btn.active {
    background: var(--ase-bg-surface, #fff);
    color: var(--ase-primary, #228b22);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-on-theme__tab-panel {
    display: none;
}

.admin-on-theme__tab-panel.active {
    display: block;
}

/* ============================================================
   Food Claim — Public Claiming Pages (Story #348 FDD-03)
   Mobile-first, uses admin-on-theme BEM.
   ============================================================ */

/* Layout */
.admin-on-theme__claim-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 1.25rem;
}

/* Collection summary */
.admin-on-theme__claim-vendor {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ase-text-primary, #111);
    margin-bottom: 0.25rem;
}

.admin-on-theme__claim-location {
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__claim-time {
    font-size: 0.9375rem;
    color: var(--ase-text, #111827);
    margin-bottom: 0.5rem;
}

.admin-on-theme__claim-notes {
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
    font-style: italic;
}

/* Items list */
.admin-on-theme__claim-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-on-theme__claim-item {
    padding: 0.875rem;
    background: var(--ase-bg-surface, #f9fafb);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.5rem;
}

.admin-on-theme__claim-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.admin-on-theme__claim-item-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.admin-on-theme__claim-item-qty {
    font-size: 0.8125rem;
    background: var(--ase-primary-container, #dbeafe);
    color: var(--ase-primary, #2563eb);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

.admin-on-theme__claim-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Item tags */
.admin-on-theme__claim-item-tag {
    font-size: 0.75rem;
    background: var(--ase-bg-surface, #f3f4f6);
    color: var(--ase-text-muted, #6b7280);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.admin-on-theme__claim-item-tag--warn {
    background: #fef3c7;
    color: #92400e;
}

/* Verify page */
.admin-on-theme__verify-intro {
    font-size: 0.9375rem;
    color: var(--ase-text, #111827);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.admin-on-theme__claim-code-input {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    text-align: center;
    font-family: monospace;
}

.admin-on-theme__verify-resend {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant, #e5e7eb);
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
    text-align: center;
}

.admin-on-theme__verify-back {
    text-align: center;
    padding: 0.5rem 0 1rem;
}

/* Success page */
.admin-on-theme__claim-success-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-on-theme__claim-success-icon {
    font-size: 2rem;
}

.admin-on-theme__claim-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-on-theme__claim-detail-row {
    display: flex;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__claim-detail-row:last-child {
    border-bottom: none;
}

.admin-on-theme__claim-detail-label {
    flex: 0 0 110px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__claim-detail-value {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--ase-text, #111827);
}

/* Next steps */
.admin-on-theme__claim-next-steps {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__claim-next-steps h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__claim-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.admin-on-theme__claim-steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: var(--ase-text, #111827);
    line-height: 1.5;
}

.admin-on-theme__claim-step-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Fair-use notice */
.admin-on-theme__claim-fair-use {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
    line-height: 1.5;
}

.admin-on-theme__claim-fair-use span {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Status badges */
.admin-on-theme__status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.admin-on-theme__status-badge--verified {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

/* ============================================================
   Buttons
   ============================================================ */

.admin-on-theme__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.admin-on-theme__btn:hover { opacity: 0.9; }

.admin-on-theme__btn--primary {
    background: var(--ase-primary, #228b22);
    color: #fff;
}

.admin-on-theme__btn--secondary {
    background: var(--ase-bg-surface, #f3f4f6);
    color: var(--ase-text-primary, #111);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.admin-on-theme__btn-link {
    background: none;
    border: none;
    color: var(--ase-primary, #228b22);
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.admin-on-theme__btn-link:hover { opacity: 0.8; }

/* ============================================================
   Soft Registration Banner (Q5)
   ============================================================ */

.admin-on-theme__banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
}

.admin-on-theme__banner--soft {
    background: rgba(33, 150, 243, 0.06);
    border-color: rgba(33, 150, 243, 0.2);
}

.admin-on-theme__banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.admin-on-theme__banner-content {
    flex: 1;
}

.admin-on-theme__banner-content strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__banner-content p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 640px) {
    .admin-on-theme__claim-layout {
        padding: 1rem;
    }
    .admin-on-theme__claim-detail-label {
        flex: 0 0 90px;
    }
}

/* ============================================================
   Leantime Goals & Strategy Component System (admin-on-theme)
   ============================================================ */
.admin-on-theme__goal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-on-theme__goal-card {
    background: white;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-on-theme__goal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.admin-on-theme__goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: var(--ase-primary, #228b22);
}

.admin-on-theme__goal-card--achieved::before { background: #10b981; }
.admin-on-theme__goal-card--ontrack::before  { background: #228b22; }
.admin-on-theme__goal-card--atrisk::before   { background: #f59e0b; }
.admin-on-theme__goal-card--behind::before   { background: #ef4444; }

.admin-on-theme__goal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.admin-on-theme__goal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ase-text, #111827);
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-on-theme__goal-desc {
    font-size: 0.875rem;
    color: var(--ase-text-muted, #6b7280);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.admin-on-theme__goal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ase-text-muted, #6b7280);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.admin-on-theme__progress-bar {
    width: 100%;
    height: 10px;
    background: var(--ase-surface-container, #f3f4f6);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.admin-on-theme__progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--ase-primary, #228b22), var(--ase-primary-light, #32cd32));
    transition: width 0.6s ease;
}

.admin-on-theme__progress-fill--achieved { background: linear-gradient(90deg, #10b981, #059669); }
.admin-on-theme__progress-fill--ontrack  { background: linear-gradient(90deg, #228b22, #32cd32); }
.admin-on-theme__progress-fill--atrisk   { background: linear-gradient(90deg, #f59e0b, #d97706); }
.admin-on-theme__progress-fill--behind   { background: linear-gradient(90deg, #ef4444, #dc2626); }

.admin-on-theme__goal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ase-surface-container-high, #e5e7eb);
    font-size: 0.8rem;
}

.admin-on-theme__goal-target {
    color: var(--ase-text-muted, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================================
   Gantt & Dependencies Timeline Components
   ============================================================ */
.admin-on-theme__gantt-container {
    background: white;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-on-theme__gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--ase-surface-container-low, #f8fafc);
    border-radius: 0.625rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-on-theme__gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-on-theme__gantt-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.admin-on-theme__dependency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   Mobile View Card Components
   ============================================================ */
.admin-on-theme__mobile-cards {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.admin-on-theme__mobile-card {
    background: white;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-on-theme__mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ase-surface-container-high, #f3f4f6);
}

.admin-on-theme__mobile-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ase-text, #111827);
}

.admin-on-theme__mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.admin-on-theme__mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-on-theme__mobile-card-label {
    color: var(--ase-text-muted, #6b7280);
    font-weight: 500;
}

.admin-on-theme__mobile-card-value {
    color: var(--ase-text, #111827);
    font-weight: 600;
}

/* ============================================================
   Food Distribution — Agent Hand-off Queue UI
   (Story #352 / FDD-04)
   ============================================================ */

.admin-on-theme__handoff-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-on-theme__handoff-card {
    grid-column: 1 / -1;
    background: var(--ase-surface, #fff);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.admin-on-theme__handoff-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__handoff-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.admin-on-theme__handoff-subtitle {
    color: var(--ase-text-muted, #6b7280);
    margin: 0;
    font-size: 0.9rem;
}

/* Queue groups */
.admin-on-theme__queue-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--ase-surface-container-low, #f9fafb);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__queue-group--primary {
    border-left: 4px solid #16a34a;
}

.admin-on-theme__queue-group--secondary {
    border-left: 4px solid #d97706;
}

.admin-on-theme__queue-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-on-theme__queue-badge h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.admin-on-theme__queue-count {
    display: inline-flex;
    align-items: center;
    background: var(--ase-surface, #fff);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Claim cards */
.admin-on-theme__claim-card {
    background: var(--ase-surface, #fff);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid #16a34a;
    transition: opacity 0.2s;
}

.admin-on-theme__claim-card--secondary {
    border-left-color: #d97706;
}

.admin-on-theme__claim-card--fulfilled {
    opacity: 0.7;
    background: #f0fdf4;
}

.admin-on-theme__claim-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.admin-on-theme__claimant-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-on-theme__claimant-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.admin-on-theme__claimant-email {
    font-size: 0.85rem;
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__claimant-phone {
    font-size: 0.85rem;
    color: var(--ase-primary, #228b22);
    text-decoration: none;
    margin-left: 0.5rem;
}

.admin-on-theme__claim-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-on-theme__claim-badge--verified {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.admin-on-theme__claim-badge--fulfilled {
    background: #dcfce7;
    color: #15803d;
}

.admin-on-theme__claim-badge--cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.admin-on-theme__claim-badge--pending {
    background: var(--ase-surface-container-low, #f9fafb);
    color: var(--ase-text-muted, #6b7280);
}

.admin-on-theme__claim-item {
    font-size: 0.875rem;
    margin: 0.4rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
}

.admin-on-theme__claim-item-label {
    color: var(--ase-text-muted, #6b7280);
    font-weight: 500;
}

.admin-on-theme__claim-item-name {
    font-weight: 600;
}

.admin-on-theme__claim-item-time {
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.8rem;
}

.admin-on-theme__cooldown-tag {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    margin-top: 0.2rem;
}

.admin-on-theme__soft-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.admin-on-theme__claim-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--ase-outline-variant, #e5e7eb);
    flex-wrap: wrap;
}

/* Empty state within a queue group */
.admin-on-theme__empty-queue {
    text-align: center;
    padding: 1.5rem;
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.9rem;
}

/* Share card */
.admin-on-theme__share-card {
    grid-column: 1 / -1;
    background: var(--ase-surface, #fff);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.admin-on-theme__share-message {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--ase-surface-container-low, #f9fafb);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__share-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.admin-on-theme__claim-link-box {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.admin-on-theme__claim-link-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

/* ============================================================
   Agent Food Collections — shared card styles
   (formerly inline <style> block in show.php, now unified here)
   ============================================================ */

.details-card,
.admin-on-theme__items-card,
.audit-card {
    background: var(--ase-surface, #fff);
    border: 1px solid var(--ase-outline-variant, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.details-card .card-title,
.items-card .card-title,
.audit-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.detail-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.detail-row:last-of-type {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: var(--ase-text-muted, #6b7280);
}

.detail-value {
    flex: 1;
}

.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-active   { background: #dcfce7; color: #15803d; }
.status-completed { background: #dbeafe; color: #1d4ed8; }
.status-inactive { background: #f3f4f6; color: #6b7280; }

.token-display {
    background: var(--ase-surface-container-low, #f9fafb);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    word-break: break-all;
}

.card-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ase-outline-variant, #e5e7eb);
    flex-wrap: wrap;
}

/* Items list */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
    gap: 1rem;
}

.item-row:last-child {
    border-bottom: none;
}

.item-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.item-name {
    font-weight: 600;
}

.item-qty {
    font-size: 0.85rem;
    color: var(--ase-text-muted, #6b7280);
}

.item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.item-category,
.item-expiry {
    font-size: 0.8rem;
    color: var(--ase-text-muted, #6b7280);
}

.item-badge.perishable {
    background: #fef3c7;
    color: #b45309;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
}

.empty-items {
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.9rem;
}

/* Audit timeline */
.audit-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audit-entry {
    font-size: 0.875rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
    flex-wrap: wrap;
}

.audit-entry:last-child {
    border-bottom: none;
}

.audit-time {
    color: var(--ase-text-muted, #6b7280);
    font-family: monospace;
    font-size: 0.8rem;
}

.audit-event {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    background: var(--ase-surface-container-low, #f9fafb);
}

.audit-actor {
    color: var(--ase-text-muted, #6b7280);
    font-size: 0.8rem;
}

/* Page hero / header (shared across agent pages) */
.page-hero {
    background: var(--ase-surface-container-low, #f9fafb);
    padding: 2rem 0;
    border-bottom: 1px solid var(--ase-outline-variant, #e5e7eb);
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.page-subtitle {
    color: var(--ase-text-muted, #6b7280);
    margin: 0;
}

.page-content {
    padding: 2rem 0;
}

/* ============================================================
   Responsive overrides for agent food collection pages
   ============================================================ */
@media (max-width: 768px) {
    .admin-on-theme__handoff-layout {
        grid-template-columns: 1fr;
    }

    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .admin-on-theme__desktop-table {
        display: none !important;
    }
    .admin-on-theme__mobile-cards {
        display: flex !important;
    }
    .admin-on-theme__goal-grid {
        grid-template-columns: 1fr;
    }
    .admin-on-theme__tabs {
        padding-bottom: 0.5rem;
    }
}

/* ============================================================
   Agent Food Dashboard (Story #356 / FDD-05)
   ============================================================ */

/* Page layout */
.admin-on-theme__dashboard__stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Stat tile modifiers (colour-coded) — extends .admin-on-theme__stat-tile */
.admin-on-theme__stat-tile--primary {
    background: var(--ase-primary-50, #eff6ff);
    border: 1px solid var(--ase-primary, #2563eb);
}
.admin-on-theme__stat-tile--primary .admin-on-theme__stat-tile__icon {
    background: var(--ase-primary, #2563eb);
}
.admin-on-theme__stat-tile--primary .admin-on-theme__stat-tile__value {
    color: var(--ase-primary-700, #1d4ed8);
}

.admin-on-theme__stat-tile--warning {
    background: #fffbeb;
    border: 1px solid #d97706;
}
.admin-on-theme__stat-tile--warning .admin-on-theme__stat-tile__icon {
    background: #d97706;
}
.admin-on-theme__stat-tile--warning .admin-on-theme__stat-tile__value {
    color: #92400e;
}

.admin-on-theme__stat-tile--success {
    background: var(--ase-success-50, #ecfdf5);
    border: 1px solid var(--ase-success, #059669);
}
.admin-on-theme__stat-tile--success .admin-on-theme__stat-tile__icon {
    background: var(--ase-success, #059669);
}
.admin-on-theme__stat-tile--success .admin-on-theme__stat-tile__value {
    color: #065f46;
}

.admin-on-theme__stat-tile--danger {
    background: #fef2f2;
    border: 1px solid #dc2626;
}
.admin-on-theme__stat-tile--danger .admin-on-theme__stat-tile__icon {
    background: #dc2626;
}
.admin-on-theme__stat-tile--danger .admin-on-theme__stat-tile__value {
    color: #991b1b;
}

/* Refresh indicator */
.admin-on-theme__refresh-indicator {
    font-size: 0.75rem;
    color: var(--ase-text-muted, #6b7280);
    margin-bottom: 1rem;
}

/* Dashboard table */
.admin-on-theme__dashboard__table-wrap {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-lg, 12px);
    overflow-x: auto;
}

.admin-on-theme__dashboard__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-on-theme__dashboard__table th {
    background: var(--bg-surface-alt, #f9fafb);
    font-weight: 600;
    color: var(--ase-text-muted, #6b7280);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    white-space: nowrap;
}
.admin-on-theme__dashboard__table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    vertical-align: middle;
}
.admin-on-theme__dashboard__table tbody tr:last-child td {
    border-bottom: none;
}
.admin-on-theme__dashboard__table tbody tr:hover {
    background: var(--bg-surface-alt, #f9fafb);
}

/* Countdown badge */
.admin-on-theme__countdown {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.admin-on-theme__countdown--normal {
    background: var(--bg-surface-alt, #f3f4f6);
    color: var(--ase-text-muted, #6b7280);
}
.admin-on-theme__countdown--soon {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.admin-on-theme__countdown--urgent {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    animation: admin-on-theme__pulse-urgent 1.5s ease-in-out infinite;
}
@keyframes admin-on-theme__pulse-urgent {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

/* Queue pill badges in dashboard table */
.admin-on-theme__queue-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.admin-on-theme__queue-pill--primary    { background: #dcfce7; color: #15803d; }
.admin-on-theme__queue-pill--secondary  { background: #fef9c3; color: #854d0e; }
.admin-on-theme__queue-pill--pending     { background: #dbeafe; color: #1d4ed8; }
.admin-on-theme__queue-pill--fulfilled   { background: #d1fae5; color: #065f46; }

/* Empty state */
.admin-on-theme__empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-lg, 12px);
}
.admin-on-theme__empty-state__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.admin-on-theme__empty-state__title {
    margin-bottom: 0.5rem;
}
.admin-on-theme__empty-state__body {
    color: var(--ase-text-muted, #6b7280);
    margin-bottom: 1.5rem;
}
.admin-on-theme__empty-state__action {
    display: inline-flex;
    margin-top: 1rem;
}

/* Fulfill button — distinct from generic btn */
.admin-on-theme__fulfill-btn {
    background: var(--ase-success, #059669);
    color: #fff;
    border: none;
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.admin-on-theme__fulfill-btn:hover {
    background: #047857;
}

/* Responsive: reduce stat tile grid on mobile */
@media (max-width: 768px) {
    .admin-on-theme__dashboard__stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-on-theme__dashboard__table th,
    .admin-on-theme__dashboard__table td {
        padding: 0.625rem 0.5rem;
        font-size: 0.8rem;
    }
}
@media (max-width: 480px) {
    .admin-on-theme__dashboard__stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================================================
   Food Impact Dashboard — Story #360 / FDD-06 subtask #362
   ================================================================ */

/* Hero-sized stat tile (spans 2 rows visually for key metrics) */
.admin-on-theme__stat-tile--xl {
    padding: 1.25rem 1.5rem;
    min-height: 88px;
}
.admin-on-theme__stat-tile--xl .admin-on-theme__stat-tile__icon {
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    font-size: 2rem;
}
.admin-on-theme__stat-tile--xl .admin-on-theme__stat-tile__value {
    font-size: 1.75rem;
}

/* Footnote inside stat tile label */
.admin-on-theme__stat-tile__footnote {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
    margin-top: 2px;
}

/* Colored status dot */
.admin-on-theme__status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Right-aligned numeric table cell */
.admin-on-theme__numeric-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Region split: two-column layout for Stevenage | Luton */
.admin-on-theme__region-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-on-theme__region-tile {
    background: var(--bg-surface-alt, #f9fafb);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.admin-on-theme__region-name {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6b7280);
    margin-bottom: 0.5rem;
}

.admin-on-theme__region-kg {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary, #111827);
}
.admin-on-theme__region-kg span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted, #6b7280);
}

.admin-on-theme__region-colls {
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.25rem;
}

/* Vendor breakdown table */
.admin-on-theme__vendor-table .admin-on-theme__vendor-value {
    white-space: nowrap;
}

/* Bar track (shared background) */
.admin-on-theme__bar-track {
    background: var(--bg-surface-alt, #f3f4f6);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

/* Vendor bar fill */
.admin-on-theme__vendor-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ase-primary, #2563eb), #60a5fa);
    border-radius: 6px;
    min-width: 2px;
}

/* Timeline (time series) table */
.admin-on-theme__timeline-row--today {
    background: var(--ase-primary-50, #eff6ff);
}
.admin-on-theme__timeline-label {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Timeline bar fill */
.admin-on-theme__timeline-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #86efac);
    border-radius: 6px;
    min-width: 2px;
}

/* Meta text */
.admin-on-theme__meta {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

/* Empty state */
.admin-on-theme__empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted, #6b7280);
    font-size: 0.9rem;
}

/* Badge */
.admin-on-theme__badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.5;
}
.admin-on-theme__badge--primary {
    background: var(--ase-primary-100, #dbeafe);
    color: var(--ase-primary-700, #1d4ed8);
}

@media (max-width: 480px) {
    .admin-on-theme__region-split {
        grid-template-columns: 1fr;
    }
}

