:root {
    --primary-color: #6b1e1e;  /* Rich maroon from the image */
    --primary-light: #8b2a2a;
    --primary-dark: #4a1515;
    --secondary-color: #f8f9fa;
    --accent-color: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 250px;
}

/* Critical Layout Reset */
html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
}

/* Fix for main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* overflow: hidden; */
}



/* Fix for content area */
.content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f8f9fa;
}

/* Ensure dashboard doesn't add extra margins */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.app-container {
    display: flex;
    /* min-height: 100vh; */

}

/* Sidebar with logo support */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header .logo {
    max-width: 120px;
    max-height: 60px;
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Employee Photo Styles */
.employee-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.employee-photo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-not-active {
    background: #f8d7da;
    color: #721c24;
}

.contract-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.contract-active {
    background: #d4edda;
    color: #155724;
}

.contract-expired {
    background: #f8d7da;
    color: #721c24;
}

.contract-suspended {
    background: #fff3cd;
    color: #856404;
}

.contract-canceled {
    background: #d1ecf1;
    color: #0c5460;
}

/* Department Code Styling */
.dept-code {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: monospace;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.main-content.no-sidebar {
    margin-left: 0;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* Header Styles */
.top-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.header-content h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

/* Header User Info - New styles for header */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user-info .welcome-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.header-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.header-logout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-logout-btn i {
    font-size: 0.9rem;
}



/* Forms */
.form-container {
    width: 100%;
    padding: 20px;
    margin: 0;
}

.form-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 30, 30, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

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

.data-table th {
    background: var(--secondary-color);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--secondary-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Dashboard specific styles */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.employee-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--secondary-color);
    border-radius: 0.5rem;
}

.employee-info strong {
    color: var(--primary-color);
    display: block;
}

.employee-dept {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.employee-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.dept-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

.dept-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.dept-count {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.logo-container {
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-section p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Enhanced Stats Cards */
.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid;
}

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

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.info { border-left-color: var(--info-color); }
.stat-card.warning { border-left-color: var(--warning-color); }

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.primary .stat-icon { background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); }
.success .stat-icon { background: linear-gradient(135deg, var(--success-color), #20c997); }
.info .stat-icon { background: linear-gradient(135deg, var(--info-color), #0dcaf0); }
.warning .stat-icon { background: linear-gradient(135deg, var(--warning-color), #fd7e14); }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0.25rem 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-trend {
    color: var(--success-color);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-action-card {
    background: white;
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.action-link i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.action-link span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Modern Cards */
.card.modern {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #f5f5f5;
}

.card-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.card-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i {
    color: var(--primary-color);
}

.btn-outline {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Enhanced Employee List */
.employee-list {
    padding: 1.25rem;
}

.employee-item.modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 0.6rem;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.employee-item.modern:hover {
    background: #f0f0f0;
}

.employee-item.modern:last-child {
    margin-bottom: 0;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-info strong {
    color: var(--text-primary);
    display: block;
    font-weight: 600;
    margin-bottom: 0.125rem;
    font-size: 0.9rem;
}

.employee-dept, .employee-position {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: block;
}

.employee-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Enhanced Department Stats */
.dept-stats.modern {
    padding: 1.25rem;
}

.dept-item.modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.dept-item.modern:last-child {
    border-bottom: none;
}

.dept-info {
    flex: 1;
}

.dept-progress {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    width: 80px;
    margin-top: 0.25rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Modern Sidebar Styles */
.sidebar.modern {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #5a1a1a 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
.sidebar.modern::-webkit-scrollbar {
    width: 3px;
}

.sidebar.modern::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar.modern::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.sidebar.modern::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Enhanced Sidebar Header */
.sidebar-header.modern {
    padding: 1.25rem 1rem 1rem; /* Reduced padding */
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.sidebar-header.modern h2 {
    font-size: 1.0rem; /* Reduced from 1.4rem */
    font-weight: 700;
    margin: 0 0 0.25rem; /* Reduced margin */
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 0.55rem; /* Reduced from 0.85rem */
    opacity: 0.8;
    margin: 0;
    font-weight: 300;
}

/* User Profile Section */
.user-profile {
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Settings Page Styles */
.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.settings-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.settings-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.settings-header p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-category {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.category-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-info h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.category-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.settings-options {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.setting-option:hover {
    background: #f0f0f0;
    transform: translateX(5px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.option-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(107, 30, 30, 0.1);
    color: var(--primary-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.option-content h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.option-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.option-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.option-badge:contains("Coming Soon") {
    background: var(--text-secondary);
}

.option-action {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .settings-header {
        padding: 1.5rem;
    }
    
    .settings-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-header {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .settings-options {
        padding: 1.25rem;
    }
    
    .setting-option {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .option-content {
        text-align: center;
    }
    
    .setting-option:hover {
        transform: translateY(-2px) translateX(0);
    }
}

@media (max-width: 480px) {
    .settings-container {
        padding: 0;
    }
    
    .settings-grid {
        gap: 1rem;
    }
    
    .settings-category {
        margin: 0 0.5rem;
        border-radius: 0.75rem;
    }
}

/* Empty state for future features */
.coming-soon-badge {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

/* Focus states for accessibility */
.setting-option:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

/* Sidebar User Info - Fixed to avoid conflict */
.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.user-role {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    color: rgba(255,255,255,0.8);
}

/* Enhanced Navigation */
.sidebar-nav.modern {
    flex: 1;
    padding: 0.75rem 0; /* Reduced padding */
    overflow-y: auto;
}

.sidebar-nav.modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    margin: 0.125rem 0; /* Reduced margin */
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem; /* Reduced padding */
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0 20px 20px 0; /* Reduced border radius */
    margin-right: 0.75rem; /* Reduced margin */
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(3px); /* Reduced transform */
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* Reduced shadow */
}

.nav-link.active .nav-indicator {
    opacity: 1;
    transform: scaleY(1);
}

.nav-icon {
    width: 20px; /* Reduced from 24px */
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem; /* Reduced margin */
    font-size: 1rem; /* Reduced font size */
    flex-shrink: 0;
}

.nav-text {
    font-weight: 500;
    font-size: 0.85rem; /* Reduced from 0.95rem */
    line-height: 1.2;
}

.nav-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px; /* Reduced from 4px */
    height: 25px; /* Reduced from 30px */
    background: white;
    border-radius: 2px 0 0 2px;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Section Headers */
.nav-section {
    margin: 1rem 0 0.5rem; /* Reduced margins */
}

.section-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0 1rem 0.75rem; /* Reduced margins */
}

.nav-section-title {
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem; /* Reduced from 0.8rem */
    text-transform: uppercase;
    font-weight: 600;
    padding: 0 1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reduced gap */
    line-height: 1.2;
}

.sidebar-actions {
    padding: 1rem; /* Reduced padding */
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.nav-section-title i {
    font-size: 0.8rem; /* Reduced font size */
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.footer-stats {
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.stat-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

/* Modern Logout Button */
.logout-btn.modern {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Reduced gap */
    width: 100%;
    padding: 0.6rem 0.75rem; /* Reduced padding */
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 0.4rem; /* Reduced border radius */
    font-size: 0.85rem; /* Reduced font size */
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.logout-btn.modern:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.logout-btn.modern i {
    font-size: 1rem;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Sidebar Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.nav-item {
    animation: slideInLeft 0.3s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }
.nav-item:nth-child(7) { animation-delay: 0.7s; }

/* Hover Effects */
.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%) scale(0);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: translateY(-50%) scale(1);
}

.nav-link.active::before {
    transform: translateY(-50%) scale(1);
}

/* Department Management Styles */
.departments-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header .header-content h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header .header-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.department-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.dept-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dept-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.dept-content {
    padding: 1.5rem;
}

.dept-description {
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.dept-actions {
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Form Enhancements */
.form-card.modern {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-header p {
    margin: 0;
    opacity: 0.9;
}

/* Checkbox Styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked + .checkbox-label .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Status Badges */
.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Employee Details Styles */
.employee-details-container {
    max-width: 1200px;
    margin: 0 auto;
}

.employee-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.employee-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    flex-shrink: 0;
}

.employee-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 120px;
    height: 120px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2.5rem;
}

.employee-info-header {
    flex: 1;
}

.employee-info-header h1 {
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.employee-info-header .employee-id {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0 0 1rem;
    font-family: monospace;
}

.status-badges {
    display: flex;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.header-actions .btn {
    white-space: nowrap;
    justify-content: center;
}

.employee-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.detail-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: var(--text-primary);
    font-size: 0.95rem;
    word-break: break-word;
}

.employee-id-badge {
    background: linear-gradient(135deg, #2563eb, #1d4ed8); /* Blue gradient instead of maroon */
    color: white;
    padding: 0.375rem 0.875rem; /* Slightly more padding */
    border-radius: 0.5rem; /* Less rounded for better readability */
    font-family: 'Courier New', monospace;
    font-weight: 700; /* Bolder text */
    font-size: 0.95rem !important; /* Slightly larger */
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
    border: 1px solid rgba(255,255,255,0.2); /* Subtle border */
    letter-spacing: 0.5px; /* Better spacing */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow */
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.default-avatar {
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.current-photo-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 1.5rem;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .employee-item.modern {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .employee-meta {
        align-items: center;
        flex-direction: row;
        gap: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar.modern {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.modern.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .nav-link:hover {
        transform: none;
    }
    
    .user-profile {
        padding: 1rem;
    }
    
    .sidebar-header.modern {
        padding: 1.5rem 1rem 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .dept-actions {
        flex-direction: column;
    }
    
    .dept-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .employee-header {
        flex-direction: column;
        text-align: center;
    }
    
    .employee-details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions .btn {
        min-width: auto;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .current-photo-preview {
        width: 50px;
        height: 50px;
    }
}

/* Attendance Page Specific Styles */
.attendance-page {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Filter Form Enhancements */
.filter-form .form-grid {
    align-items: end;
}

.filter-form .btn {
    margin-top: 0;
}

/* Table Enhancements */
.data-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.001);
    transition: all 0.2s ease;
}

/* Responsive Design for Attendance */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .stat-content h3 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .stat-content p {
        font-size: 0.8rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .action-link {
        padding: 0.75rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .action-link span {
        font-size: 0.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .employee-list, .dept-stats.modern {
        padding: 1rem;
    }
    
    .employee-item.modern {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .action-link {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }
}

/* Viewport height optimization for no-scroll experience */
@media (min-height: 600px) {
    .content {
        height: calc(100vh - 80px); /* Adjust based on header height */
        overflow-y: auto;
    }
}

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

.dashboard, .stats-grid, .quick-actions, .dashboard-grid {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .attendance-page {
        gap: 1.5rem;
    }
    
    .filter-form .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        display: none;
    }
}

/* Range Sync Modal Enhancements */
#rangeSyncForm select {
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

#rangeSyncForm select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 30, 30, 0.1);
}

#rangeInfo {
    border-left: 4px solid #1976d2;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #138496;
}

/* Progress bar animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

#syncProgress i.fa-spin {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

/* Month range validation styles */
.range-valid {
    color: var(--success-color);
}

.range-invalid {
    color: var(--error-color);
}

/* Enhanced sync buttons layout - uses shared .header-actions styles */

/* Enhanced filter styles */
.quick-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.quick-filter-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.quick-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .quick-filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility improvements */
.btn:focus, .quick-filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced table responsiveness */
@media (max-width: 1024px) {
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th, .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

.logo-image {
    width: 45px; /* Reduced from 60px */
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.logo-container .logo-image:hover {
    transform: scale(1.05);
}

/* Modern UI Components for Scheduled Sync */
.card-modern {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title-modern {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-body-modern {
    padding: 1.5rem;
}

/* Modern Table Styles */
.table-modern {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: #f8f9fa;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-modern tbody td {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
}

.table-row-hover:hover {
    background: #f8f9fa;
    transition: background 0.2s ease;
}

/* Modern Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-action-primary {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-action-primary:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.1);
}

.btn-action-secondary {
    background: #f5f5f5;
    color: #6c757d;
}

.btn-action-secondary:hover {
    background: #6c757d;
    color: white;
    transform: scale(1.1);
}

.btn-action-success {
    background: #e8f5e8;
    color: #28a745;
}

.btn-action-success:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
}

.btn-action-danger {
    background: #ffebee;
    color: #d32f2f;
}

.btn-action-danger:hover {
    background: #d32f2f;
    color: white;
    transform: scale(1.1);
}

/* Modern Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-active {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-inactive {
    background: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

.status-warning {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.status-danger {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ef9a9a;
}

/* Modern Badge Styles */
.badge-modern {
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Schedule-specific styles */
.schedule-name strong {
    color: var(--primary-color);
    font-weight: 600;
}

.schedule-time {
    font-weight: 500;
    color: var(--text-primary);
}

/* Modern Modal Styles */
.modal-modern .modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
}

.modal-body-modern {
    padding: 2rem;
}

.modal-footer-modern {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 1rem 1rem;
    padding: 1.5rem;
}

/* Form Section Styles */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-title {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control-modern {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 30, 30, 0.1);
}

.form-help {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-check-modern {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.form-check-modern .form-check-input {
    margin-top: 0.25rem;
}

.form-check-modern .form-check-label {
    margin-left: 0.5rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Empty State Improvements */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive improvements for scheduled sync */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .action-buttons {
        gap: 0.25rem;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .form-section {
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .modal-body-modern {
        padding: 1.5rem;
    }
    
    .card-header-modern, .card-body-modern {
        padding: 1rem;
    }
    
    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}