/* Custom CSS for Car Management Dashboard */

/* Import Vazir Font */
@font-face {
    font-family: 'Vazir'; /* نام دلخواه برای فونت */
    src: url('../fonts/Vazir-Medium.woff2') format('woff2'); /* مسیر فونت نسبت به فایل CSS */
    font-weight: 500; /* یا مقدار مناسب با وزن فونت */
    font-style: normal;
}
/* Vazir Light */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Light.woff2') format('woff2');
    font-weight: 300; /* Light */
    font-style: normal;
}

/* Vazir Medium */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Medium.woff2') format('woff2');
    font-weight: 500; /* Medium */
    font-style: normal;
}

/* Apply Vazir Font to all elements EXCEPT FontAwesome icons */
* {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Preserve FontAwesome font-family for icons */
.fa,
.fas,
.far,
.fab,
.fa-solid,
.fa-regular,
.fa-brands,
[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* Ensure FontAwesome icons display properly */
.fa-solid,
.fas {
    font-weight: 900;
}

.fa-regular,
.far {
    font-weight: 400;
}

.fa-brands,
.fab {
    font-weight: 400;
}

/* Improve font rendering for Vazir */
body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Font weights for Vazir */
.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-black {
    font-weight: 900;
}

/* RTL Support */
[dir="rtl"] .space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Button Animations */
.btn-animate {
    transition: all 0.2s ease;
}

.btn-animate:hover {
    transform: scale(1.05);
}

.btn-animate:active {
    transform: scale(0.95);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Notification Badge */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Sidebar Hover Effects */
.sidebar-link {
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #22c55e;
    transition: width 0.3s ease;
}

.sidebar-link:hover::before {
    width: 4px;
}

/* Form Input Focus Effects */
.input-focus {
    transition: all 0.3s ease;
}

.input-focus:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Table Row Hover */
.table-row-hover {
    transition: background-color 0.2s ease;
}

.table-row-hover:hover {
    background-color: #f0fdf4;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-inactive {
    background-color: #fef2f2;
    color: #dc2626;
}

.status-repair {
    background-color: #fef3c7;
    color: #d97706;
}

.status-sold {
    background-color: #e0e7ff;
    color: #7c3aed;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }

    .mobile-full {
        width: 100%;
    }

    /* Alerts grid - stack on mobile */
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Ensure proper spacing on mobile */
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    /* Fix overflow on mobile */
    .overflow-hidden {
        overflow: hidden;
    }

    /* Mobile-friendly card spacing */
    .rounded-2xl {
        border-radius: 1rem;
    }

    /* Better touch targets */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }

    /* Fix horizontal scroll on mobile */
    body {
        overflow-x: hidden;
    }

    /* Mobile-friendly text truncation */
    .truncate {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Stack grid items on very small screens */
    @media (max-width: 480px) {
        .grid-cols-2 {
            grid-template-columns: 1fr !important;
        }
    }
}

@media (min-width: 769px) {
    .desktop-hidden {
        display: none;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Visible for Keyboard Navigation */
.focus-visible:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card-hover:hover {
        border: 2px solid #22c55e;
    }
} 

/* --- Header & Sidebar Professional Styles --- */

/* Navbar gradient and shadow */
nav {
    box-shadow: 0 4px 24px 0 rgba(34,197,94,0.10), 0 1.5px 0 0 #bbf7d0;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

/* Sidebar gradient and shadow */
#sidebar {
    background: linear-gradient(180deg, #bbf7d0 0%, #fff 60%, #f0fdf4 100%);
    box-shadow: 0 8px 32px 0 rgba(34,197,94,0.10), 0 0.5px 0 0 #bbf7d0;
    border-top-right-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

/* Sidebar user info */
#sidebar .user-info {
    background: linear-gradient(90deg, #bbf7d0 0%, #fff 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px 0 rgba(34,197,94,0.08);
}

/* Sidebar links */
.sidebar-link {
    font-size: 0.95rem; /* normalized to compact sizing across pages */
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 4px 0 rgba(34,197,94,0.04);
}
.sidebar-link:hover, .sidebar-link.bg-green-400\/80 {
    background: linear-gradient(90deg, #22c55e 60%, #bbf7d0 100%);
    color: #fff !important;
    box-shadow: 0 4px 16px 0 rgba(34,197,94,0.10);
}

/* Divider style */
#sidebar hr {
    border-color: #bbf7d0;
    opacity: 0.7;
}

/* Navbar user menu */
#userMenu {
    box-shadow: 0 8px 32px 0 rgba(34,197,94,0.10);
    border-radius: 1rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    nav {
        border-radius: 0 0 1.25rem 1.25rem;
    }
    #sidebar {
        border-radius: 0 1.25rem 1.25rem 0;
    }
}

/* Keep sidebar visible on scroll (desktop) */
@media (min-width: 768px) {
    #sidebar {
        position: sticky; /* remain in view during page scroll */
        top: 4.5rem; /* approximate navbar height */
        height: calc(100vh - 4.5rem);
        overflow-y: auto; /* scroll inside sidebar if needed */
    }
}

/* --- Compact Sidebar Enhancements --- */
/* Make sidebar slightly slimmer on desktop while keeping mobile full-width */
#sidebar {
    width: 12rem !important; /* enforce compact width (was 16rem) */
    flex: 0 0 12rem !important; /* ensure flex-basis follows width in flex layouts */
}

/* Compact link spacing, typography, and icon sizing */
#sidebar .sidebar-link {
    padding: 0.5rem 0.75rem; /* tighter spacing */
    font-size: 0.9rem; /* smaller text */
    border-radius: 0.75rem;
}

#sidebar .sidebar-link i {
    font-size: 0.95rem; /* tighter icon size */
}

/* Subtle active indicator and refined hover */
#sidebar .sidebar-link::before {
    width: 0; /* default hidden */
    transition: width 0.25s ease;
}
#sidebar .sidebar-link:hover::before {
    width: 2px; /* thinner accent bar on hover */
}

/* Stronger current/active state (when Tailwind active class applied) */
#sidebar .sidebar-link.bg-green-400\/80 {
    background: linear-gradient(90deg, #16a34a 60%, #bbf7d0 100%);
    box-shadow: 0 6px 18px 0 rgba(34,197,94,0.18);
}

/* Tighter divider spacing for compact menu */
#sidebar hr {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Keep mobile full width and comfortable tap targets */
@media (max-width: 768px) {
    #sidebar {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    #sidebar .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 1.05rem;
    }

    /* Sidebar overlay for mobile */
    #sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 29;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    #sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar slide animation */
    #sidebar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Smooth scroll for mobile */
    html {
        -webkit-overflow-scrolling: touch;
    }
} 

/* --- Collapsed Sidebar Mode (desktop) --- */
body.sidebar-collapsed #sidebar {
    width: 4.25rem !important; /* compact icon rail */
    flex: 0 0 4.25rem !important;
}
body.sidebar-collapsed #sidebar .px-4 { /* container paddings inside nav */
    padding-left: 0.5rem; /* LTR fallback */
    padding-right: 0.5rem; /* RTL primary */
}
body.sidebar-collapsed #sidebar .sidebar-link {
    padding: 0.625rem; /* square-ish icon buttons */
    justify-content: center;
}
body.sidebar-collapsed #sidebar .sidebar-link i {
    margin-left: 0 !important;
    font-size: 1.1rem;
}
body.sidebar-collapsed #sidebar .sidebar-link span {
    display: none; /* hide labels when collapsed */
}
body.sidebar-collapsed #sidebar hr { display: none; }

/* Keep user info hidden in collapsed mode */
body.sidebar-collapsed #sidebar .md\:flex { display: none; }

/* Main content should naturally expand due to flex; no extra margin needed */

/* Tooltips via title attribute will show on hover automatically */ 

/* HSE styles moved to assets/css/hse-styles.css to avoid cross-page conflicts */

/* ============================================
   Settings Page - Modern Professional Styles
   ============================================ */

/* Main Content Area */
.settings-main {
    flex: 1;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: calc(100vh - 4.5rem);
    position: relative;
}

.settings-main::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.settings-container {
    max-width: 56rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Page Header */
.settings-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    position: relative;
    overflow: hidden;
}

.settings-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(34, 197, 94, 0.1) 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.settings-header-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 0.875rem;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    position: relative;
    z-index: 1;
}

.settings-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    position: relative;
    z-index: 1;
}

.settings-header-subtitle {
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* Card Styles */
.settings-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.settings-card:hover::before {
    opacity: 1;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.settings-card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.25rem;
}

.settings-card-icon.green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.settings-card-icon.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.settings-card-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.settings-card-subtitle {
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

/* Form Elements */
.settings-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.settings-input-wrapper {
    position: relative;
}

.settings-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

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

.settings-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.settings-input-icon:hover {
    color: #22c55e;
}

.settings-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1.25rem;
    padding-left: 2.5rem;
}

.settings-input-date {
    background-color: #f8fafc;
    cursor: pointer;
}

.settings-input-date:focus {
    background-color: #ffffff;
}

/* Buttons */
.settings-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.settings-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.settings-btn-primary:hover::before {
    opacity: 1;
}

.settings-btn-primary.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.settings-btn-primary.green:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

.settings-btn-primary.green:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.settings-btn-primary.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.settings-btn-primary.blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.settings-btn-primary.blue:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Form Section */
.settings-form-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.875rem;
    border: 1px solid #e2e8f0;
}

.settings-form-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

/* Requirements Box */
.settings-requirements-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #bbf7d0;
}

.settings-requirements-box h4 {
    font-weight: 600;
    color: #166534;
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
}

.settings-requirements-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-requirements-box li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    color: #1e293b;
    font-size: 0.9rem;
}

/* Date Grid */
.settings-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox Container */
.settings-checkbox-container {
    max-height: 16rem;
    overflow-y: auto;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #ffffff;
}

.settings-checkbox-container::-webkit-scrollbar {
    width: 6px;
}

.settings-checkbox-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.settings-checkbox-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.settings-checkbox-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Subsection Title */
.settings-subsection-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

/* Delegations List */
.settings-delegations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* List Section */
.settings-list-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

/* ============================================
   Settings Grid - Side by Side Layout
   ============================================ */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1.25rem;
    align-items: start;
}

/* Compact Card Variant */
.settings-card-compact {
    padding: 1.25rem;
    margin-bottom: 0;
}

.settings-card-compact::before {
    display: none;
}

.settings-card-compact:hover {
    transform: none;
}

/* Mini Card Header */
.settings-card-header-mini {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.settings-card-header-mini .settings-card-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.settings-card-title-mini {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Mini Form */
.settings-form-mini {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* Small Input */
.settings-input-sm {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

/* Small Button */
.settings-btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Mini Requirements Box */
.settings-requirements-mini {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 0.5rem;
    padding: 0;
    font-size: 0.8rem;
}

.settings-requirements-mini summary {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #166534;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.settings-requirements-mini summary::-webkit-details-marker {
    display: none;
}

.settings-requirements-mini summary::before {
    content: '\f056';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #22c55e;
    transition: transform 0.2s ease;
}

.settings-requirements-mini[open] summary::before {
    content: '\f057';
}

.settings-requirements-mini ul {
    list-style: none;
    padding: 0 0.75rem 0.625rem;
    margin: 0;
}

.settings-requirements-mini li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0;
    color: #374151;
    font-size: 0.8rem;
}

.settings-requirements-mini li i {
    font-size: 0.65rem;
    color: #22c55e;
}

/* Small Checkbox Container */
.settings-checkbox-container-sm {
    max-height: 10rem;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: #ffffff;
}

.settings-checkbox-container-sm::-webkit-scrollbar {
    width: 4px;
}

.settings-checkbox-container-sm::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

/* Mini List Section */
.settings-list-section-mini {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f1f5f9;
}

.settings-subsection-title-mini {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.625rem 0;
}

.settings-delegations-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ============================================
   Responsive Styles - Mobile First
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .settings-main {
        padding: 1rem;
        background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    }

    .settings-main::before {
        width: 200px;
        height: 200px;
    }

    .settings-header {
        padding: 1.25rem 1rem;
        gap: 0.75rem;
        flex-direction: row;
        text-align: right;
    }

    .settings-header-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .settings-header-title {
        font-size: 1.375rem;
    }

    .settings-header-subtitle {
        font-size: 0.85rem;
    }

    .settings-card {
        padding: 1.25rem;
        border-radius: 0.875rem;
        margin-bottom: 1rem;
    }

    /* Stack grid on tablet */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-card-compact {
        padding: 1rem;
    }

    .settings-card-header {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }

    .settings-card-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .settings-card-title {
        font-size: 1.125rem;
    }

    .settings-card-subtitle {
        font-size: 0.8rem;
    }

    .settings-form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .settings-input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .settings-date-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .settings-btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .settings-checkbox-container {
        max-height: 12rem;
        padding: 0.75rem;
    }

    .settings-requirements-box {
        padding: 0.875rem;
    }

    .settings-requirements-box li {
        font-size: 0.85rem;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .settings-main {
        padding: 0.75rem;
    }

    .settings-header {
        padding: 1rem 0.875rem;
        border-radius: 0.75rem;
    }

    .settings-header-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
        border-radius: 0.625rem;
    }

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

    .settings-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .settings-card-compact {
        padding: 0.875rem;
    }

    .settings-card-header {
        gap: 0.625rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .settings-card-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.95rem;
        border-radius: 0.5rem;
    }

    .settings-card-title {
        font-size: 1rem;
    }

    .settings-label {
        font-size: 0.8rem;
    }

    .settings-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 0.625rem;
    }

    .settings-btn-primary {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
        border-radius: 0.625rem;
    }

    .settings-form-section {
        padding: 0.875rem;
        border-radius: 0.625rem;
    }

    .settings-requirements-box {
        padding: 0.75rem;
        border-radius: 0.625rem;
    }

    .settings-delegations-list > div {
        padding: 0.875rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .settings-main {
        padding: 0.75rem 1rem;
    }

    .settings-header {
        padding: 0.875rem 1rem;
    }

    .settings-date-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .settings-card {
        border-width: 0.5px;
    }

    .settings-input {
        border-width: 1px;
    }
}

/* Print Styles */
@media print {
    .settings-main {
        background: white;
        padding: 0;
    }

    .settings-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }

    .settings-header {
        box-shadow: none;
        background: white;
    }

    .settings-btn-primary {
        display: none;
    }
}