﻿/* =====================================================
SafeHouse Admin Global Theme System - SCROLLING FIXED
File: wwwroot/css/safehouse-theme.css
Purpose: Global theme with proper scrolling support
===================================================== */

:root {
    /* ===== SAFEHOUSE BRAND — always the same ===== */
    --sh-primary-orange: #FF8C00;
    --sh-secondary-orange: #D2691E;
    --sh-dark-orange: #FF6B35;
    --sh-orange-light: #FFB347;
    --sh-orange-gradient: linear-gradient(135deg, #FF8C00 0%, #D2691E 100%);
    /* Status Colors */
    --sh-success: #22C55E;
    --sh-error:   #DC143C;
    --sh-warning: #F59E0B;
    --sh-info:    #3B82F6;
    /* Border Radius */
    --sh-radius-sm: 8px;
    --sh-radius-md: 12px;
    --sh-radius-lg: 20px;
    /* Spacing */
    --sh-space-xs: 0.25rem;
    --sh-space-sm: 0.5rem;
    --sh-space-md: 1rem;
    --sh-space-lg: 1.5rem;
    --sh-space-xl: 2rem;
    /* Typography */
    --sh-font-size-sm:   0.875rem;
    --sh-font-size-base: 1rem;
    --sh-font-size-lg:   1.125rem;
    --sh-font-size-xl:   1.25rem;
    --sh-font-size-2xl:  1.5rem;
    --sh-font-size-3xl:  2rem;
    /* Transitions */
    --sh-transition-normal: 0.3s ease;

    /* ===== LIGHT THEME (default) ===== */
    --sh-page-bg:           #F4F6F9;
    --sh-page-bg-secondary: #EEF1F5;
    --sh-card-bg:           #FFFFFF;
    --sh-card-bg-elevated:  #FAFAFA;
    --sh-card-bg-secondary: #F0F4F8;
    --sh-border-color:      #E2E8F0;
    --sh-border-light:      #EDF2F7;
    --sh-text-primary:      #1A202C;
    --sh-text-secondary:    #404B5E;
    --sh-text-tertiary:     #586273;
    --sh-text-muted:        #646F82;
    --sh-text-placeholder:  #97A2B2;
    --sh-shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --sh-shadow-md: 0 4px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --sh-shadow-lg: 0 10px 20px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
}

/* ===== DARK THEME OVERRIDE — refined cool near-black ramp ===== */
[data-theme="dark"] {
    --sh-page-bg:           #0E0F13;
    --sh-page-bg-secondary: #14161B;
    --sh-card-bg:           #1A1C22;
    --sh-card-bg-elevated:  #21242B;
    --sh-card-bg-secondary: #272A32;
    --sh-border-color:      #2C2F38;
    --sh-border-light:      #3A3E48;
    --sh-text-primary:      #F3F4F6;
    --sh-text-secondary:    #B9BDC7;
    --sh-text-tertiary:     #8B8F9A;
    --sh-text-muted:        #5C606B;
    --sh-text-placeholder:  #7A7E89;
    --sh-shadow-sm: 0 2px 6px rgba(0,0,0,0.35);
    --sh-shadow-md: 0 6px 16px rgba(0,0,0,0.40);
    --sh-shadow-lg: 0 12px 32px rgba(0,0,0,0.50);
}

/* ===== DARK THEME — sh-app element vars (reinforces page dark state) ===== */
[data-theme="dark"] .sh-app {
    --sh-bg-primary:    #0E0F13;
    --sh-bg-secondary:  #1A1C22;
    --sh-bg-tertiary:   #21242B;
    --sh-bg-elevated:   #272A32;
    --sh-bg-hover:      #2C2F38;
    --sh-border:        #2C2F38;
    --sh-border-subtle: #232730;
    --sh-text-primary:  #F3F4F6;
    --sh-text-secondary: #9AA0AD;
    --sh-text-tertiary: #6B6F7A;
    --sh-accent:        #FF8C00;
    --sh-accent-hover:  #e67e00;
    --sh-accent-subtle: rgba(255, 140, 0, 0.1);
    --sh-shadow:        0 1px 3px rgba(0,0,0,0.3);
    --sh-shadow-lg:     0 8px 32px rgba(0,0,0,0.4);
}

/* ===== LIGHT THEME BRIDGE for sh-app pages ===== */
/* When global toggle is light, override the page-level dark vars */
[data-theme="light"] .sh-app {
    --sh-bg-primary:    #f8f9fa;
    --sh-bg-secondary:  #ffffff;
    --sh-bg-tertiary:   #f1f3f4;
    --sh-bg-elevated:   #ffffff;
    --sh-bg-hover:      #e8eaed;
    --sh-border:        #dadce0;
    --sh-border-subtle: #e8eaed;
    --sh-text-primary:  #202124;
    --sh-text-secondary: #434A54;
    --sh-text-tertiary: #5D6573;
    --sh-accent:        #e07800;
    --sh-accent-hover:  #c66a00;
    --sh-accent-subtle: rgba(255, 140, 0, 0.08);
    --sh-shadow:        0 1px 3px rgba(60,64,67,0.15);
    --sh-shadow-lg:     0 8px 32px rgba(60,64,67,0.2);
}

.mud-tabs .mud-tab {
    color: var(--sh-text-muted) !important;
}

    .mud-tabs .mud-tab:hover {
        color: var(--sh-text-primary) !important;
        background-color: rgba(255, 140, 0, 0.06) !important;
    }

    .mud-tabs .mud-tab.mud-tab-active {
        color: var(--sh-primary-orange) !important;
    }

.mud-tabs .mud-tab-slider {
    background-color: var(--sh-primary-orange) !important;
}

.mud-tabs .mud-tabs-toolbar {
    background-color: var(--sh-card-bg) !important;
    border-bottom: 1px solid var(--sh-border-color) !important;
}

/* ===== CRITICAL SCROLLING FIX ===== */
/* REMOVED the problematic overflow: hidden from html/body */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--sh-page-bg);
    color: var(--sh-text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.2s ease, color 0.2s ease;
}

/* ===== LAYOUT COMPONENTS ===== */

.sh-main-layout {
    display: flex;
    min-height: 100vh;
    background: var(--sh-page-bg);
}

.sh-main-sidebar {
    flex-shrink: 0;
    width: 280px;
    background: var(--sh-card-bg);
    border-right: 1px solid var(--sh-border-color);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sh-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--sh-page-bg-secondary);
}

.sh-main-topbar {
    flex-shrink: 0;
    height: 70px;
    background: var(--sh-card-bg);
    border-bottom: 1px solid var(--sh-border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* CRITICAL: Content body that allows natural scrolling */
.sh-main-body {
    flex: 1;
    /* REMOVED: All overflow and height constraints */
    /* This allows the page to scroll naturally */
    background: var(--sh-page-bg-secondary);
    padding: 0;
    margin: 0;
}

/* ===== PAGE CONTAINERS ===== */

.sh-page-container {
    width: 100%;
    padding: var(--sh-space-xl);
    margin: 0;
    min-height: calc(100vh - 70px);
    background: var(--sh-page-bg-secondary);
}

.sh-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--sh-space-xl);
    padding-bottom: var(--sh-space-lg);
    border-bottom: 1px solid var(--sh-border-color);
    flex-wrap: wrap;
    gap: var(--sh-space-lg);
}

.sh-page-title h1.sh-title {
    font-size: var(--sh-font-size-3xl);
    font-weight: 700;
    color: var(--sh-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.sh-page-title .sh-subtitle {
    font-size: var(--sh-font-size-base);
    color: var(--sh-text-secondary);
    margin: var(--sh-space-sm) 0 0 0;
}

.sh-page-actions {
    display: flex;
    gap: var(--sh-space-md);
    align-items: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.sh-btn, .sh-btn-primary, .sh-btn-secondary, .sh-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--sh-space-sm);
    padding: var(--sh-space-md) var(--sh-space-lg);
    border-radius: var(--sh-radius-md);
    font-size: var(--sh-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--sh-transition-normal);
    white-space: nowrap;
}

.sh-btn-primary {
    background: var(--sh-orange-gradient);
    color: var(--sh-text-primary);
    box-shadow: var(--sh-shadow-sm);
}

    .sh-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: var(--sh-shadow-md);
    }

.sh-btn-secondary {
    background: var(--sh-card-bg-secondary);
    color: var(--sh-text-secondary);
    border: 1px solid var(--sh-border-light);
}

    .sh-btn-secondary:hover {
        background: var(--sh-border-light);
        color: var(--sh-text-primary);
    }

.sh-btn-outline {
    background: transparent;
    color: var(--sh-primary-orange);
    border: 2px solid var(--sh-primary-orange);
}

    .sh-btn-outline:hover {
        background: var(--sh-primary-orange);
        color: var(--sh-text-primary);
    }

.sh-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--sh-radius-md);
    background: var(--sh-card-bg-secondary);
    border: 1px solid var(--sh-border-color);
    color: var(--sh-text-secondary);
    cursor: pointer;
    transition: all var(--sh-transition-normal);
    margin-right: var(--sh-space-md);
}

    .sh-back-btn:hover {
        background: var(--sh-primary-orange);
        color: var(--sh-text-primary);
        border-color: var(--sh-primary-orange);
    }

/* ===== CARDS ===== */
.sh-card {
    background: var(--sh-card-bg);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-lg);
    padding: var(--sh-space-lg);
    box-shadow: var(--sh-shadow-sm);
    transition: all var(--sh-transition-normal);
    margin-bottom: var(--sh-space-lg);
}

    .sh-card:hover {
        box-shadow: var(--sh-shadow-md);
        transform: translateY(-1px);
    }

/* ===== FORMS ===== */
.sh-form-container {
    background: var(--sh-card-bg);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-lg);
    padding: var(--sh-space-xl);
    box-shadow: var(--sh-shadow-sm);
}

.sh-form-group {
    margin-bottom: var(--sh-space-lg);
}

.sh-form-label {
    display: block;
    margin-bottom: var(--sh-space-sm);
    color: var(--sh-text-secondary);
    font-weight: 500;
    font-size: var(--sh-font-size-sm);
}

.sh-form-input, .sh-select {
    width: 100%;
    padding: var(--sh-space-md);
    background: var(--sh-card-bg-secondary);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    font-size: var(--sh-font-size-base);
    transition: all var(--sh-transition-normal);
    min-height: 50px;
}

    .sh-form-input:focus, .sh-select:focus {
        outline: none;
        border-color: var(--sh-primary-orange);
        box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
        background: var(--sh-card-bg);
    }

    .sh-form-input::placeholder {
        color: var(--sh-text-placeholder);
    }

/* ===== STATISTICS SECTION ===== */
.sh-stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sh-space-lg);
    margin-bottom: var(--sh-space-xl);
}

.sh-stat-card {
    background: var(--sh-card-bg);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-lg);
    padding: var(--sh-space-lg);
    display: flex;
    align-items: center;
    gap: var(--sh-space-lg);
    transition: all var(--sh-transition-normal);
    position: relative;
    overflow: hidden;
}

    .sh-stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--sh-primary-orange);
    }

.sh-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--sh-radius-lg);
    background: var(--sh-orange-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--sh-text-primary);
    flex-shrink: 0;
}

.sh-stat-content {
    flex: 1;
}

.sh-stat-number {
    font-size: var(--sh-font-size-3xl);
    font-weight: 700;
    color: var(--sh-text-primary);
    margin-bottom: var(--sh-space-xs);
}

.sh-stat-label {
    font-size: var(--sh-font-size-base);
    color: var(--sh-text-secondary);
    font-weight: 500;
}

/* ===== FILTERS SECTION ===== */
.sh-filters-section {
    background: var(--sh-card-bg);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-lg);
    padding: var(--sh-space-lg);
    margin-bottom: var(--sh-space-xl);
}

.sh-search-bar {
    margin-bottom: var(--sh-space-lg);
}

.sh-search-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--sh-card-bg-secondary);
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-md);
    padding: var(--sh-space-md);
    transition: all var(--sh-transition-normal);
}

    .sh-search-input:focus-within {
        border-color: var(--sh-primary-orange);
        box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
    }

    .sh-search-input i {
        color: var(--sh-text-muted);
        margin-right: var(--sh-space-md);
    }

    .sh-search-input input {
        flex: 1;
        background: transparent;
        border: none;
        color: var(--sh-text-primary);
        font-size: var(--sh-font-size-base);
        outline: none;
    }

        .sh-search-input input::placeholder {
            color: var(--sh-text-placeholder);
        }

.sh-filter-controls {
    display: flex;
    gap: var(--sh-space-md);
    align-items: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .sh-main-layout {
        flex-direction: column;
    }

    .sh-main-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        order: 2;
    }

    .sh-main-content {
        order: 1;
    }

    .sh-page-container {
        padding: var(--sh-space-lg);
    }

    .sh-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sh-stats-section {
        grid-template-columns: 1fr;
    }

    .sh-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== SCROLLBAR STYLING ===== */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--sh-border-color);
    border-radius: 4px;
}

    *::-webkit-scrollbar-thumb:hover {
        background: var(--sh-primary-orange);
    }

/* ===== UTILITY CLASSES ===== */
.sh-text-primary {
    color: var(--sh-text-primary);
}

.sh-text-secondary {
    color: var(--sh-text-secondary);
}

.sh-text-muted {
    color: var(--sh-text-muted);
}

.sh-text-orange {
    color: var(--sh-primary-orange);
}

.sh-text-success {
    color: var(--sh-success);
}

.sh-text-error {
    color: var(--sh-error);
}

.sh-text-warning {
    color: var(--sh-warning);
}

.sh-bg-card {
    background-color: var(--sh-card-bg);
}

.sh-rounded-md {
    border-radius: var(--sh-radius-md);
}

.sh-rounded-lg {
    border-radius: var(--sh-radius-lg);
}

.sh-shadow-sm {
    box-shadow: var(--sh-shadow-sm);
}

.sh-shadow-md {
    box-shadow: var(--sh-shadow-md);
}

.sh-hover-lift {
    transition: transform var(--sh-transition-normal);
}

    .sh-hover-lift:hover {
        transform: translateY(-2px);
    }

.sh-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
.sh-page-title {
    font-size: var(--sh-font-size-3xl);
    font-weight: 700;
    color: var(--sh-text-primary) !important; /* Force white color */
    margin: 0;
    display: flex;
    align-items: center;
}

.sh-page-subtitle {
    font-size: var(--sh-font-size-base);
    color: var(--sh-text-primary) !important; /* Force white color instead of gray */
    margin: var(--sh-space-sm) 0 0 0;
}

/* ===== GRID HEADER TEXT FIX ===== */
/* Fix for "Residents list (2 of 2)" text */
.sh-content-section .sh-section-header,
.sh-content-section .sh-section-title {
    color: var(--sh-text-primary) !important;
}

/* Generic section headers */
.sh-section-header h3,
.sh-section-title,
.sh-list-header {
    color: var(--sh-text-primary) !important;
}

/* ===== TABLE DATA TEXT FIX ===== */
/* Fix for table cell text that appears gray */
.sh-table-fixed td {
    color: var(--sh-text-primary) !important;
}

    /* Specific fixes for common gray text patterns */
    .sh-table-fixed td:not(.sh-user-info):not(.sh-action-buttons) {
        color: var(--sh-text-primary) !important;
    }

    /* Fix for any text using secondary or muted colors in data cells */
    .sh-table-fixed td span,
    .sh-table-fixed td p,
    .sh-table-fixed td div {
        color: var(--sh-text-primary) !important;
    }

/* ===== ENSURE CONSISTENT PRIMARY TEXT ===== */
/* Override any secondary/muted text in main content areas */
.sh-page-container .sh-content-section,
.sh-page-container .sh-table-section {
    color: var(--sh-text-primary);
}

/* Make sure icons and data are consistently visible */
.sh-table-fixed td .bi {
    color: var(--sh-primary-orange);
}

.sh-table-fixed td small,
.sh-table-fixed td .small-text {
    color: var(--sh-text-primary) !important;
}

/* ===== PRESERVE INTENTIONAL STYLING ===== */
/* Keep user contact info as intended */
.sh-user-contact,
.sh-user-contact span {
    color: var(--sh-text-primary) !important;
}

/* Keep action buttons as intended */
.sh-action-buttons * {
    /* Don't override button styling */
    color: inherit;
}

/* Keep status badges as intended */
.sh-badge {
    /* Don't override badge styling */
    color: inherit;
}
/* Force all MudBlazor dialogs to use SafeHouse theme */
.mud-dialog {
    background-color: var(--sh-card-bg) !important;
    color: var(--sh-text-primary) !important;
    border-radius: var(--sh-radius-lg) !important;
    border: 1px solid var(--sh-border-color) !important;
}

.mud-dialog-content {
    background-color: var(--sh-card-bg) !important;
    color: var(--sh-text-primary) !important;
    padding: 24px !important;
}

.mud-dialog-title {
    color: var(--sh-primary-orange) !important;
    background: var(--sh-card-bg) !important;
    border-bottom: 1px solid var(--sh-border-color) !important;
}

.mud-dialog-actions {
    background: var(--sh-card-bg) !important;
    border-top: 1px solid var(--sh-border-color) !important;
    padding: 16px 24px !important;
}

/* Dialog backdrop */
.mud-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* =============================================================================
   MUDBLAZOR COMPONENT THEMING IN DIALOGS
============================================================================= */

/* Paper components */
.mud-dialog .mud-paper {
    background-color: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
    border: 1px solid var(--sh-border-color) !important;
}

/* Text components */
.mud-dialog .mud-typography {
    color: var(--sh-text-primary) !important;
}

    .mud-dialog .mud-typography.mud-typography-h6 {
        color: var(--sh-primary-orange) !important;
    }

/* Form inputs */
.mud-dialog .mud-input-control {
    background-color: var(--sh-card-bg-secondary) !important;
}

.mud-dialog .mud-input {
    color: var(--sh-text-primary) !important;
    background-color: var(--sh-card-bg-secondary) !important;
}

.mud-dialog .mud-input-outlined {
    border-color: var(--sh-border-color) !important;
}

    .mud-dialog .mud-input-outlined:hover {
        border-color: var(--sh-primary-orange) !important;
    }

    .mud-dialog .mud-input-outlined.mud-input-outlined-focused {
        border-color: var(--sh-primary-orange) !important;
        box-shadow: 0 0 0 1px var(--sh-primary-orange) !important;
    }

.mud-dialog .mud-input-label {
    color: var(--sh-text-secondary) !important;
}

.mud-dialog .mud-input-label-focused {
    color: var(--sh-primary-orange) !important;
}

/* Select components */
.mud-dialog .mud-select {
    background-color: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
}

/* Date picker */
.mud-dialog .mud-input-date {
    background-color: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
}

/* Tables in dialogs */
.mud-dialog .mud-table {
    background-color: transparent !important;
}

.mud-dialog .mud-table-head {
    background-color: var(--sh-card-bg-secondary) !important;
}

    .mud-dialog .mud-table-head .mud-table-cell {
        color: var(--sh-text-primary) !important;
        border-bottom: 2px solid var(--sh-primary-orange) !important;
    }

.mud-dialog .mud-table-body .mud-table-cell {
    color: var(--sh-text-primary) !important;
    border-bottom: 1px solid var(--sh-border-color) !important;
}

.mud-dialog .mud-table-row:hover {
    background-color: var(--sh-card-bg-secondary) !important;
}

/* Buttons in dialogs */
.mud-dialog .mud-button {
    text-transform: none !important;
}

    .mud-dialog .mud-button.mud-button-filled.mud-button-filled-primary {
        background-color: var(--sh-primary-orange) !important;
        color: white !important;
    }

        .mud-dialog .mud-button.mud-button-filled.mud-button-filled-primary:hover {
            background-color: var(--sh-secondary-orange) !important;
        }

    .mud-dialog .mud-button.mud-button-text {
        color: var(--sh-text-primary) !important;
    }

    .mud-dialog .mud-button.mud-button-outlined {
        border-color: var(--sh-border-color) !important;
        color: var(--sh-text-primary) !important;
    }

/* Progress indicators */
.mud-dialog .mud-progress-circular {
    color: var(--sh-primary-orange) !important;
}

/* Chips */
.mud-dialog .mud-chip {
    background-color: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
    border: 1px solid var(--sh-border-color) !important;
}

/* =============================================================================
   CUSTOM SAFEHOUSE DIALOG COMPONENTS
============================================================================= */

/* Dialog headers with SafeHouse styling */
.dialog-header,
.sh-dialog-header {
    background: var(--sh-card-bg) !important;
    color: var(--sh-primary-orange) !important;
    padding: 1.5rem !important;
    border-bottom: 1px solid var(--sh-border-color) !important;
    margin: -24px -24px 0 -24px !important;
    font-weight: 600 !important;
}

.dialog-content,
.sh-dialog-content {
    background: var(--sh-card-bg) !important;
    color: var(--sh-text-primary) !important;
    padding: 1.5rem !important;
}

/* Scrollable dialog content */
.dialog-scroll {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sh-primary-orange) var(--sh-card-bg-secondary);
}

    .dialog-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .dialog-scroll::-webkit-scrollbar-track {
        background: var(--sh-card-bg-secondary);
        border-radius: 4px;
    }

    .dialog-scroll::-webkit-scrollbar-thumb {
        background: var(--sh-primary-orange);
        border-radius: 4px;
    }

        .dialog-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--sh-secondary-orange);
        }

/* =============================================================================
   ASSET DIALOG SPECIFIC FIXES
============================================================================= */

/* Asset details dialog */
.sh-asset-details-dialog {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: var(--sh-text-primary) !important;
}

/* Asset edit dialog */
.sh-asset-edit-dialog {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: var(--sh-text-primary) !important;
}

/* Asset create dialog */
.sh-asset-create-dialog {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: var(--sh-text-primary) !important;
}

/* Form sections */
.sh-form-section {
    margin-bottom: 2rem;
}

.sh-section-title {
    color: var(--sh-primary-orange) !important;
    border-bottom: 2px solid var(--sh-primary-orange) !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
}

/* Form inputs */
.sh-form-input,
.sh-form-textarea {
    background: var(--sh-card-bg-secondary) !important;
    border: 1px solid var(--sh-border-color) !important;
    color: var(--sh-text-primary) !important;
    border-radius: var(--sh-radius-sm) !important;
    padding: 0.75rem !important;
}

    .sh-form-input:focus,
    .sh-form-textarea:focus {
        border-color: var(--sh-primary-orange) !important;
        box-shadow: 0 0 0 1px var(--sh-primary-orange) !important;
        outline: none !important;
    }

.sh-form-label {
    color: var(--sh-text-primary) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

/* Info grids and sections */
.sh-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sh-info-section {
    background: var(--sh-card-bg-secondary) !important;
    border: 1px solid var(--sh-border-color) !important;
    border-radius: var(--sh-radius-md) !important;
    padding: 1rem !important;
}

    .sh-info-section h6 {
        color: var(--sh-primary-orange) !important;
        margin-bottom: 0.75rem !important;
        font-weight: 600 !important;
    }

.sh-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--sh-border-color);
}

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

.sh-info-label {
    color: var(--sh-text-secondary) !important;
    font-size: 0.875rem;
}

.sh-info-value {
    color: var(--sh-text-primary) !important;
    font-weight: 600;
}

/* Status badges */
.sh-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--sh-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-inactive {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.status-maintenance {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.status-disposed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Buttons */
.sh-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--sh-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sh-btn-primary {
    background: var(--sh-primary-orange) !important;
    color: white !important;
}

    .sh-btn-primary:hover {
        background: var(--sh-secondary-orange) !important;
        transform: translateY(-1px);
    }

.sh-btn-secondary {
    background: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
    border: 1px solid var(--sh-border-color) !important;
}

    .sh-btn-secondary:hover {
        background: var(--sh-border-color) !important;
    }

/* Loading states */
.sh-loading-state,
.sh-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--sh-text-primary) !important;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--sh-border-color);
    border-top: 3px solid var(--sh-primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =============================================================================
   SPECIFIC DIALOG CONTENT FIXES
============================================================================= */

/* Upload zones */
.upload-zone {
    border: 3px dashed var(--sh-border-color) !important;
    background: var(--sh-card-bg-secondary) !important;
    color: var(--sh-text-primary) !important;
}

    .upload-zone:hover {
        border-color: var(--sh-primary-orange) !important;
        background: rgba(255, 140, 0, 0.05) !important;
    }

/* Value charts and analytics */
.value-chart {
    background: var(--sh-card-bg-secondary) !important;
    border: 1px dashed var(--sh-border-color) !important;
    color: var(--sh-text-primary) !important;
}

/* Activity items */
.sh-activity-item {
    background: var(--sh-card-bg-secondary) !important;
    border: 1px solid var(--sh-border-color) !important;
    color: var(--sh-text-primary) !important;
}

/* Helper text */
.sh-form-help {
    color: var(--sh-text-muted) !important;
    font-size: 0.875rem !important;
}

.upload-requirements {
    color: var(--sh-text-muted) !important;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
============================================================================= */

@media (max-width: 768px) {
    .mud-dialog {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem) !important;
    }

    .dialog-header,
    .sh-dialog-header {
        padding: 1rem !important;
        margin: -16px -16px 0 -16px !important;
    }

    .dialog-content,
    .sh-dialog-content {
        padding: 1rem !important;
    }

    .mud-dialog-actions {
        padding: 1rem 16px !important;
    }
}
