/* =====================================================
   ระบบลางานออนไลน์ - Modern UI Stylesheet v2
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
}

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --navbar-height: 64px;
    --primary: #4f6ef7;
    --primary-dark: #3a55d4;
    --sidebar-bg: #0f172a;
    --card-radius: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

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

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: var(--navbar-height);
    flex-shrink: 0;
}

.brand-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
    box-shadow: 0 4px 12px rgba(79,110,247,0.35);
}

.brand-name { display: block; color: white; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.brand-sub  { display: block; color: rgba(255,255,255,0.4); font-size: 0.68rem; white-space: nowrap; }

.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item > span:not(.badge) { display: none; }

.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.user-name {
    color: white; font-weight: 600; font-size: 0.875rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-section-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.28); padding: 8px 10px 4px;
    font-weight: 700;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 2px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.875rem;
    cursor: pointer; border: none; background: none; width: 100%;
}

.nav-item:hover { color: white; background: rgba(255,255,255,0.08); }

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(79,110,247,0.3), rgba(118,75,162,0.2));
    box-shadow: 0 0 0 1px rgba(79,110,247,0.3) inset;
}

.nav-icon { width: 22px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-item.text-danger-soft { color: rgba(252,165,165,0.8); }
.nav-item.text-danger-soft:hover { color: #fca5a5; background: rgba(239,68,68,0.1); }

/* =====================================================
   MAIN WRAPPER & NAVBAR
   ===================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    display: flex; flex-direction: column;
}

.main-wrapper.sidebar-collapsed { margin-left: var(--sidebar-collapsed-width); }

.top-navbar {
    display: flex; align-items: center;
    background: white;
    height: var(--navbar-height);
    padding: 0 28px;
    border-bottom: 1px solid #e8ecf4;
    position: sticky; top: 0; z-index: 100;
    gap: 12px;
    box-shadow: 0 1px 0 #e8ecf4, var(--shadow-sm);
}

.sidebar-toggle {
    color: #64748b; font-size: 1.15rem;
    padding: 8px 10px; border-radius: 10px;
    transition: var(--transition); border: none; background: none;
}
.sidebar-toggle:hover { background: #f1f5f9; color: #0f172a; }

.navbar-title { flex: 1; font-weight: 700; color: #1e293b; font-size: 1rem; }
.navbar-right { display: flex; align-items: center; gap: 8px; }

.notification-btn, .user-menu-btn {
    color: #64748b; text-decoration: none;
    border-radius: 10px; padding: 7px 10px;
    transition: var(--transition); border: none; background: none;
}
.notification-btn:hover, .user-menu-btn:hover { background: #f1f5f9; color: #0f172a; }
.user-menu-name { font-weight: 600; font-size: 0.875rem; color: #1e293b; }

.page-content { flex: 1; padding: 28px; }

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
    display: flex; align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    margin-bottom: 24px;
}
.page-title {
    margin: 0; font-size: 1.4rem; font-weight: 800; color: #0f172a;
    display: flex; align-items: center; gap: 10px;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    background: white;
    overflow: hidden;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 22px;
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h6 { margin: 0; font-weight: 700; font-size: 0.95rem; }
.card-body { padding: 22px; }

/* =====================================================
   WELCOME BANNER
   ===================================================== */
.welcome-banner {
    background: linear-gradient(135deg, #4f6ef7 0%, #764ba2 60%, #0ea5e9 100%);
    border-radius: var(--card-radius);
    padding: 24px 28px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; color: white;
    box-shadow: 0 8px 24px rgba(79,110,247,0.3);
    position: relative; overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute; top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.welcome-content { display: flex; align-items: center; gap: 18px; position: relative; }
.welcome-text h4 { margin: 0; font-weight: 800; font-size: 1.2rem; }
.welcome-banner .text-muted { color: rgba(255,255,255,0.75) !important; }

/* =====================================================
   STAT CARDS
   ===================================================== */
.stat-card {
    background: white; border-radius: var(--card-radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute;
    bottom: 0; left: 0; right: 0; height: 3px;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card.stat-total    { border-color: #e0e7ff; }
.stat-card.stat-pending  { border-color: #fef3c7; }
.stat-card.stat-approved { border-color: #d1fae5; }
.stat-card.stat-rejected { border-color: #fee2e2; }

.stat-card.stat-total::before    { background: linear-gradient(90deg,#4f6ef7,#764ba2); }
.stat-card.stat-pending::before  { background: linear-gradient(90deg,#f59e0b,#f97316); }
.stat-card.stat-approved::before { background: linear-gradient(90deg,#10b981,#059669); }
.stat-card.stat-rejected::before { background: linear-gradient(90deg,#ef4444,#dc2626); }

.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 14px;
}
.stat-card.stat-total    .stat-icon { background: #eef2ff; color: #4f6ef7; }
.stat-card.stat-pending  .stat-icon { background: #fffbeb; color: #f59e0b; }
.stat-card.stat-approved .stat-icon { background: #ecfdf5; color: #10b981; }
.stat-card.stat-rejected .stat-icon { background: #fef2f2; color: #ef4444; }

.stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; color: #0f172a; }
.stat-label { font-size: 0.8rem; color: #64748b; font-weight: 500; }

.stat-card-sm {
    background: white; border-radius: 12px;
    padding: 16px; box-shadow: var(--shadow-sm); text-align: center;
    border: 1px solid #f1f5f9;
}
.scm-num   { font-size: 1.6rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.scm-label { font-size: 0.75rem; color: #64748b; }

/* =====================================================
   LEAVE SUMMARY
   ===================================================== */
.leave-summary-list { display: flex; flex-direction: column; }
.leave-summary-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 22px; border-bottom: 1px solid #f8fafc;
    transition: background 0.15s;
}
.leave-summary-item:last-child { border-bottom: none; }
.leave-summary-item:hover { background: #fafbff; }

.leave-type-info { display: flex; align-items: center; gap: 10px; }
.leave-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.leave-type-name { font-size: 0.875rem; font-weight: 500; }

.leave-balance-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 22px; border-bottom: 1px solid #f8fafc;
    transition: background 0.15s;
}
.leave-balance-item:last-child { border-bottom: none; }
.leave-balance-item:hover { background: #fafbff; }
.lbi-left { display: flex; align-items: center; gap: 10px; }
.lbi-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lbi-name { font-size: 0.875rem; font-weight: 500; }
.lbi-right { display: flex; align-items: center; gap: 6px; }
.lbi-used { font-size: 0.875rem; font-weight: 600; color: #1e293b; }

.upcoming-list { display: flex; flex-direction: column; gap: 12px; }
.upcoming-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.upcoming-info { flex: 1; }

/* =====================================================
   BADGES
   ===================================================== */
.badge { font-weight: 600; letter-spacing: 0.02em; }
.bg-purple { background-color: #8b5cf6 !important; }

/* =====================================================
   LEAVE TYPE CARDS (Request Form)
   ===================================================== */
.leave-type-card { cursor: pointer; display: block; }
.leave-type-card input[type="radio"] { display: none; }

.leave-type-inner {
    border: 2px solid #e2e8f0; border-radius: 14px;
    padding: 16px 10px; text-align: center;
    transition: var(--transition);
    background: #fafbfc;
}
.leave-type-card:hover .leave-type-inner {
    border-color: var(--lt-color, #4f6ef7);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.leave-type-card input[type="radio"]:checked + .leave-type-inner {
    border-color: var(--lt-color, #4f6ef7);
    background: white;
    box-shadow: 0 0 0 4px rgba(79,110,247,0.1), 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.lt-icon { font-size: 1.8rem; color: var(--lt-color, #4f6ef7); margin-bottom: 8px; }
.lt-name { font-size: 0.78rem; font-weight: 700; color: #334155; }

.leave-nature-card { cursor: pointer; display: block; }
.leave-nature-card input[type="radio"] { display: none; }
.ln-inner {
    border: 2px solid #e2e8f0; border-radius: 12px;
    padding: 14px 8px; text-align: center;
    transition: var(--transition); background: #fafbfc;
}
.leave-nature-card:hover .ln-inner { border-color: #4f6ef7; background: white; }
.leave-nature-card input[type="radio"]:checked + .ln-inner {
    border-color: #4f6ef7; background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79,110,247,0.15);
}
.ln-icon { font-size: 1.4rem; color: #94a3b8; margin-bottom: 6px; }
.leave-nature-card input[type="radio"]:checked + .ln-inner .ln-icon { color: #4f6ef7; }
.ln-name { font-size: 0.75rem; font-weight: 700; color: #334155; }

/* =====================================================
   FORM SECTIONS
   ===================================================== */
.form-label.required::after { content: ' *'; color: #ef4444; }
.section-title {
    font-size: 1rem; font-weight: 700; color: #1e293b;
    padding-bottom: 12px; border-bottom: 2px solid #f1f5f9;
    margin-bottom: 20px;
}

.form-section-title {
    color: #1e293b; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; font-size: 0.95rem;
}
.step-num {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, #4f6ef7, #764ba2);
    color: white; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}

.total-days-badge {
    background: #f8fafc; border: 2px dashed #cbd5e1;
    border-radius: 12px; padding: 12px 8px; text-align: center;
    min-width: 75px; color: #94a3b8; font-size: 0.75rem; font-weight: 600;
    transition: var(--transition);
}
.total-days-badge.has-value {
    background: #eef2ff; border-color: #4f6ef7; color: #4f6ef7;
    border-style: solid;
}
#totalDaysNum { display: block; font-size: 1.4rem; font-weight: 800; }

.leave-summary-box {
    background: linear-gradient(135deg, #fafbff, #f0f4ff);
    border: 1px solid #c7d2fe; border-radius: 14px; padding: 18px;
}
.leave-summary-box h6 { color: #4f6ef7; margin-bottom: 14px; font-weight: 700; }

.tips-list { list-style: none; padding: 0; margin: 0; }
.tips-list li {
    padding: 6px 0; font-size: 0.85rem; color: #475569;
    display: flex; align-items: flex-start; gap: 8px;
}
.tips-list li::before {
    content: '→'; color: #4f6ef7; font-weight: 700;
    flex-shrink: 0; margin-top: 1px;
}

/* =====================================================
   APPROVAL FLOW
   ===================================================== */
.approval-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.approval-step { text-align: center; min-width: 65px; }
.approval-step .as-num {
    width: 34px; height: 34px; border-radius: 50%;
    background: #f1f5f9; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; margin: 0 auto 5px;
    border: 2px solid #e2e8f0;
}
.approval-step.approved .as-num { background: #10b981; color: white; border-color: #10b981; }
.as-name { font-size: 0.72rem; color: #475569; font-weight: 600; }
.approval-arrow { color: #cbd5e1; font-size: 0.85rem; }

/* Approval status boxes */
.approval-status-grid { display: flex; align-items: flex-start; gap: 12px; }
.as-box {
    flex: 1; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 14px; display: flex; align-items: flex-start; gap: 12px;
}
.as-box.approved { background: #f0fdf4; border-color: #86efac; }
.as-box.rejected { background: #fef2f2; border-color: #fca5a5; }
.as-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: #64748b; font-size: 0.9rem;
}
.as-box.approved .as-icon { background: #10b981; color: white; }
.as-box.rejected .as-icon { background: #ef4444; color: white; }
.as-box.pending  .as-icon { background: #f59e0b; color: white; }
.as-step     { font-size: 0.7rem; color: #64748b; margin-bottom: 3px; }
.as-approver { font-size: 0.875rem; font-weight: 700; color: #1e293b; }
.as-arrow    { color: #94a3b8; font-size: 1rem; flex-shrink: 0; align-self: center; }

/* =====================================================
   APPROVAL TIMELINE
   ===================================================== */
.approval-timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex; gap: 16px;
    position: relative; padding-bottom: 22px;
}
.timeline-item::before {
    content: ''; position: absolute;
    left: 17px; top: 38px; bottom: 0;
    width: 2px; background: #e2e8f0;
}
.timeline-item:last-child::before { display: none; }
.tl-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.85rem; flex-shrink: 0; z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.tl-title { font-weight: 700; font-size: 0.875rem; margin-bottom: 4px; color: #1e293b; }
.tl-sub   { font-size: 0.82rem; line-height: 1.6; color: #475569; }

/* =====================================================
   APPROVAL SETTINGS
   ===================================================== */
.approval-chain-display { display: flex; flex-direction: column; gap: 10px; }
.acd-step {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fafbff, #f0f4ff);
    border: 1px solid #e0e7ff; border-radius: 12px;
}
.acd-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #4f6ef7, #764ba2);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79,110,247,0.35);
}
.acd-arrow { text-align: center; color: #cbd5e1; padding: 2px 0; }
.acd-label { font-size: 0.7rem; color: #64748b; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.acd-name  { font-weight: 700; font-size: 0.9rem; color: #1e293b; }

.approval-flow-explain {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.flow-step { text-align: center; }
.flow-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem; margin: 0 auto 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.flow-text { display: flex; flex-direction: column; gap: 2px; }
.flow-text strong { font-size: 0.78rem; color: #1e293b; }
.flow-text small  { font-size: 0.68rem; color: #64748b; }
.flow-arrow { color: #cbd5e1; font-size: 1rem; }

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-cover-header {
    background: linear-gradient(135deg, #4f6ef7 0%, #764ba2 100%);
    padding: 32px 24px;
    position: relative; overflow: hidden;
}
.profile-cover-header::before {
    content: ''; position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.profile-avatar-wrap { display: flex; align-items: center; gap: 20px; position: relative; }
.profile-avatar-info h4 { color: white; margin: 0; font-weight: 800; font-size: 1.3rem; }
.profile-avatar-info p  { color: rgba(255,255,255,0.8); margin: 0; }

/* =====================================================
   DETAIL ITEMS
   ===================================================== */
.detail-item {
    display: flex; flex-direction: column;
    gap: 4px; padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.detail-item:last-child { border-bottom: none; }
.detail-label {
    font-size: 0.72rem; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.detail-value { font-size: 0.9rem; color: #1e293b; font-weight: 500; }

/* =====================================================
   NOTIFICATIONS DROPDOWN
   ===================================================== */
.notification-dropdown { width: 360px; max-height: 420px; overflow-y: auto; border-radius: 16px !important; }
.dropdown-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #f1f5f9; background: #fafbfc;
}
.notification-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid #f8fafc;
    transition: background 0.15s; text-decoration: none; color: inherit;
}
.notification-item.unread { background: #f0f7ff; }
.notification-item:hover  { background: #f8fafc; }
.notif-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.85rem; flex-shrink: 0;
}
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 0.85rem; font-weight: 600; color: #1e293b; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time  { font-size: 0.75rem; color: #94a3b8; }

/* =====================================================
   APPROVAL TABS
   ===================================================== */
.approval-tabs { gap: 8px; flex-wrap: wrap; }
.approval-tabs .nav-link {
    border-radius: 10px; font-weight: 600;
    padding: 8px 18px; color: #64748b;
    border: 1px solid #e2e8f0;
    background: white;
}
.approval-tabs .nav-link.active {
    background: linear-gradient(135deg, #4f6ef7, #764ba2);
    border-color: transparent; color: white;
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
}

/* =====================================================
   REPORT STYLES
   ===================================================== */
.report-type-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; border-bottom: 1px solid #f8fafc;
    transition: background 0.15s;
}
.report-type-item:last-child { border-bottom: none; }
.report-type-item:hover { background: #fafbff; }
.rti-left { display: flex; align-items: center; gap: 10px; }
.rti-dot  { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.rti-name { font-size: 0.9rem; font-weight: 600; color: #1e293b; }
.rti-right { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.monthly-chart {
    display: flex; align-items: flex-end;
    gap: 6px; height: 130px; padding: 0 4px;
}
.mc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.mc-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.mc-bar {
    width: 100%; min-height: 4px;
    background: linear-gradient(180deg, #4f6ef7, #764ba2);
    border-radius: 6px 6px 0 0;
    transition: all 0.4s;
    cursor: pointer;
}
.mc-bar:hover { opacity: 0.8; filter: brightness(1.1); }
.mc-label { font-size: 0.6rem; color: #94a3b8; font-weight: 600; }

/* =====================================================
   AVATAR PLACEHOLDER
   ===================================================== */
.avatar-placeholder {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    flex-shrink: 0; user-select: none;
    font-weight: 700;
}

/* =====================================================
   TABLES
   ===================================================== */
.table > :not(caption) > * > * { padding: 12px 16px; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fbff; }
.table thead th { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; background: #fafbfc; }

/* =====================================================
   FORM CONTROLS
   ===================================================== */
.form-control:focus, .form-select:focus {
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    background: linear-gradient(135deg, #4f6ef7, #764ba2);
    border: none;
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
    font-weight: 600;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3a55d4, #5c3a8a);
    box-shadow: 0 6px 16px rgba(79,110,247,0.4);
    transform: translateY(-1px);
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0 !important; }
    .welcome-banner { flex-direction: column; text-align: center; }
    .approval-status-grid { flex-direction: column; }
    .approval-flow-explain { justify-content: center; }
    .page-content { padding: 16px; }
    .top-navbar { padding: 0 16px; }
}

@media (max-width: 576px) {
    .stat-value { font-size: 1.8rem; }
    .card-body { padding: 16px; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
    .sidebar, .top-navbar, .no-print, .btn, .dropdown { display: none !important; }
    .main-wrapper { margin: 0 !important; }
    .page-content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
    body { background: white !important; }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeInUp 0.3s ease both; }
.stat-card { animation: fadeInUp 0.3s ease both; }

/* Flatpickr */
.flatpickr-calendar { font-family: 'Sarabun', sans-serif !important; border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; }
.flatpickr-day.selected { background: #4f6ef7 !important; border-color: #4f6ef7 !important; }