/* ============================================================
   MediCore HMS - Main Stylesheet
   Professional Medical Theme
   ============================================================ */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
    --primary: #0e4da4;
    --primary-dark: #093679;
    --primary-light: #3b7ddd;
    --primary-glow: rgba(14, 77, 164, 0.15);
    --accent: #00b4d8;
    --accent-dark: #0096b7;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #6366f1;
    --info-bg: #eef2ff;

    --bg-body: #f0f4f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #0a1628;
    --bg-sidebar-hover: rgba(255, 255, 255, 0.08);
    --bg-sidebar-active: rgba(14, 77, 164, 0.35);
    --bg-topbar: #ffffff;
    --bg-input: #f8fafc;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);

    --sidebar-width: 220px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-header {
    padding: 20px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo i {
    font-size: 28px;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(0, 180, 216, 0.4));
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-sidebar);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-user {
    padding: 16px 20px;
    margin: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.user-avatar i {
    font-size: 24px;
    color: var(--text-white);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 20px 12px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-sidebar);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 600;
}

.nav-link.active i {
    color: var(--accent);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-link {
    color: var(--danger) !important;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ---------- Top Bar ---------- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.menu-toggle:hover {
    background: var(--bg-body);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.topbar-user {
    position: relative;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.topbar-user:hover {
    background: var(--bg-body);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 1000;
}

.topbar-user:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition-fast);
}

.user-dropdown a:hover {
    background: var(--bg-body);
}

.user-dropdown a:last-child {
    color: var(--danger);
}

/* ---------- Content Wrapper ---------- */
.content-wrapper {
    padding: 24px;
    max-width: 1440px;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

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

.card-header h2,
.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-body);
}

/* ---------- Stats Cards (Dashboard) ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.stat-card.primary::before {
    background: var(--primary);
}

.stat-card.success::before {
    background: var(--success);
}

.stat-card.warning::before {
    background: var(--warning);
}

.stat-card.danger::before {
    background: var(--danger);
}

.stat-card.info::before {
    background: var(--info);
}

.stat-card.accent::before {
    background: var(--accent);
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card.primary .stat-icon {
    background: rgba(14, 77, 164, 0.1);
    color: var(--primary);
}

.stat-card.success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-card.warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card.danger .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card.info .stat-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--info);
}

.stat-card.accent .stat-icon {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent);
}

.stat-details {
    flex: 1;
}

.stat-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

/* ---------- Tables ---------- */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
}

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

table thead th {
    background: var(--bg-body);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}

table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table tbody tr:hover {
    background: rgba(14, 77, 164, 0.03);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-white);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn i {
    font-size: 14px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 77, 164, 0.3);
}

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

.btn-success:hover {
    background: #0ea572;
    color: var(--text-white);
    transform: translateY(-1px);
}

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

.btn-warning:hover {
    background: #d48a09;
    color: var(--text-white);
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #dc2626;
    color: var(--text-white);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-body);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 30px;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary);
}

.badge-secondary {
    background: var(--bg-body);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Border & state utilities */
.border-primary {
    border-color: var(--primary) !important;
}

.shift-none {
    background: var(--bg-body);
    color: var(--text-muted);
}


/* ---------- Alerts ---------- */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.35s ease;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: var(--info-bg);
    color: #3730a3;
    border-left: 4px solid var(--info);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
}

.alert-close:hover {
    opacity: 1;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---------- Page Action Bar ---------- */
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-actions .left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-actions .right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- Search Box ---------- */
.search-box {
    position: relative;
}

.search-box input {
    padding: 9px 14px 9px 38px;
    width: 280px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 20px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-body);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---------- Modal / Confirmation ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    padding: 28px;
    animation: fadeInUp 0.3s ease;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---------- Profile View ---------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

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

.profile-avatar i {
    font-size: 48px;
    color: white;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 700;
}

.profile-info p {
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 24px;
}

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

.detail-item .value {
    font-size: 14px;
    color: var(--text-primary);
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- Salary Slip Print ---------- */
.salary-slip {
    max-width: 800px;
    margin: 0 auto;
}

.salary-slip .slip-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.salary-table {
    width: 100%;
}

.salary-table td {
    padding: 8px 12px;
}

.salary-table .label {
    font-weight: 600;
    color: var(--text-secondary);
    width: 40%;
}

.salary-table .total-row {
    font-weight: 700;
    font-size: 16px;
    border-top: 2px solid var(--border);
}

/* ---------- Shift Schedule Grid ---------- */
.schedule-grid {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    gap: 2px;
    font-size: 12px;
}

.schedule-grid .header-cell {
    background: var(--primary);
    color: white;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
}

.schedule-grid .name-cell {
    padding: 10px 8px;
    background: var(--bg-body);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.schedule-grid .shift-cell {
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.shift-morning {
    background: #fef9c3;
    color: #854d0e;
}

.shift-evening {
    background: #e0e7ff;
    color: #3730a3;
}

.shift-night {
    background: #1e293b;
    color: #e2e8f0;
}

.shift-general {
    background: #ecfdf5;
    color: #065f46;
}

/* ---------- Calendar View ---------- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 12px;
}

.calendar-day.today {
    border-color: var(--primary);
    background: rgba(14, 77, 164, 0.03);
}

.calendar-day .day-number {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.calendar-event {
    padding: 3px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    font-size: 11px;
    background: var(--primary-glow);
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #0a1628 0%, #0e4da4 50%, #00b4d8 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.15);
    top: -100px;
    right: -100px;
    filter: blur(80px);
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(14, 77, 164, 0.2);
    bottom: -100px;
    left: -100px;
    filter: blur(80px);
}

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

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo i {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.login-form .form-group {
    position: relative;
}

.login-form .form-group .input-icon {
    position: absolute;
    left: 14px;
    top: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

.login-form .form-control {
    padding-left: 42px;
    height: 48px;
    font-size: 14px;
}

.login-form .btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
    margin-top: 8px;
    justify-content: center;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Sidebar Overlay ---------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab-link {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab-link:hover {
    color: var(--primary);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Grid Layouts ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ---------- Utility Classes ---------- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

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

.text-warning {
    color: var(--warning);
}

.fw-bold {
    font-weight: 700;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.p-0 {
    padding: 0;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.w-100 {
    width: 100%;
}

.employee-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

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

/* ---------- Print Styles ---------- */
@media print {

    .sidebar,
    .topbar,
    .page-actions,
    .btn,
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
    }

    .content-wrapper {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

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

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

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

    .sidebar-overlay.active {
        display: block;
    }

    .topbar-date {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

    .content-wrapper {
        padding: 16px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .schedule-grid {
        grid-template-columns: 80px repeat(7, 1fr);
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 20px;
    }

    .btn-group {
        flex-direction: column;
    }
}