/* ==========================================================================
   CherryAI Premium Components
   Shared UI components extracted from Asset Record design
   ========================================================================== */

/* ==========================================================================
   PAGE HERO - Dark gradient hero card with premium styling
   ========================================================================== */
.page-hero {
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: var(--space-9);
    box-shadow: var(--shadow-hero);
}

.page-hero-main {
    display: flex;
    padding: 24px;
    gap: 24px;
}

.page-hero-image {
    position: relative;
    flex-shrink: 0;
}

.page-hero-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
}

.image-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.page-hero-image:hover .image-upload-overlay { opacity: 1; }
.image-upload-overlay svg { width: 28px; height: 28px; }
.image-upload-overlay span { font-size: 11px; font-weight: 600; text-transform: uppercase; }

.page-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.page-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.page-hero-type {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-hero-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.page-hero-status.active { background: var(--color-success-500); color: var(--color-text-inverse); }
.page-hero-status.inactive { background: var(--color-text-3); color: var(--color-text-inverse); }
.page-hero-status.disposed { background: var(--color-danger-600); color: var(--color-text-inverse); }
.page-hero-status.success { background: var(--color-success-500); color: var(--color-text-inverse); }
.page-hero-status.warning { background: var(--color-warning-600); color: var(--color-text-inverse); }
.page-hero-status.danger { background: var(--color-danger-600); color: var(--color-text-inverse); }
.page-hero-status.info { background: var(--color-brand-500); color: var(--color-text-inverse); }

.page-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: white;
    margin: 0 0 4px;
    line-height: 1;
}

.page-hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 16px;
    font-weight: 500;
}

.page-hero-location {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.loc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}
.loc-pill svg { width: 14px; height: 14px; opacity: 0.7; }
.loc-divider { color: rgba(255,255,255,0.3); font-size: 14px; }

.page-hero-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex-shrink: 0;
    width: 280px;
    border-radius: 16px;
}

/* ==========================================================================
   KPI CARDS - Frosted glass style for hero sections
   ========================================================================== */
.kpi-card {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}

.kpi-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}
.kpi-value.money { color: #34d399; }
.kpi-value.danger { color: #f87171; }
.kpi-value.warning { color: #fbbf24; }
.kpi-value.success { color: #34d399; }
.kpi-value.info { color: #60a5fa; }

/* ==========================================================================
   HERO ACTION BAR - Bottom action bar for hero sections
   ========================================================================== */
.page-hero-actions {
    padding: 16px 24px;
    background: rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 20px 20px;
}

.hero-tags {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-tag {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.hero-tag.critical { background: rgba(239,68,68,0.2); color: #f87171; }
.hero-tag.priority { background: rgba(251,191,36,0.2); color: #fbbf24; }
.hero-tag.success { background: rgba(34,197,94,0.2); color: #4ade80; }
.hero-tag.info { background: rgba(59,130,246,0.2); color: #60a5fa; }

.hero-btns {
    display: flex;
    gap: 10px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hero-btn-primary,
.hero-btn-ghost,
.hero-btn-danger,
.hero-btn-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hero-btn-primary {
    background: #3b82f6;
    color: white;
}
.hero-btn-primary:hover { background: #2563eb; text-decoration: none; }

.hero-btn-ghost {
    background: rgba(255,255,255,0.1);
    color: white;
}
.hero-btn-ghost:hover { background: rgba(255,255,255,0.2); text-decoration: none; }

.hero-btn-danger {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}
.hero-btn-danger:hover { background: rgba(239,68,68,0.3); text-decoration: none; }

.hero-btn-success {
    background: rgba(34,197,94,0.2);
    color: #4ade80;
}
.hero-btn-success:hover { background: rgba(34,197,94,0.3); text-decoration: none; }

.hero-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    padding: 10px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.3);
}

/* ==========================================================================
   PREMIUM TABS - White card with tab navigation
   ========================================================================== */
.premium-tabs {
    background: var(--lux-surface, white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid var(--lux-border, #e2e8f0);
    overflow: hidden;
}

/* ==========================================================================
   SECTION CARDS - White cards with consistent styling
   ========================================================================== */
.section-card {
    background: var(--lux-surface, white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--lux-border, #e2e8f0);
    margin-bottom: 24px;
    overflow: hidden;
}

.section-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--lux-surface-alt, #f8fafc);
}

.section-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-card-title svg {
    color: #64748b;
    width: 20px;
    height: 20px;
}

.section-card-body {
    padding: 24px;
}

.section-card-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: var(--lux-surface-alt, #f8fafc);
}

/* ==========================================================================
   PREMIUM FORM GRID - Form layout system
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }
.form-grid-full { grid-template-columns: 1fr; }

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group.full-width {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.field-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    min-height: 45px;
}

.field-value.empty { color: #94a3b8; font-weight: 400; }

.section-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}

.section-divider-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
}

/* ==========================================================================
   QUICK STATS ROW - Row of stat cards
   ========================================================================== */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.quick-stats-row-4 { grid-template-columns: repeat(4, 1fr); }
.quick-stats-row-3 { grid-template-columns: repeat(3, 1fr); }
.quick-stats-row-6 { grid-template-columns: repeat(6, 1fr); }

.quick-stat-card {
    background: var(--lux-surface, white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--lux-border, #e2e8f0);
    transition: all 0.2s ease;
}

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

.quick-stat-card.clickable { cursor: pointer; text-decoration: none; }

.quick-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-stat-icon.primary { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: #3b82f6; }
.quick-stat-icon.success { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #22c55e; }
.quick-stat-icon.warning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #f59e0b; }
.quick-stat-icon.danger { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #ef4444; }
.quick-stat-icon.info { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #0891b2; }
.quick-stat-icon.purple { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: #8b5cf6; }
.quick-stat-icon.pink { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); color: #ec4899; }

.quick-stat-content { flex: 1; min-width: 0; }

.quick-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--lux-text, #1e293b);
    line-height: 1.2;
}

.quick-stat-value.primary { color: #3b82f6; }
.quick-stat-value.success { color: #22c55e; }
.quick-stat-value.warning { color: #f59e0b; }
.quick-stat-value.danger { color: #ef4444; }
.quick-stat-value.muted { color: #94a3b8; font-weight: 500; }

.quick-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--lux-text-muted, #64748b);
    margin-top: 2px;
}

/* ==========================================================================
   ACTIVITY TIMELINE - Activity list component
   ========================================================================== */
.activity-timeline-card {
    background: var(--lux-surface, white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.activity-title svg { color: #64748b; }

.activity-view-all {
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
}

.activity-view-all:hover { text-decoration: underline; }

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--lux-surface-alt, #f8fafc);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.activity-item:hover { background: var(--lux-surface-alt, #f1f5f9); }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.scheduled { background: #3b82f6; }
.activity-dot.inprogress { background: #f59e0b; }
.activity-dot.completed { background: #22c55e; }
.activity-dot.cancelled { background: #94a3b8; }
.activity-dot.pending { background: #8b5cf6; }

.activity-content { flex: 1; min-width: 0; }

.activity-desc {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.activity-type {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-date {
    font-size: 12px;
    color: #94a3b8;
}

.activity-status {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-status.scheduled { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.activity-status.inprogress { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.activity-status.completed { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.activity-status.cancelled { background: rgba(148, 163, 184, 0.1); color: #64748b; }
.activity-status.pending { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* ==========================================================================
   PREMIUM ADMIN CARDS - Cards for admin/index pages
   ========================================================================== */
.premium-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.premium-admin-card {
    background: var(--lux-surface, white);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.premium-admin-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: #3b82f6;
}

.premium-admin-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.premium-admin-icon.primary { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: #3b82f6; }
.premium-admin-icon.success { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #22c55e; }
.premium-admin-icon.warning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #f59e0b; }
.premium-admin-icon.danger { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #ef4444; }
.premium-admin-icon.info { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #0891b2; }
.premium-admin-icon.purple { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: #8b5cf6; }
.premium-admin-icon.secondary { background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); color: #64748b; }

.premium-admin-icon svg {
    width: 28px;
    height: 28px;
}

.premium-admin-content {
    flex: 1;
    min-width: 0;
}

.premium-admin-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}

.premium-admin-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   PREMIUM SECTION HEADERS
   ========================================================================== */
.premium-section {
    margin-bottom: 32px;
}

.premium-section-header {
    margin-bottom: 20px;
}

.premium-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-section-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   PREMIUM DATA TABLE
   ========================================================================== */
.premium-table-container {
    background: var(--lux-surface, white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

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

.premium-table thead {
    background: var(--lux-surface-alt, #f8fafc);
}

.premium-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.premium-table td {
    padding: 16px;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tbody tr:hover {
    background: var(--lux-surface-alt, #f8fafc);
}

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

/* ==========================================================================
   STATUS BADGES
   ========================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.active { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.status-badge.inactive { background: rgba(148, 163, 184, 0.1); color: #64748b; }
.status-badge.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-badge.completed { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.status-badge.cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.status-badge.scheduled { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-badge.inprogress { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-badge.success { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.status-badge.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-badge.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.status-badge.info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

/* ==========================================================================
   PREMIUM BUTTONS
   ========================================================================== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-premium-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-premium-secondary {
    background: var(--lux-surface, white);
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.btn-premium-secondary:hover {
    background: var(--lux-surface-alt, #f8fafc);
    color: #1e293b;
}

.btn-premium-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-premium-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--lux-surface-alt, #f1f5f9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.empty-state-text {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
}

/* ==========================================================================
   ENVIRONMENT BANNER
   ========================================================================== */
.env-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.env-banner i {
    font-size: 14px;
}

.env-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: none;
}

.env-badge-defaulted {
    background: #64748b;
}

.env-banner-lab {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.env-banner-lab .env-badge {
    background: rgba(255,255,255,0.2);
}

.env-banner-demo {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.env-banner-demo .env-badge {
    background: rgba(255,255,255,0.2);
}

.env-banner-prod {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.env-banner-unknown {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 1200px) {
    .quick-stats-row { grid-template-columns: repeat(3, 1fr); }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .page-hero-kpis { width: 100%; grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .quick-stats-row { grid-template-columns: repeat(2, 1fr); }
    .page-hero-main { flex-direction: column; }
    .page-hero-kpis { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .premium-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .quick-stats-row { grid-template-columns: 1fr; }
    .page-hero-title { font-size: 28px; }
}

/* ==========================================================================
   CONTENT GRID - Two-column layout with main content and sidebar
   ========================================================================== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.content-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .content-sidebar {
        order: -1;
    }
}

/* Workflow Hint Component */
.workflow-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    margin: 4px 12px 8px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.4;
}

.workflow-hint-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #3b82f6;
    margin-top: 1px;
}

.workflow-hint-text {
    color: var(--text-muted, #64748b);
    flex: 1;
}

.workflow-hint-link {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.workflow-hint-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   PAGE HEADER STANDARD - Back link, breadcrumb, title/subtitle
   ========================================================================== */
.page-header-standard {
    margin-bottom: 24px;
}

.page-header-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.15s ease;
}

.page-header-back:hover {
    color: #3b82f6;
}

.page-header-back svg {
    width: 16px;
    height: 16px;
}

.page-header-breadcrumb {
    margin-bottom: 12px;
}

.page-header-breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.page-header-breadcrumb li {
    display: flex;
    align-items: center;
}

.page-header-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #cbd5e1;
}

.page-header-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.page-header-breadcrumb a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.page-header-breadcrumb .current {
    color: #1e293b;
    font-weight: 600;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-header-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.02em;
    margin: 0;
}

.page-header-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   EMPTY STATE ENHANCEMENTS
   ========================================================================== */
.empty-state-message {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.empty-state-default .empty-state-icon {
    background: var(--lux-surface-alt, #f1f5f9);
    color: #94a3b8;
}

.empty-state-success .empty-state-icon {
    background: #dcfce7;
    color: #22c55e;
}

.empty-state-warning .empty-state-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.empty-state-danger .empty-state-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* ==========================================================================
   SECTION CARD ENHANCEMENTS
   ========================================================================== */
.section-card.collapsible .section-card-header {
    user-select: none;
}

.section-card-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.section-card.collapsed .section-card-chevron {
    transform: rotate(-90deg);
}

.section-card.collapsed .section-card-body {
    display: none;
}

.section-card-body.no-padding {
    padding: 0;
}

.section-card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0;
    font-weight: 400;
}

/* ==========================================================================
   STAT CARD ACTIVE STATE
   ========================================================================== */
.quick-stat-card.stat-active {
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 20px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

/* ==========================================================================
   DATAGRID COLUMN VISIBILITY
   ========================================================================== */
.grid-column-toggle {
    position: relative;
}

.grid-column-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.grid-column-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 200px;
    margin-top: 4px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.grid-column-dropdown-header {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.grid-column-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.grid-column-item:hover {
    background-color: var(--lux-surface-alt, #f1f5f9);
}

.grid-column-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #3b82f6;
}

.grid-column-dropdown-footer {
    padding: 8px 12px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.grid-reset-columns {
    font-size: 12px;
    color: #64748b;
    border-color: #3b82f6;
}

/* ==========================================================================
   PREMIUM DATAGRID TOOLBAR v3.0
   ========================================================================== */
.enhanced-grid-container {
    position: relative;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    gap: 12px;
    flex-wrap: wrap;
}

.grid-toolbar-premium {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.grid-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.grid-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.grid-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    flex: 1;
    max-width: 320px;
    transition: all 0.15s ease;
}

.grid-search:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.grid-search svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.grid-search-input {
    border: none;
    outline: none;
    font-size: 13px;
    color: #1e293b;
    background: transparent;
    width: 100%;
}

.grid-search-input::placeholder {
    color: #94a3b8;
}

.grid-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.grid-toolbar-btn:hover {
    background: var(--lux-surface-alt, #f8fafc);
    border-color: #cbd5e1;
    color: #1e293b;
}

.grid-toolbar-btn svg {
    width: 16px;
    height: 16px;
}

.grid-filter-toggle,
.grid-column-toggle,
.grid-export-toggle {
    position: relative;
}

.grid-filter-dropdown,
.grid-column-dropdown,
.grid-export-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 280px;
    margin-top: 4px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.grid-filter-dropdown.show,
.grid-column-dropdown.show,
.grid-export-dropdown.show {
    display: block;
}

.grid-export-dropdown {
    min-width: 160px;
}

.grid-dropdown-header {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--lux-surface-alt, #f8fafc);
    border-bottom: 1px solid #e2e8f0;
}

.grid-filter-list,
.grid-column-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.grid-filter-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.grid-filter-item:last-child {
    margin-bottom: 0;
}

.grid-filter-item label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.grid-filter-input-group {
    display: flex;
    gap: 6px;
}

.grid-filter-op {
    width: 100px;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: var(--lux-surface-alt, #f8fafc);
    color: #64748b;
    cursor: pointer;
}

.grid-filter-input,
.grid-filter-select {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: var(--lux-surface, white);
    color: #1e293b;
    transition: all 0.15s ease;
}

.grid-filter-input:focus,
.grid-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.grid-dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--lux-surface-alt, #f8fafc);
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}

.grid-dropdown-footer .btn-link {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.grid-dropdown-footer .btn-link:hover {
    color: #3b82f6;
}

.grid-dropdown-footer .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.grid-dropdown-footer .btn-primary:hover {
    background: #2563eb;
}

.grid-column-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.15s ease;
}

.grid-column-item:hover {
    background: var(--lux-surface-alt, #f1f5f9);
}

.grid-column-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.grid-export-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.grid-export-dropdown button:hover {
    background: var(--lux-surface-alt, #f1f5f9);
}

.grid-export-dropdown button svg {
    color: #64748b;
}

.filter-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: #3b82f6;
    border-radius: 9px;
    margin-left: 4px;
}

.grid-count {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    padding: 6px 12px;
    background: var(--lux-surface, white);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.grid-reset-btn {
    color: #94a3b8;
}

.grid-reset-btn:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Sort Indicators */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background: var(--lux-surface-alt, #f1f5f9);
}

.sort-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    opacity: 0.3;
    transition: opacity 0.15s ease;
}

.sortable:hover .sort-icon {
    opacity: 0.6;
}

.sort-asc .sort-icon,
.sort-desc .sort-icon {
    opacity: 1;
    color: #3b82f6;
}

.sort-asc .sort-icon svg {
    transform: rotate(180deg);
}

.sort-order,
.sort-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: #3b82f6;
    border-radius: 50%;
    margin-left: 4px;
}

/* Row Click Navigation */
.row-click-enabled tbody tr.row-clickable,
.row-click-enabled tbody tr.clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.row-clickable {
    cursor: pointer;
}

.row-click-enabled tbody tr.row-clickable:hover,
.row-click-enabled tbody tr.clickable-row:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.row-click-enabled tbody tr.clickable-row:focus,
.row-click-enabled tbody tr.row-clickable:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

.sticky-header th {
    background: var(--lux-surface-alt, #f8fafc);
    box-shadow: 0 1px 0 #e2e8f0;
}

/* Enhanced Grid Container Adjustments */
.enhanced-grid-container .data-table {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

.enhanced-grid-container .data-table thead th:first-child {
    border-top-left-radius: 0;
}

.enhanced-grid-container .data-table thead th:last-child {
    border-top-right-radius: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grid-toolbar-left,
    .grid-toolbar-right {
        width: 100%;
    }
    
    .grid-search {
        max-width: none;
    }
    
    .grid-toolbar-right {
        justify-content: flex-end;
    }
    
    .grid-toolbar-btn span {
        display: none;
    }
    
    .grid-filter-dropdown,
    .grid-column-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        max-height: 80vh;
    }
}

/* ==========================================================================
   SPINNER ANIMATION - Loading indicator
   ========================================================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-animate {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   SHARED COMPONENTS - Extracted from partials (ADR-004 compliance)
   ========================================================================== */

/* Back Link Component - migrated from _BackLink.cshtml */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    background: transparent;
}

.back-link:hover {
    color: var(--primary, #3b82f6);
    background: var(--bg-hover, rgba(59, 130, 246, 0.08));
}

.back-link svg {
    flex-shrink: 0;
}

.page-hero .back-link {
    margin-bottom: 0.75rem;
}

/* Asset Maintenance Header - migrated from _AssetMaintenanceHeader.cshtml */
.module-header {
    margin-bottom: 1.5rem;
}

.module-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.module-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.module-breadcrumbs a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.module-breadcrumbs a:focus {
    outline: none;
    color: #3b82f6;
    text-decoration: underline;
}

.module-breadcrumbs .breadcrumb-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.module-breadcrumbs .breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

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

.module-header-left {
    flex: 1;
    min-width: 200px;
}

.module-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.module-header-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.module-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: 9999px;
    white-space: nowrap;
}

.status-pill.tone-info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-pill.tone-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-pill.tone-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-pill.tone-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-pill.tone-muted {
    background: var(--lux-surface-alt, #f1f5f9);
    color: #475569;
    border: 1px solid #e2e8f0;
}

.module-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.module-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: var(--lux-surface, #fff);
    color: #475569;
    transition: all 0.15s ease;
    cursor: pointer;
}

.module-pill:hover {
    background: var(--lux-surface-alt, #f8fafc);
    border-color: #cbd5e1;
    color: #334155;
}

.module-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.module-pill.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.module-pill.active:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.module-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .module-header-top {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .module-header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .module-pills {
        gap: 0.375rem;
    }
    
    .module-pill {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .module-pill svg {
        width: 14px;
        height: 14px;
    }
}
