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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #334155;
}

/* Top Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.nav-brand .logo {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1e293b;
    border-bottom-color: #3b82f6;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-bell {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-bell:hover {
    background: #e2e8f0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 260px;
    height: calc(100vh - 70px);
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #64748b;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin: 0 1rem;
    border-radius: 0.5rem;
}

.sidebar a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.sidebar a.active {
    background: #3b82f6;
    color: white;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Dashboard */
.greeting {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

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

.card-header {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.card-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.card-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

/* Leave Bucket */
.leave-bucket {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.leave-bucket h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.leave-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.leave-chart {
    text-align: center;
}

.chart-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    position: relative;
    background: conic-gradient(#10b981 0deg 108deg, #f1f5f9 108deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-circle.sick {
    background: conic-gradient(#3b82f6 0deg 54deg, #f1f5f9 54deg 360deg);
}

.chart-circle.casual {
    background: conic-gradient(#f59e0b 0deg 72deg, #f1f5f9 72deg 360deg);
}

.chart-inner {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.chart-percentage {
    font-size: 0.75rem;
    color: #64748b;
}

.chart-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.apply-leave-btn {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.apply-leave-btn:hover {
    background: #2563eb;
}

/* Calendar Widget */
.calendar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.calendar-nav button:hover {
    background: #e2e8f0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    padding: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.calendar-day.other-month {
    color: #cbd5e1;
}

.calendar-day.present {
    background: #dcfce7;
    color: #16a34a;
}

.calendar-day.absent {
    background: #fecaca;
    color: #dc2626;
}

.calendar-day.leave {
    background: #fef3c7;
    color: #d97706;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.present {
    background: #16a34a;
}

.legend-dot.absent {
    background: #dc2626;
}

.legend-dot.leave {
    background: #d97706;
}

/* Recent Attendance */
.recent-attendance {
    margin-top: 2rem;
}

.recent-attendance h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

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

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

.attendance-date {
    font-size: 0.875rem;
    color: #64748b;
}

.attendance-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

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

.attendance-status.absent {
    background: #fecaca;
    color: #dc2626;
}

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

/* Tables */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

tbody tr:hover {
    background: #f8fafc;
}

/* Forms */
form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

form input, form select, form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

form button {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.2s;
}

form button:hover {
    background: #2563eb;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.login-form {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.875rem;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #2563eb;
}

.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #0078d4;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.btn-microsoft:hover {
    background: #106ebe;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.error {
    color: #dc2626;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Status Colors */
.status-present { color: #16a34a; }
.status-absent { color: #dc2626; }
.status-half_day { color: #d97706; }
.status-pending { color: #d97706; }
.status-approved { color: #16a34a; }
.status-rejected { color: #dc2626; }

/* User Management */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row input, .form-row select {
    flex: 1;
}

.role-manager {
    color: #dc2626;
    font-weight: 600;
}

.role-employee {
    color: #3b82f6;
}

.btn-reset {
    background: #f59e0b;
    color: white;
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .top-cards {
        grid-template-columns: 1fr;
    }
    
    .leave-charts {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        font-size: 0.75rem;
    }
}
.btn-logout {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    color: #374151;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #f9fafb;
}

.dropdown-menu hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Success Messages */
.success {
    background: #dcfce7;
    color: #16a34a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #bbf7d0;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.profile-info, .profile-actions {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.profile-info h3, .profile-actions h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

.action-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.action-card h4 {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.action-card p {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

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

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

/* Forgot Password */
.forgot-password {
    text-align: center;
    margin: 1rem 0;
}

.forgot-password a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.back-to-login {
    text-align: center;
    margin-top: 1rem;
}

.back-to-login a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
}

.warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Request Cards */
.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.request-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.request-card h4 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.action-form {
    margin-top: 1rem;
}

.action-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 1rem;
    resize: vertical;
}

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

.btn-approve {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-approve:hover {
    background: #059669;
}

.btn-reject {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-reject:hover {
    background: #dc2626;
}