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

:root {
    /* Modern Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-dark: #3730a3;

    --secondary-color: #64748b;
    --secondary-hover: #475569;

    --success-color: #10b981;
    --success-hover: #059669;
    --success-light: #d1fae5;

    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;

    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fef3c7;

    --info-color: #06b6d4;
    --info-hover: #0891b2;
    --info-light: #cffafe;

    /* Backgrounds */
    --background: #f1f5f9;
    --background-secondary: #e2e8f0;
    --card-background: #ffffff;
    --card-background-hover: #fafafa;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* Borders */
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    /* Shadows - Enhanced */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.12), 0 3px 6px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.15), 0 4px 8px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.2), 0 8px 12px -5px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Colored Shadows */
    --shadow-primary: 0 10px 25px -5px rgba(99, 102, 241, 0.25);
    --shadow-success: 0 10px 25px -5px rgba(16, 185, 129, 0.25);
    --shadow-danger: 0 10px 25px -5px rgba(239, 68, 68, 0.25);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-primary-subtle: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

    /* Glass Effects */
    --glass-background: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

::-moz-selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color-hover);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen - Modern Design */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 60s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-2xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.login-card h2 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    background: var(--card-background);
    color: var(--text-primary);
    transition: all var(--transition-base);
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-color-hover);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: translateY(-1px);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary-subtle);
    color: white;
    width: 100%;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-success:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: var(--danger-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.demo-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
    font-size: 0.875rem;
}

.demo-info p {
    margin: 5px 0;
}

.demo-info code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Main Panel - Modern Design */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    background: var(--gradient-primary-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    background: var(--gradient-primary-subtle);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.menu {
    list-style: none;
    padding: 24px 16px;
}

.menu li {
    margin-bottom: 8px;
}

.menu li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 600;
    border-radius: var(--border-radius-md);
    position: relative;
    overflow: hidden;
}

.menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--gradient-primary-subtle);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.menu li a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.menu li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.menu li a.active::before {
    transform: scaleY(1);
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view h2 {
    margin-bottom: 24px;
    font-size: 2rem;
}

/* Stats Grid - Modern Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 28px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary-subtle);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--gradient-primary-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-activity h3 {
    margin-bottom: 20px;
}

.activity-item {
    padding: 16px;
    border-left: 4px solid var(--border-color);
    margin-bottom: 12px;
    background: var(--background);
    border-radius: 4px;
}

.activity-item.pending {
    border-left-color: var(--warning-color);
}

.activity-item.approved {
    border-left-color: var(--success-color);
}

.activity-item.rejected {
    border-left-color: var(--danger-color);
}

/* Leave Form */
.leave-form {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.days-info {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--background);
    border-radius: 8px;
    font-size: 1.125rem;
}

/* Request Cards - Enhanced Design */
.request-card {
    background: white;
    padding: 28px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    border-left: 5px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.request-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.03));
    pointer-events: none;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.request-card.pending {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.request-card.approved {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.request-card.rejected {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
}

.request-info {
    flex: 1;
}

.request-type {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.request-dates {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.request-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-xs);
}

.request-status.pending {
    background: var(--warning-light);
    color: var(--warning-hover);
}

.request-status.approved {
    background: var(--success-light);
    color: var(--success-hover);
}

.request-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.request-details {
    margin-bottom: 16px;
}

.request-detail {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.request-actions {
    display: flex;
    gap: 12px;
}

.request-user {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* Filter Tabs - Modern Design */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding: 8px;
    background: var(--background);
    border-radius: var(--border-radius-lg);
    width: fit-content;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Calendar */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

#calendar {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    position: relative;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.calendar-day.other-month {
    color: var(--text-secondary);
    opacity: 0.4;
    cursor: default;
}

.calendar-day.other-month:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.today {
    border-color: var(--primary-color);
    border-width: 3px;
    font-weight: 700;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.calendar-day.weekend {
    background: #fafafa;
}

.calendar-day.weekend.today {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.day-number {
    font-size: 1rem;
    font-weight: 600;
}

.leave-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.has-leave {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.calendar-day.has-leave.weekend {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.calendar-day.multiple-leaves {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.calendar-day.multiple-leaves .leave-indicator {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

/* Day detail items in toast */
.day-detail-item {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
}

.day-detail-item:last-child {
    margin-bottom: 0;
}

.detail-type {
    color: #6b7280;
    font-size: 0.875rem;
}

.detail-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 4px 0;
}

.detail-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.detail-status.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.detail-status.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.detail-dates {
    color: #9ca3af;
    font-size: 0.75rem;
}

.calendar-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.pending {
    background: #fef3c7;
}

.legend-color.approved {
    background: #d1fae5;
}

.legend-color.rejected {
    background: #fee2e2;
}

/* Alert messages */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

/* Notification Button */
.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

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

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notifications View */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.info-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: var(--background);
    padding: 12px 16px;
    border-radius: 8px;
    flex: 1;
}

.notification-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.notification-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.notification-item.unread {
    background: #eff6ff;
    border-left-color: var(--primary-color);
}

.notification-item.read {
    opacity: 0.7;
    border-left-color: var(--border-color);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.notification-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.unread-indicator {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Email Preview */
.email-preview {
    background: var(--background);
    border-radius: 8px;
    overflow: hidden;
}

.email-meta {
    background: white;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
}

.email-meta p {
    margin: 8px 0;
    font-size: 0.875rem;
}

.email-meta strong {
    color: var(--text-secondary);
    display: inline-block;
    min-width: 80px;
}

.email-body {
    padding: 24px;
    background: white;
    margin: 2px;
    border-radius: 4px;
    line-height: 1.8;
}

.email-body h1, .email-body h2, .email-body h3 {
    margin-top: 20px;
    margin-bottom: 12px;
}

.email-body p {
    margin: 12px 0;
}

.email-body ul {
    margin: 12px 0;
    padding-left: 24px;
}

.email-body .email-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .menu {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .menu li a {
        white-space: nowrap;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 16px;
    }

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

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Settings View */
.settings-section {
    margin-bottom: 40px;
}

.settings-section h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.settings-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.settings-card hr {
    border: none;
    border-top: 1px solid var(--border-color);
}

.settings-card h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Users Management */
.users-header,
.manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.user-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.user-card.manager-card {
    border-left-color: #9f1239;
    background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
}

.user-card.pracownik-card {
    border-left-color: #1e40af;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.user-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-username {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: monospace;
}

.user-role-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-role-badge.pracownik {
    background: #dbeafe;
    color: #1e40af;
}

.user-role-badge.manager {
    background: #fce7f3;
    color: #9f1239;
}

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

.user-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-detail strong {
    color: var(--text-primary);
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-stats {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.user-stat {
    display: flex;
    flex-direction: column;
}

.user-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.user-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ====================================
   Enhanced Dashboard Styles
   ==================================== */

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.stat-card.stat-primary { border-left: 4px solid var(--primary-color); }
.stat-card.stat-success { border-left: 4px solid var(--success-color); }
.stat-card.stat-warning { border-left: 4px solid var(--warning-color); }
.stat-card.stat-info { border-left: 4px solid #3b82f6; }

.dashboard-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Chart Bars */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.chart-bar-wrapper {
    flex: 1;
    background: #e5e7eb;
    border-radius: 8px;
    height: 32px;
    overflow: hidden;
    position: relative;
}

.chart-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    border-radius: 8px;
    transition: width 0.5s ease;
    position: relative;
}

.chart-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.chart-bar-used {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.chart-bar-pending {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.chart-bar-available {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
}

/* Leave Types Breakdown */
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: background 0.2s;
}

.breakdown-item:hover {
    background: #f3f4f6;
}

.breakdown-label {
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

.breakdown-label strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.breakdown-label span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.breakdown-bar-wrapper {
    flex: 1;
    background: #e5e7eb;
    border-radius: 6px;
    height: 20px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.breakdown-value {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Responsive dashboard */
@media (max-width: 768px) {
    .chart-bar-label {
        min-width: 80px;
        font-size: 0.8rem;
    }

    .breakdown-label {
        min-width: 120px;
    }

    .breakdown-item {
        flex-wrap: wrap;
    }

    .breakdown-value {
        min-width: auto;
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}

/* ====================================
   Visual Enhancements v1.4.0
   ==================================== */

/* Enhanced card hover effects */
.request-card,
.user-card,
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Enhanced buttons with gradients */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Enhanced filter tabs */
.filter-tabs {
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.tab-btn {
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tab-btn.active::after,
.tab-btn:hover::after {
    width: 80%;
}

/* Enhanced status badges with animation */
.request-status,
.user-status {
    position: relative;
    overflow: hidden;
}

.request-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.request-status:hover::before {
    left: 100%;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced sidebar */
.sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.menu li a {
    transition: all 0.3s ease;
    position: relative;
}

.menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-color);
    transition: height 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.menu li a:hover::before,
.menu li a.active::before {
    height: 70%;
}

/* Enhanced header */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animated notification badge */
.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Enhanced form inputs */
.form-control,
select,
textarea {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.form-control:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Loading animation for buttons */
.btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced empty states */
.empty-state {
    transition: all 0.3s ease;
}

.empty-state:hover {
    transform: scale(1.02);
}

.empty-state-icon {
    transition: transform 0.3s ease;
}

.empty-state:hover .empty-state-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Glass morphism effect for cards */
.settings-card,
.card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Enhanced calendar days */
.calendar-day {
    transition: all 0.2s ease;
}

.calendar-day:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Enhanced tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 5px solid;
}

.toast.success {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(209,250,229,0.2) 100%);
}

.toast.error {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(254,226,226,0.2) 100%);
}

.toast.warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(254,243,199,0.2) 100%);
}

.toast.info {
    border-left-color: var(--primary-color);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* Request For Employee Form */
.request-for-container {
    display: none;
    margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}

.request-for-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.request-for-header {
    padding: 24px;
    color: white;
}

.request-for-title {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

.request-for-icon {
    font-size: 1.8rem;
    display: inline-block;
}

.request-for-description {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
    line-height: 1.5;
}

.request-for-form {
    background: white;
    padding: 28px;
    border-radius: 12px;
    margin: 0 16px 16px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.request-for-form .form-group {
    margin-bottom: 20px;
}

.request-for-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.request-for-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.request-for-form .form-control:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.request-for-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.working-days-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.working-days-label {
    color: #1e40af;
    font-weight: 500;
}

.working-days-value {
    color: #1e3a8a;
    font-size: 1.2rem;
    font-weight: 700;
}

.request-for-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-submit-request {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Settings */
.notification-settings-grid {
    display: grid;
    gap: 16px;
}

.notification-setting-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.notification-setting-item:hover {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.notification-setting-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.notification-label strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.notification-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

.notification-setting-item:has(.notification-checkbox:checked) {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.notification-setting-item:has(.notification-checkbox:checked) .notification-label strong {
    color: #065f46;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .manage-header {
        flex-direction: column;
        align-items: stretch;
    }

    .manage-header button {
        width: 100%;
    }

    #toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }

    .request-for-form {
        padding: 20px;
        margin: 0 12px 12px 12px;
    }

    .request-for-form .form-row {
        grid-template-columns: 1fr;
    }

    .request-for-actions {
        flex-direction: column;
    }

    .btn-submit-request {
        width: 100%;
    }
}