/* ========================================
   PROFESSIONAL TAX MANAGEMENT SYSTEM
   Modern, Clean, User-Centric Design
   ======================================== */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Refined Color Palette - Professional & Eye-Friendly */
    --primary-color: #D32F2F;
    --primary-hover: #C62828;
    --primary-light: #FFCDD2;
    --primary-gradient: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    
    --success-color: #388E3C;
    --success-hover: #2E7D32;
    --success-light: #C8E6C9;
    
    --info-color: #1976D2;
    --info-hover: #1565C0;
    --info-light: #BBDEFB;
    
    --warning-color: #F57C00;
    --warning-hover: #E65100;
    --warning-light: #FFE0B2;
    
    --neutral-900: #1A1A1A;
    --neutral-800: #2D2D2D;
    --neutral-700: #424242;
    --neutral-600: #616161;
    --neutral-500: #757575;
    --neutral-400: #9E9E9E;
    --neutral-300: #BDBDBD;
    --neutral-200: #E0E0E0;
    --neutral-100: #F5F5F5;
    --neutral-50: #FAFAFA;
    
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-muted: var(--neutral-500);
    
    --bg-body: #F8F9FA;
    --bg-surface: #FFFFFF;
    --bg-subtle: var(--neutral-50);
    --bg-hover: #F5F5F5;
    
    --border-light: #EEEEEE;
    --border-medium: #E0E0E0;
    --border-strong: #BDBDBD;
    
    --shadow-xs: 0 0.07vw 0.13vw rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 0.13vw 0.26vw rgba(0, 0, 0, 0.06);
    --shadow-md: 0 0.26vw 0.52vw rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 0.52vw 1.04vw rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 1.04vw 2.08vw rgba(0, 0, 0, 0.12);
    
    --radius-sm: 0.39vw;
    --radius-md: 0.65vw;
    --radius-lg: 0.91vw;
    --radius-xl: 1.17vw;
    --radius-full: 650.98vw;
    
    --space-1: 0.26vw;
    --space-2: 0.52vw;
    --space-3: 0.78vw;
    --space-4: 1.04vw;
    --space-5: 1.3vw;
    --space-6: 1.56vw;
    --space-8: 2.08vw;
    --space-10: 2.6vw;
    --space-12: 3.12vw;
    --space-16: 4.17vw;
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--bg-surface);
    border-bottom: 0.12vh solid var(--border-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(0.78vw);
    background: rgba(255, 255, 255, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 8.33vh;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.78vw;
    margin-right: 1.3vw;
}

.navbar-brand .brand-logo {
    width: 2.93vw;
    height: 5.21vh;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.17vw;
    letter-spacing: -0.03vw;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.navbar-brand h1 {
    font-size: 1.43vw;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02vw;
    margin: 0;
    line-height: 1.2;
}

.navbar-subtitle {
    font-size: 0.85vw;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0.13vw 0 0 0;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.26vw;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.52vw 0.78vw;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.85vw;
    display: flex;
    align-items: center;
    gap: 0.39vw;
    position: relative;
}

.nav-icon {
    font-size: 1.04vw;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.navbar-menu a:hover .nav-icon {
    opacity: 1;
}

.navbar-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 0.23vh;
    background: var(--primary-color);
    transition: transform var(--transition-base);
    border-radius: var(--radius-full);
}

.navbar-menu a:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.navbar-menu a:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.navbar-menu a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.navbar-menu a.active .nav-icon {
    opacity: 1;
}

.navbar-menu a.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Navigation User Section */
.nav-user-section {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.52vw;
    padding-left: 0.78vw;
    border-left: 0.07vw solid var(--border-light);
}

.nav-username {
    color: var(--text-secondary);
    font-size: 0.85vw;
    font-weight: 500;
    padding: 0.52vw 0.65vw;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.39vw;
}

.nav-username::before {
    content: '👤';
    font-size: 1.04vw;
    opacity: 0.7;
}

.btn-logout {
    background: var(--primary-gradient) !important;
    color: white !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    font-size: 0.91vw !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--space-2) !important;
    transition: all var(--transition-fast) !important;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-logout:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-0.07vw);
    box-shadow: var(--shadow-md);
}

.btn-logout::before {
    display: none !important;
}

.btn-logout .nav-icon {
    opacity: 1;
    font-size: 0.91vw;
}

/* ===== ALERTS ===== */
.alert {
    padding: var(--space-4) 2.47vw;
    padding-right: calc(var(--space-5) + 2.6vw); /* Extra space for close button */
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    position: relative;
    animation: alertSlideIn var(--transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
    border: 0.07vw solid;
    font-size: 0.91vw;
    line-height: 1.5;
}

@keyframes alertSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-0.78vw);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #F1F8F4;
    color: #1B5E32;
    border-color: var(--success-light);
}

.alert-error {
    background-color: #FEF3F2;
    color: #7A1C1C;
    border-color: var(--primary-light);
}

.alert-info {
    background-color: #F0F7FF;
    color: #0B4A8F;
    border-color: var(--info-light);
}

.alert-warning {
    background-color: #FFF8E8;
    color: #6B4B0F;
    border-color: var(--warning-light);
}

.alert-icon {
    width: 1.3vw;
    height: 2.31vh;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.91vw;
    margin-top: 0.12vh;
}

.alert-success .alert-icon {
    background-color: var(--success-color);
    color: white;
}

.alert-error .alert-icon {
    background-color: var(--primary-color);
    color: white;
}

.alert-info .alert-icon {
    background-color: var(--info-color);
    color: white;
}

.alert-warning .alert-icon {
    background-color: var(--warning-color);
    color: white;
}

.alert-close {
    position: absolute;
    right: var(--space-4);
    margin-left: 1.3vw;
    top: var(--space-4);
    background: none;
    border: none;
    font-size: 1.17vw;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    width: 1.82vw;
    height: 3.24vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: calc(100vh - 23.15vh);
    padding: var(--space-10) 0;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: var(--space-10);
}

.page-header h2 {
    font-size: 1.82vw;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.03vw;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.98vw;
    font-weight: 400;
}

/* ===== DASHBOARD ===== */
.dashboard {
    animation: fadeIn var(--transition-slow) ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(0.52vw); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== GLOBAL SEARCH ===== */
.global-search-container {
    position: relative;
    margin-bottom: var(--space-8);
    z-index: 100;
}

.global-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.52vw 1.04vw;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.global-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1), var(--shadow-md);
}

.global-search-bar .search-icon {
    width: 1.3vw;
    height: 2.31vh;
    color: var(--text-muted);
    margin-right: 0.78vw;
    flex-shrink: 0;
}

.global-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.04vw;
    color: var(--text-primary);
    background: transparent;
    padding: 0.26vw 0;
}

.global-search-input::placeholder {
    color: var(--text-muted);
}

.global-search-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.52vw 1.04vw;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: 0.52vw;
    flex-shrink: 0;
}

.global-search-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.global-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.global-search-button i {
    width: 1.17vw;
    height: 2.08vh;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 0.52vw);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    padding: 0.78vw 1.04vw;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.91vw;
}

.search-category {
    padding: 0.52vw 0;
}

.search-category h4 {
    padding: 0.52vw 1.04vw;
    font-size: 0.98vw;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.52vw;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
}

.search-category h4 i {
    width: 1.04vw;
    height: 1.85vh;
}

.search-result-item {
    display: block;
    padding: 0.78vw 1.04vw;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-hover);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(1.04vw - 3px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.98vw;
    margin-bottom: 0.26vw;
}

.search-result-title mark {
    background: rgba(211, 47, 47, 0.2);
    color: var(--primary-color);
    padding: 0.13vw 0.26vw;
    border-radius: 2px;
    font-weight: 700;
}

.search-result-meta {
    font-size: 0.85vw;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.78vw;
    flex-wrap: wrap;
}

.search-result-meta .badge {
    background: var(--neutral-200);
    color: var(--neutral-700);
    padding: 0.13vw 0.52vw;
    border-radius: var(--radius-sm);
    font-size: 0.78vw;
    font-weight: 500;
}

.search-empty,
.search-error {
    padding: 2.6vw;
    text-align: center;
    color: var(--text-secondary);
}

.search-empty i,
.search-error i {
    width: 3.12vw;
    height: 5.56vh;
    color: var(--neutral-400);
    margin-bottom: 0.78vw;
}

.search-error {
    color: var(--primary-color);
}

.search-error i {
    color: var(--primary-color);
}

.search-info {
    display: flex;
    align-items: center;
    gap: 0.52vw;
    margin-top: 0.52vw;
    padding: 0.52vw 0.78vw;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(33, 150, 243, 0.05) 100%);
    border-radius: var(--radius-md);
    font-size: 0.85vw;
    color: var(--info-color);
}

.search-info i {
    flex-shrink: 0;
}

/* Animation for spinning loader */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16.93vw, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.stat-card {
    background: var(--bg-surface);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 0.07vw solid var(--border-light);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.35vh;
    background: var(--primary-color);
    transition: height var(--transition-base);
}

.stat-card.stat-success::before {
    background: var(--success-color);
}

.stat-card.stat-warning::before {
    background: var(--warning-color);
}

.stat-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.13vw);
}

.stat-card:hover::before {
    height: 0.46vh;
}

.stat-card .stat-icon {
    width: 3.12vw;
    height: 5.56vh;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3vw;
    margin-bottom: var(--space-4);
    color: var(--primary-color);
    font-weight: 600;
}

.stat-card.stat-success .stat-icon {
    background: var(--success-light);
    color: var(--success-color);
}

.stat-card.stat-warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning-color);
}

.stat-card h3 {
    font-size: 2.08vw;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.07vw;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.85vw;
    text-transform: uppercase;
    letter-spacing: 0.05vw;
    font-weight: 500;
}

.stat-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    color: var(--info-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.91vw;
    transition: all var(--transition-fast);
}

.stat-link:hover {
    color: var(--info-hover);
    gap: var(--space-3);
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: 1.3vw;
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    letter-spacing: -0.02vw;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14.32vw, 1fr));
    gap: var(--space-6);
}

.action-card {
    background: var(--bg-surface);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 0.07vw solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.action-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.13vw);
    border-color: var(--border-medium);
}

.action-card.action-primary {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
}

.action-card.action-primary:hover {
    box-shadow: var(--shadow-lg);
}

.action-card.action-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2E7D32 100%);
    color: white;
    border-color: var(--success-color);
}

.action-card.action-success:hover {
    box-shadow: var(--shadow-lg);
}

.action-card .action-icon {
    width: 2.86vw;
    height: 5.09vh;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3vw;
    margin-bottom: var(--space-4);
    font-weight: 600;
}

.action-card:not(.action-primary):not(.action-success) .action-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.action-card h4 {
    font-size: 1.04vw;
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.action-card p {
    font-size: 0.85vw;
    opacity: 0.85;
    line-height: 1.5;
}

/* ===== TABLES ===== */
.table-container {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 0.07vw solid var(--border-light);
    overflow: hidden;
    margin-top: 5.79vh;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-subtle);
    border-bottom: 0.12vh solid var(--border-light);
}

.data-table th {
    padding: var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.72vw;
    letter-spacing: 0.05vw;
}

.data-table td {
    padding: var(--space-4);
    border-bottom: 0.12vh solid var(--border-light);
    font-size: 0.91vw;
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: var(--bg-subtle);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.amount {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.91vw;
}

.amount-positive {
    color: var(--success-color);
}

.amount-negative {
    color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.91vw;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: 0.07vw solid var(--primary-color);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.07vw);
}

.btn-secondary {
    background-color: var(--neutral-600);
    color: white;
    border: 0.07vw solid var(--neutral-600);
}

.btn-secondary:hover {
    background-color: var(--neutral-700);
    transform: translateY(-0.07vw);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-hover) 100%);
    color: white;
    border: 0.07vw solid var(--success-color);
}

.btn-success:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.07vw);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-hover) 100%);
    color: white;
    border: 0.07vw solid var(--info-color);
}

.btn-info:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.07vw);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-hover) 100%);
    color: white;
    border: 0.07vw solid var(--warning-color);
}

.btn-warning:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-0.07vw);
}

.btn-outline {
    background: transparent;
    border: 0.13vw solid var(--border-medium);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--border-strong);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.85vw;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.04vw;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.78vw;
    font-weight: 600;
    letter-spacing: 0.02vw;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-color);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-color);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

/* ===== FORMS - Modern & Polished ===== */
.form-container {
    /* max-width: 52.08vw; */
    margin: 1.3vw auto;
}

.form-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 0.07vw solid var(--border-light);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
}

.form-section {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 0.12vh solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-6);
}

.form-section h3 {
    font-size: 1.17vw;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 0.23vh solid var(--primary-color);
    display: inline-block;
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label,
label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 0.91vw;
    color: var(--text-primary);
    letter-spacing: 0.01vw;
}

.required {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 0.13vw;
}

.form-hint,
.form-text,
small.form-hint {
    display: block;
    margin-top: var(--space-2);
    font-size: 0.85vw;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Form Controls - Beautiful Inputs */
.form-input,
.form-select,
.form-textarea,
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.78vw 1.04vw;
    border: 0.13vw solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.98vw;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-surface);
    transition: all var(--transition-base);
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Focused State - Prominent & Clear */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.26vw var(--primary-light);
    background-color: #FFFFFF;
}

/* Hover State */
.form-input:hover:not(:focus),
.form-select:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-control:hover:not(:focus),
input[type="text"]:hover:not(:focus),
input[type="email"]:hover:not(:focus),
input[type="tel"]:hover:not(:focus),
input[type="number"]:hover:not(:focus),
input[type="date"]:hover:not(:focus),
input[type="password"]:hover:not(:focus),
input[type="url"]:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
    border-color: var(--border-medium);
    background-color: var(--bg-subtle);
}

/* Disabled State */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
.form-control:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    background-color: var(--neutral-100);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Placeholder Styling */
.form-input::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--neutral-400);
    opacity: 1;
}

/* Select Dropdown - Custom Arrow */
.form-select,
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616161' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.78vw center;
    padding-right: 2.6vw;
    cursor: pointer;
}

.form-select:focus,
select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D32F2F' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Textarea Specific */
.form-textarea,
textarea {
    resize: vertical;
    min-height: 11.57vh;
    line-height: 1.6;
}

/* Date Input Styling */
input[type="date"] {
    position: relative;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Number Input - Remove Spinners (Optional) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Form Validation States */
.form-input.is-valid,
.form-control.is-valid,
input.is-valid {
    border-color: var(--success-color);
}

.form-input.is-invalid,
.form-control.is-invalid,
input.is-invalid {
    border-color: var(--primary-color);
}

.form-input.is-valid:focus,
.form-control.is-valid:focus,
input.is-valid:focus {
    box-shadow: 0 0 0 0.26vw var(--success-light);
}

.form-input.is-invalid:focus,
.form-control.is-invalid:focus,
input.is-invalid:focus {
    box-shadow: 0 0 0 0.26vw var(--primary-light);
}

.valid-feedback {
    display: block;
    margin-top: var(--space-2);
    font-size: 0.85vw;
    color: var(--success-color);
}

.invalid-feedback {
    display: block;
    margin-top: var(--space-2);
    font-size: 0.85vw;
    color: var(--primary-color);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-4);
    padding-top: var(--space-6);
    margin-top: var(--space-6);
    border-top: 0.12vh solid var(--border-light);
}

/* Checkbox & Radio Styling */
input[type="checkbox"],
input[type="radio"] {
    width: 1.17vw;
    height: 2.08vh;
    border: 0.13vw solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: var(--space-2);
    vertical-align: middle;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 0.2vw var(--primary-light);
}

/* Input Groups */
.input-group {
    display: flex;
    gap: var(--space-3);
}

.input-group .form-group {
    flex: 1;
}

/* Form Row for Side-by-Side Fields */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.02vw, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-surface);
    border-top: 0.12vh solid var(--border-light);
    padding: var(--space-8) 0;
    margin-top: var(--space-16);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.91vw;
}

.footer p {
    margin: var(--space-2) 0;
}

.footer-info {
    font-size: 0.85vw;
    color: var(--text-muted);
}

/* ===== UTILITY CLASSES ===== */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-6);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4.17vw;
    margin-bottom: var(--space-6);
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.3vw;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.info-box {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--info-light);
    border: 0.07vw solid var(--info-color);
    color: var(--info-hover);
    margin-bottom: var(--space-6);
}

.success-box {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--success-light);
    border: 0.07vw solid var(--success-color);
    color: var(--success-hover);
    margin-bottom: var(--space-6);
}

.warning-box {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--warning-light);
    border: 0.07vw solid var(--warning-color);
    color: var(--warning-hover);
    margin-bottom: var(--space-6);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.action-buttons .btn {
    flex-shrink: 0;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: var(--space-8);
    /* Flexbox for centering */
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"],
.modal[style*="display:block"] {
    display: flex !important;
}

.modal-content {
    background-color: var(--bg-surface);
    margin: auto;
    padding: var(--space-8);
    border: 0.07vw solid var(--border-light);
    border-radius: var(--radius-lg);
    max-width: 46.88vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-1.3vw);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    font-size: 1.56vw;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.close {
    color: var(--neutral-500);
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    font-size: 1.82vw;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
    background: none;
    border: none;
    padding: 0;
    width: 1.95vw;
    height: 3.47vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* ===== SELECT2 CUSTOM STYLES ===== */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 5.09vh;
    border: 0.07vw solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    font-size: 0.98vw;
    background-color: var(--bg-surface);
    transition: all var(--transition-base);
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--neutral-400);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2vw rgba(211, 47, 47, 0.1);
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 4.86vh;
    padding-left: 0;
    color: var(--text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 4.86vh;
    right: var(--space-3);
}

.select2-dropdown {
    border: 0.07vw solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.46vh;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 0.07vw solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    font-size: 0.91vw;
    outline: none;
    transition: all var(--transition-base);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.13vw rgba(211, 47, 47, 0.1);
}

.select2-container--default .select2-results__option {
    padding: var(--space-3) var(--space-4);
    font-size: 0.91vw;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--primary-color);
    color: white;
}

.select2-container--default .select2-results__option[aria-selected="true"]:hover {
    background-color: var(--primary-hover);
}

.select2-results__message {
    padding: var(--space-4);
    color: var(--text-muted);
    font-size: 0.91vw;
}

/* Make select2 match form-control styling */
.form-group .select2-container {
    margin-top: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Landscape & Below */
@media (max-width: 1024px) {
    body {
        font-size: 15px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card {
        padding: 20px;
    }
}

/* Tablet Portrait & Mobile */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }
    
    .navbar-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .page-header {
        padding: 16px 0;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    /* Tables - Mobile Optimized */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    table {
        font-size: 13px;
        min-width: 600px;
    }
    
    th, td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .table-actions {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 80px;
    }
    
    .table-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Forms - Mobile First */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-control,
    .form-select,
    .form-input,
    .form-textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 14px;
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 6px;
        font-weight: 500;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    /* Buttons - Touch Optimized */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px; /* iOS touch target */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Select2 - Mobile Friendly */
    .select2-container--default .select2-selection--single {
        height: 44px;
        font-size: 16px;
        padding: 0 12px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 42px;
        font-size: 16px;
        padding-left: 0;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px;
        right: 8px;
    }
    
    .select2-dropdown {
        font-size: 16px;
    }
    
    .select2-results__option {
        padding: 12px 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Modals - Full Width on Mobile */
    .modal {
        padding: 0;
    }
    
    .modal-content {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 20px 16px;
    }
    
    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .close {
        font-size: 32px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 8px;
        right: 8px;
    }
    
    /* Filters */
    .filters-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-group {
        margin-bottom: 12px;
    }
    
    /* Pagination - Mobile Optimized */
    .pagination {
        justify-content: center;
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Progress Bars */
    #import-progress {
        margin: 16px 0;
        padding: 12px;
    }
    
    #import-progress-bar {
        height: 8px;
    }
    
    /* Info Boxes */
    .info-box {
        font-size: 14px;
        padding: 12px;
        margin: 16px 0;
    }
    
    .info-box ol,
    .info-box ul {
        padding-left: 20px;
        margin-top: 8px;
    }
    
    .info-box li {
        margin-bottom: 8px;
    }
    
    /* Alert Messages */
    .alert {
        padding: 12px;
        font-size: 14px;
        margin: 12px 0;
    }
    
    .alert-close {
        min-width: 32px;
        min-height: 32px;
        font-size: 24px;
    }
    
    /* Icons - Responsive Sizing */
    [data-lucide] {
        width: 20px !important;
        height: 20px !important;
    }
    
    .btn [data-lucide] {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Stat Cards */
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 13px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .card {
        padding: 12px;
        margin: 12px 0;
    }
    
    .page-header {
        padding: 12px 0;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
    }
    
    table {
        font-size: 12px;
        min-width: 500px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .modal-content {
        padding: 16px 12px;
    }
    
    .modal-content h2 {
        font-size: 18px;
    }
    
    .info-box {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Stack buttons vertically on very small screens */
    .btn-group,
    .form-actions,
    [style*="display: flex"] .btn {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn,
    .form-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .page-header h1 {
        font-size: 18px;
    }
    
    .card-header h2 {
        font-size: 15px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    table {
        min-width: 450px;
    }
    
    .modal-content h2 {
        font-size: 16px;
    }
}

/* Touch-specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch devices */
    .btn,
    a,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover,
    a:hover {
        transform: none;
    }
    
    /* Add active state for touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Improve scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== LOGIN PAGE STYLES ===== */
body.login-page {
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 440px;
    padding: 40px 32px;
    animation: slideUp 0.5s ease;
    margin: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 4.17vh;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #616161;
    font-size: 15px;
    margin: 0;
    font-weight: 400;
}

.login-page .form-group {
    margin-bottom: 24px;
}

.login-page .form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-page .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 0.13vw solid #E0E0E0;
    border-radius: 0.65vw;
    font-size: 0.98vw;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.login-page .form-group input:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    font-family: inherit;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Flash Messages - Position for Login Page */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 420px;
}

/* Login Page Alert Styling - Override default alerts */
.login-page .alert {
    padding: 16px 20px;
    padding-right: 50px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    border: none;
    border-left: 4px solid;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-page .alert-success {
    background: #F1F8F4;
    color: #1B5E32;
    border-left-color: #388E3C;
}

.login-page .alert-danger,
.login-page .alert-error {
    background: #FFEBEE;
    color: #B71C1C;
    border-left-color: #D32F2F;
}

.login-page .alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left-color: #F57C00;
}

.login-page .alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-left-color: #1976D2;
}

.login-page .alert-icon {
    margin-right: 12px;
    font-size: 20px;
    background: none;
    width: auto;
    height: auto;
}

.login-page .alert-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    width: 24px;
    height: 24px;
    padding: 0;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E0E0E0;
    color: #757575;
    font-size: 13px;
}

.login-footer p {
    margin: 6px 0;
}

/* ============================================
   Mobile-Specific Styles for Login Page
   ============================================ */

/* Tablets and smaller */
@media (max-width: 768px) {
    .login-container {
        width: 95%;
        padding: 32px 24px;
        margin: 16px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .flash-messages {
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    body.login-page {
        padding: 0;
    }
    
    .login-container {
        width: 100%;
        max-width: none;
        padding: 28px 20px;
        margin: 12px;
        border-radius: 8px;
    }
    
    .login-header {
        margin-bottom: 28px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .login-page .form-group {
        margin-bottom: 20px;
    }
    
    .login-page .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .login-page .form-group input {
        padding: 10px 14px;
        font-size: 16px; /* Prevent iOS zoom on input focus */
    }
    
    .btn-login {
        padding: 12px;
        font-size: 16px;
    }
    
    .login-footer {
        margin-top: 24px;
        padding-top: 20px;
        font-size: 12px;
    }
    
    .flash-messages {
        top: 12px;
        right: 12px;
        left: 12px;
    }
    
    .login-page .alert {
        padding: 12px 16px;
        padding-right: 40px;
        font-size: 14px;
    }
    
    .login-page .alert-icon {
        font-size: 16px;
        margin-right: 8px;
    }
    
    .login-page .alert-close {
        right: 12px;
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .login-container {
        padding: 24px 16px;
        margin: 8px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
