/* ==========================================
   MOBILE-FIRST PWA STYLES WITH LEFT SIDEBAR
   ========================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --accent-color: #2196F3;
    --accent-hover: #1976D2;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #00BCD4;
    --text-color: #333;
    --text-light: #757575;
    --bg-color: #f5f5f5;
    --sidebar-width: 280px;
    --header-height: 60px;
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* ==========================================
   MOBILE HEADER (visible on mobile only)
   ========================================== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-title {
    flex: 1;
    font-size: 1.25rem;
    text-align: center;
    margin: 0 1rem;
}

.mobile-user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

/* Hamburger Menu */
.hamburger {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-speed);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================
   DESKTOP HEADER (visible on desktop only)
   ========================================== */
.desktop-header {
    display: none;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--primary-color);
    border-bottom: 1px solid var(--primary-dark);
    z-index: 999;
    transition: left var(--transition-speed);
}

.desktop-header.sidebar-hidden {
    left: 0;
}

.desktop-header-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
    gap: 1rem;
}

.desktop-hamburger {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-shrink: 0;
}

.desktop-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-speed);
}

.desktop-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.desktop-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.desktop-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.desktop-breadcrumb {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    flex: 1;
}

.desktop-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.desktop-user-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.desktop-user-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ==========================================
   LEFT SIDEBAR NAVIGATION
   ========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: left var(--transition-speed);
    z-index: 1001;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: white;
}

.sidebar-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}





.sidebar-user {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color var(--transition-speed);
    flex-shrink: 0;
}

.sidebar-user:hover {
    background-color: rgba(0,0,0,0.05);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: capitalize;
}

.sidebar-menu {
    flex: 1;
    list-style: none;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-menu li {
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color var(--transition-speed);
}

.menu-item:hover,
.menu-item:focus {
    background-color: #f5f5f5;
}

.menu-item:active {
    background-color: #eeeeee;
}

.menu-icon {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.menu-text {
    font-size: 0.95rem;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    justify-content: flex-start;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform var(--transition-speed);
}

.has-submenu.open .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: #f8f8f8;
    transition: max-height 0.3s ease-out;
}

.has-submenu.open .submenu {
    max-height: 500px;
}

.submenu .menu-item {
    padding: 0.5rem 1.25rem 0.5rem 2.75rem;
    font-size: 0.9rem;
}

.submenu .menu-icon {
    font-size: 1.1rem;
    width: 1.1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer .version {
    margin-top: 0.25rem;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    background: #f0f0f0;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.lang-btn:hover {
    background: var(--primary-color);
    color: white;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar Overlay (for mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
    z-index: 1000;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left var(--transition-speed);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* ==========================================
   FLASH MESSAGES
   ========================================== */
/* ==========================================
   FLASH MESSAGES
   ========================================== */
.flash-messages {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-alert:hover {
    opacity: 1;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    text-align: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    min-height: 44px; /* iOS minimum tap target */
    line-height: 1.5;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #16a085;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px; /* iOS minimum tap target */
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1565C0 0%, #2196F3 50%, #42A5F5 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.2),
        0 0 0 1px rgba(255,255,255,0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 80px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.3);
}

.login-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-card h2 {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

/* ==========================================
   DASHBOARD
   ========================================== */
.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all var(--transition-speed);
}

.stat-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.dashboard-content {
    display: grid;
    gap: 1rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.actions .btn {
    flex: 1;
    min-width: 140px;
}

/* ==========================================
   TABLE
   ========================================== */
.table-container {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th,
.table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-admin {
    background-color: var(--danger-color);
    color: white;
}

.badge-president {
    background-color: #9b59b6;
    color: white;
}

.badge-secretary {
    background-color: var(--accent-color);
    color: white;
}

.badge-financial_secretary {
    background-color: var(--success-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

/* ==========================================
   PAGE HEADERS
   ========================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

/* ==========================================
   FORM CONTAINER
   ========================================== */
.form-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 600px;
}

/* ==========================================
   PROFILE SECTION
   ========================================== */
.profile-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.profile-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ==========================================
   ERROR PAGE
   ========================================== */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ==========================================
   RESPONSIVE - TABLET (768px and up)
   ========================================== */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
    
    .desktop-header {
        display: block;
    }
    
    .sidebar {
        left: 0;
        transition: left var(--transition-speed);
    }
    
    .sidebar.desktop-hidden {
        left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar-close {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding-top: var(--header-height);
        transition: margin-left var(--transition-speed);
    }
    
    .main-content.sidebar-hidden {
        margin-left: 0;
    }
    
    .container {
        padding: 2rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-container {
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 3rem;
    }
    
    .error-page h1 {
        font-size: 6rem;
    }
    
    .error-page h2 {
        font-size: 2rem;
    }
}

/* ==========================================
   RESPONSIVE - DESKTOP (1024px and up)
   ========================================== */
@media (min-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .actions .btn {
        flex: 0 1 auto;
    }
}

/* ==========================================
   RESPONSIVE - LARGE DESKTOP (1440px and up)
   ========================================== */
@media (min-width: 1440px) {
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .mobile-header,
    .sidebar,
    .sidebar-overlay,
    .hamburger {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 0;
    }
}

/* ==========================================
   CUSTOM MESSAGE BOX
   ========================================== */
.message-box-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
}

.message-box-overlay.show {
    display: flex !important;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message-box-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    gap: 0.75rem;
}

.message-box-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-box-icon.success {
    background-color: #d4edda;
    color: var(--success-color);
}

.message-box-icon.error {
    background-color: #f8d7da;
    color: var(--danger-color);
}

.message-box-icon.warning {
    background-color: #fff3cd;
    color: var(--warning-color);
}

.message-box-icon.info {
    background-color: #d1ecf1;
    color: var(--accent-color);
}

.message-box-icon.confirm {
    background-color: #e8f4fd;
    color: var(--accent-color);
}

.message-box-title {
    flex: 1;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.message-box-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.message-box-close:hover {
    background-color: #f5f5f5;
    color: var(--text-color);
}

.message-box-body {
    padding: 1.5rem;
}

.message-box-content {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.message-box-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.message-box-footer .btn {
    min-width: 100px;
    padding: 0.625rem 1.25rem;
}

/* Message Box Button Variants */
.message-box-footer .btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.message-box-footer .btn-danger:hover {
    background-color: #c0392b;
}

/* Single button centered */
.message-box-footer.single-btn {
    justify-content: center;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .message-box {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .message-box-header {
        padding: 1rem;
    }
    
    .message-box-body {
        padding: 1rem;
    }
    
    .message-box-footer {
        padding: 1rem;
        flex-direction: column-reverse;
    }
    
    .message-box-footer .btn {
        width: 100%;
    }
}

/* ==========================================
   MOBILE-FIRST RESPONSIVE ENHANCEMENTS
   ========================================== */

/* Enhanced Mobile Experience (Base: Mobile First) */
@media (max-width: 767px) {
    /* Typography */
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Container */
    .container {
        padding: var(--spacing-md);
    }
    
    /* Content Areas */
    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }
    
    .header-actions form {
        width: 100%;
    }
    
    .header-actions form .btn {
        width: 100%;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: var(--spacing-lg);
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Tables - Mobile Stack */
    .table-container {
        padding: 0;
        border-radius: 0;
    }
    
    .desktop-table {
        display: none;
    }
    
    /* Cards & Lists */
    .info-card,
    .stat-card,
    .detail-container {
        margin-bottom: var(--spacing-md);
    }
    
    /* Buttons */
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.0625rem;
        min-height: 48px;
    }
    
    .btn-sm {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        min-height: 40px;
    }
    
    /* Action buttons in lists */
    .actions-cell {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .actions-cell .btn {
        width: 100%;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    html {
        font-size: 15px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .form-row .form-group.full-width {
        grid-column: 1 / -1;
    }
}

/* Desktop  (992px and up) */
@media (min-width: 992px) {
    /* Show desktop header, hide mobile */
    .mobile-header {
        display: none;
    }
    
    .desktop-header {
        display: block;
    }
    
    /* Sidebar always visible */
    .sidebar {
        left: 0;
    }
    
    .sidebar-close {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    /* Content with sidebar spacing */
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    /* Dashboard grid */
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* Container */
    .container {
        padding: var(--spacing-xl);
    }
    
    /* Form layouts */
    .form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .form-row.three-col {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row .form-group.full-width {
        grid-column: 1 / -1;
    }
    
    /* Tables */
    .desktop-table {
        display: table;
    }
}

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   MOBILE-SPECIFIC CARD LAYOUTS
   ========================================== */
.mobile-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    transition: all var(--transition-speed);
}

.mobile-card:active {
    transform: scale(0.98);
    box-shadow: var(--card-shadow-hover);
}

.mobile-card-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.mobile-card-body {
    padding: var(--spacing-md);
}

.mobile-card-footer {
    padding: var(--spacing-md);
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* Detail Grid for View Pages */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.detail-item label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 1rem;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-item.full-width {
        grid-column: 1 / -1;
    }
}

/* ==========================================
   ENHANCED TOUCH INTERACTIONS
   ========================================== */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn,
    .form-control,
    select,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 48px;
    }
    
    .menu-item {
        padding: 1rem 1.25rem;
    }
    
    /* Remove hover effects on touch */
    .btn:hover,
    .card:hover,
    .stat-card:hover {
        transform: none;
    }
    
    /* Touch feedback */
    .btn:active,
    .menu-item:active,
    .card:active {
        opacity: 0.8;
    }
}

/* ==========================================
   LOADING STATES
   ========================================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   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 {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================
   PROFESSIONAL COMPANIES PAGE ENHANCEMENTS
   ========================================== */

/* Enhanced Data Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

.data-table thead th {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.875rem;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.875rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.2s ease;
    background: white;
}

.data-table tbody tr:hover {
    background: #f8f9fb;
    transform: translateX(2px);
    box-shadow: -2px 0 0 var(--accent-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr.inactive-row {
    opacity: 0.6;
    background: #f9f9f9;
}

.data-table tbody tr.inactive-row:hover {
    opacity: 0.8;
}

/* Action buttons in table */
.data-table .actions {
    white-space: nowrap;
    text-align: right;
}

.data-table .actions .btn {
    margin-left: 0.25rem;
    padding: 0.375rem 0.75rem;
    min-width: auto;
}

.data-table .actions form {
    display: inline-block;
    margin: 0;
}

/* Enhanced badges */
.badge {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(26, 188, 156, 0.3);
}

/* Mobile cards enhancements */
.mobile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.mobile-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.mobile-card.inactive {
    opacity: 0.7;
    background: #f9f9f9;
}

.mobile-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.mobile-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.mobile-card-body {
    padding: 1rem;
}

.mobile-card-body svg {
    flex-shrink: 0;
}

.mobile-card-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.mobile-card-footer .btn {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Enhanced buttons with icons */
.btn svg {
    flex-shrink: 0;
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

/* Content header improvements */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-state p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Improved button styling */
.btn-info {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border: none;
    color: white;
    transition: all 0.2s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 188, 156, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    border: none;
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #707b7c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

/* Responsive table improvements */
@media (max-width: 991px) {
    .desktop-table {
        display: none;
    }
}

@media (min-width: 992px) {
    .mobile-view {
        display: none;
    }
    
    .desktop-table {
        display: block;
    }
}
