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

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --warning: #f59e0b;
    --bg: #f1f5f9;
    --bg-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #4f46e5;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

/* Scrollbar width */
::-webkit-scrollbar {
    width: 5px;
  }
  
  /* Track (background) */
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  /* Thumb (scroll handle) */
  ::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
  }
  
  /* Hover effect */
  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========== LOGIN & SETUP PAGES ========== */
body.page-auth {
    display: block;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #312e81 50%, #4f46e5 100%);
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    background: var(--card);
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-brand {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.login-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 24px;
    opacity: 0.85;
}

.is-ui-hidden {
    display: none !important;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 18px;
}

.login-card .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.login-footer {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========== SIDEBAR LAYOUT ========== */
body.page-panel {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-header span {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-top: 2px;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.sidebar-menu a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
    flex-shrink: 0;
}

.sidebar-menu .nav-logout {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu .nav-logout-form {
    margin: 0;
}

.sidebar-menu .nav-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.sidebar-menu .nav-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 64px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

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

.user-info .name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 28px;
    box-shadow: var(--shadow);
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.page-header-main {
    flex: 1;
    min-width: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 8px;
    padding: 4px 10px;
    background: #ede9fe;
    border-radius: 999px;
}

.page-eyebrow a {
    color: inherit;
    text-decoration: none;
}

.page-eyebrow a:hover {
    text-decoration: underline;
}

.page-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.70rem;
    line-height: 1.5;
    margin: 0;
    max-width: 560px;
}

.page-header-actions .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-header-profile .page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.page-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

.page-breadcrumb-sep {
    color: #cbd5e1;
    user-select: none;
}

.page-breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

.page-header-desc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    max-width: 640px;
}

.page-header-id {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: ui-monospace, Consolas, monospace;
    color: var(--primary-dark);
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.page-header-profile .page-header-actions {
    align-items: center;
}

.page-header-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-header-inline-form {
    margin: 0;
    display: inline-flex;
}

.page-header-btn-group .btn svg {
    flex-shrink: 0;
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--danger);
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.btn-header {
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.alert-page {
    margin-bottom: 24px;
}

.upload-preview-ready {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
}

.upload-preview-ready strong {
    display: block;
    margin-bottom: 2px;
    color: #065f46;
}

.upload-preview-ready span {
    font-size: 0.85rem;
    color: #047857;
}

.upload-preview-ready-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.upload-preview-ready-form {
    margin: 0;
}

.modal-upload-preview {
    max-width: 920px;
}

.modal-upload-preview-body {
    padding-bottom: 16px;
}

.modal-upload-preview-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.upload-preview-foot-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.upload-preview-foot-pagination .emp-pagination-info {
    margin: 0;
}

.upload-preview-foot-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 28px 20px;
    background: #f8fafc;
}

.upload-preview-foot-actions .btn {
    min-width: 132px;
    height: 44px;
    padding: 0 20px;
    box-sizing: border-box;
}

.upload-preview-confirm-form {
    margin: 0;
    display: flex;
    align-items: stretch;
}

.upload-preview-confirm-form .btn {
    width: 100%;
}

.upload-preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.upload-preview-stat {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.upload-preview-stat span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.upload-preview-stat strong {
    font-size: 1.25rem;
    color: var(--text);
}

.upload-preview-table-wrap {
    max-height: min(52vh, 420px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.upload-preview-empty {
    margin: 12px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ========== STAT CARDS ========== */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

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

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

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

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

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.stat-icon-wrap.employees {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--primary);
}

.stat-icon-wrap.attendance {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #0891b2;
}

.stat-icon-wrap.present {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.stat-card .stat-body h3 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== PANEL / SECTION ========== */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

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

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.panel-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 999px;
    border: 1px solid var(--border);
}

.panel-elevated {
    box-shadow: var(--shadow-lg);
}

.panel-compact .panel-header {
    padding: 16px 20px;
}

.panel-body {
    padding: 0;
}

.panel-body.padded {
    padding: 24px;
}

/* ========== FORMS ========== */
.form-container {
    background: var(--card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    max-width: 560px;
}

.form-container.wide {
    max-width: 100%;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input[type="file"] {
    padding: 10px;
    background: var(--bg);
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}

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

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

.btn-block {
    width: 100%;
}

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

.btn-outline:hover {
    background: rgba(79, 70, 229, 0.08);
}

/* Employee view / profile header actions */
.page-header-btn-group .btn {
    gap: 7px;
    padding: 9px 14px;
    font-size: 0.8125rem;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.page-header-btn-group .btn-action-edit {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

.page-header-btn-group .btn-action-edit:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.page-header-btn-group .btn-action-back {
    color: #475569;
    background: #fff;
    border-color: var(--border);
}

.page-header-btn-group .btn-action-back:hover {
    color: var(--text);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.page-header-btn-group .btn-status-deactivate {
    color: #b45309;
    background: #fffbeb;
    border-color: #fcd34d;
}

.page-header-btn-group .btn-status-deactivate:hover {
    color: #92400e;
    background: #fef3c7;
    border-color: #fbbf24;
}

.page-header-btn-group .btn-status-activate {
    color: #fff;
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: #059669;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.page-header-btn-group .btn-status-activate:hover {
    background: linear-gradient(135deg, #047857, #059669);
}

.page-header-btn-group .btn-action-delete {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-color: #dc2626;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.22);
}

.page-header-btn-group .btn-action-delete:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.32);
}

/* ========== ALERTS ========== */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #a7f3d0;
}

/* ========== TABLES ========== */
.table-wrap {
    overflow-x: auto;
}

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

table th,
table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

table th {
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tbody tr:hover {
    background: #f8fafc;
}

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

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 32px !important;
}

/* ========== TABLE ENHANCEMENTS ========== */
.data-table tbody tr {
    transition: background var(--transition);
}

.cell-employee {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emp-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-name {
    display: block;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.emp-id {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
}

.cell-date {
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.data-table-compact th,
.data-table-compact td {
    padding: 10px 16px;
}

.data-table code {
    font-size: 0.8rem;
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary-dark);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 56px 32px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== STATUS BADGES ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

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

.badge-hd {
    background: #fef3c7;
    color: #92400e;
}

.badge-wo {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-leave {
    background: #ffedd5;
    color: #c2410c;
}

/* ========== UPLOAD PAGE ========== */
.upload-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: start;
}

.upload-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 28px;
}

.upload-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.upload-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.upload-card-icon svg {
    width: 24px;
    height: 24px;
}

.upload-card-head h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.upload-card-head p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-period-picker {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
}

.upload-period-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.upload-period-label svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

.upload-period-label strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 2px;
}

.upload-period-label span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-period-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.upload-period-fields .form-group {
    margin: 0;
}

.upload-period-fields label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.upload-period-fields select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff;
    color: var(--text);
}

.upload-period-fields select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.upload-period-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.upload-period-hint code {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 5px;
    border-radius: 4px;
}

.dropzone {
    display: block;
    cursor: pointer;
    margin-bottom: 16px;
}

.dropzone-inner {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    background: linear-gradient(180deg, #fafbfc 0%, var(--bg) 100%);
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.dropzone:hover .dropzone-inner,
.dropzone.drag-over .dropzone-inner {
    border-color: var(--primary-light);
    background: #f5f3ff;
}

.dropzone.has-file .dropzone-inner {
    border-color: var(--success);
    background: #f0fdf4;
    border-style: solid;
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background: var(--card);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.dropzone-icon svg {
    width: 28px;
    height: 28px;
}

.dropzone-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.dropzone-title span {
    color: var(--primary);
}

.dropzone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dropzone-btn {
    display: inline-block;
    padding: 8px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.format-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.format-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
}

.btn-upload {
    margin-top: 4px;
    padding: 14px 24px;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.upload-guide {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.guide-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.guide-intro {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.guide-steps {
    list-style: none;
    counter-reset: step;
}

.guide-steps li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 14px;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.5;
}

.guide-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-steps li strong {
    color: var(--text);
}

@media (max-width: 960px) {
    .upload-layout {
        grid-template-columns: 1fr;
    }
}

/* ========== SETUP PAGE ========== */
.setup-log {
    text-align: left;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text);
    max-height: 280px;
    overflow-y: auto;
}

.setup-log .ok {
    color: var(--success);
}

.setup-log .err {
    color: var(--danger);
}

/* ========== EMPLOYEES PAGE ========== */
.emp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.emp-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

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

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

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

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

.emp-stat-listed::before {
    background: #8b5cf6;
}

.emp-stat-listed.is-filtered::before {
    background: var(--warning);
}

.emp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.emp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-stat-icon svg {
    width: 24px;
    height: 24px;
}

.emp-stat-total .emp-stat-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--primary);
}

.emp-stat-active .emp-stat-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.emp-stat-active .emp-stat-value {
    color: #059669;
}

.emp-stat-email .emp-stat-icon {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #0891b2;
}

.emp-stat-listed .emp-stat-icon {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #7c3aed;
}

.emp-stat-listed.is-filtered .emp-stat-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.emp-stat-body {
    min-width: 0;
    flex: 1;
}

.emp-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.emp-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.emp-stat-total .emp-stat-value {
    color: var(--primary);
}

.emp-stat-email .emp-stat-value {
    color: #0891b2;
}

.emp-stat-listed .emp-stat-value {
    color: #7c3aed;
}

.emp-stat-listed.is-filtered .emp-stat-value {
    color: #d97706;
}

.emp-stat-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.35;
}

.employees-panel-head {
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.emp-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
    position: relative;
}

.emp-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.emp-search input[type="search"] {
    flex: 1;
    width: 100%;
    padding: 10px 36px 10px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.emp-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.emp-search-clear:hover {
    background: var(--bg);
    color: var(--text);
}

.emp-search-clear[hidden] {
    display: none;
}

.emp-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.emp-table .emp-row {
    transition: background var(--transition);
}

.emp-table .emp-row:hover {
    background: #f8fafc;
}

.emp-table .emp-row:hover .emp-avatar {
    transform: scale(1.05);
}

.emp-table .emp-avatar {
    transition: transform var(--transition);
}

.dept-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    background: #ede9fe;
    color: var(--primary-dark);
    border-radius: 999px;
    margin-bottom: 4px;
}

.emp-designation {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.salary-pill {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #a7f3d0;
}

.salary-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text);
    margin-bottom: 4px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-line svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
}

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

.contact-missing {
    font-size: 0.8rem;
    color: var(--warning);
    font-weight: 500;
}

.th-actions {
    text-align: right;
    width: 180px;
}

.emp-table .cell-actions {
    min-width: 160px;
}

.emp-row-inactive {
    background: #fafbfc;
}

.emp-row-inactive .emp-name {
    color: var(--text-muted);
}

.badge-active-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-inactive-status {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--border);
}

.action-toggle-form {
    display: inline;
    margin: 0;
}

.btn-action.btn-deactivate {
    color: #d97706;
    border-color: #fde68a;
    background: #fffbeb;
}

.btn-action.btn-deactivate:hover {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}

.btn-action.btn-activate {
    color: var(--success);
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.btn-action.btn-activate:hover {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.action-btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.action-delete-form {
    display: inline;
    margin: 0;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-action svg {
    width: 16px;
    height: 16px;
}

.btn-action.btn-view {
    color: var(--primary);
    border-color: #c7d2fe;
    background: #eef2ff;
    flex-shrink: 0;
}

.btn-action.btn-view svg {
    display: block;
    flex-shrink: 0;
}

.btn-action.btn-view:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-action.btn-pdf {
    color: #059669;
    border-color: #a7f3d0;
    background: #ecfdf5;
    flex-shrink: 0;
}

.btn-action.btn-pdf svg {
    display: block;
    flex-shrink: 0;
}

.btn-action.btn-pdf:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

.btn-action.btn-edit {
    color: #0891b2;
    border-color: #a5f3fc;
    background: #ecfeff;
}

.btn-action.btn-edit:hover {
    background: #0891b2;
    color: #fff;
}

.btn-action.btn-delete {
    color: var(--danger);
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-action.btn-delete:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}

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

.inline-delete-form {
    display: inline;
    margin: 0;
}

.input-disabled {
    background: var(--bg) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

.cell-actions {
    text-align: right;
    white-space: nowrap;
}

.link-muted {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.emp-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    border-radius: 16px;
}

.profile-hero h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.detail-list {
    display: grid;
    gap: 14px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
}

.detail-list dt {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-list dd {
    font-weight: 600;
    text-align: right;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.stack-form .form-group {
    margin-bottom: 16px;
}

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

.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
}

.salary-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.salary-stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.salary-stat span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.salary-stat strong {
    font-size: 1.25rem;
    color: var(--text);
}

.salary-stat.highlight {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border-color: #c7d2fe;
}

.salary-stat.highlight strong {
    color: var(--primary);
}

.inline-filter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.empty-state.compact {
    padding: 32px;
}

.empty-state.compact p {
    margin: 0;
}

.empty-state.compact h4 {
    margin: 12px 0 6px;
    font-size: 1rem;
}

.panel-header-split {
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-payroll-filter {
    margin-left: auto;
}

.dashboard-payroll-stats {
    margin-bottom: 4px;
}

.dashboard-payroll-table .col-num {
    text-align: center;
    width: 90px;
}

.dashboard-payroll-table .col-money {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.col-action {
    text-align: right;
    white-space: nowrap;
    width: 100px;
}

.dashboard-payroll-table .col-action {
    width: 108px;
}

.dashboard-payroll-table .col-action .action-btns {
    justify-content: flex-end;
}

.dashboard-payroll-table thead .col-action {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.net-pay-cell {
    color: #059669;
    font-weight: 700;
}

.payroll-muted {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.payroll-total-row td {
    background: #f8fafc;
    border-top: 2px solid var(--border);
    padding-top: 14px;
    padding-bottom: 14px;
}

.btn-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-send-slips {
    position: relative;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-send-slips.is-loading {
    opacity: 0.92;
    cursor: wait;
}

.btn-send-slips-label {
    display: inline;
}

.btn-send-slips-loader {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-send-slips.is-loading .btn-send-slips-label {
    display: none;
}

.btn-send-slips.is-loading .btn-send-slips-loader {
    display: inline-flex;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

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

.slip-send-status {
    margin: 16px 0 0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
}

.slip-send-status.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.slip-send-meta {
    font-size: 0.875rem;
    opacity: 0.9;
}

.panel-action.is-sending {
    pointer-events: none;
    opacity: 0.98;
}

.slip-select-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.slip-select-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.slip-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    cursor: pointer;
}

.settings-tip-admins {
    margin-bottom: 0;
}

.settings-admins-panel {
    padding-top: 20px;
}

.settings-admins-panel .settings-form-section-add {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-admins-panel .admin-add-form .settings-form-actions {
    margin-top: 16px;
    padding-top: 0;
    border-top: none;
}

.admin-users-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-users-section-head h4 {
    margin-bottom: 4px;
}

.admin-users-section-hint {
    margin: 0;
}

.admin-users-count-badge {
    flex-shrink: 0;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.admin-users-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    text-align: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.admin-users-empty svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.6;
}

.admin-users-empty p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 280px;
}

.admin-user-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-user-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.admin-user-card.is-self {
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
    border-color: #ddd6fe;
}

.admin-user-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-user-card.is-self .admin-user-avatar {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.admin-user-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-user-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.admin-user-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-card-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.admin-user-you-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
}

.btn-danger-outline {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff;
}

.btn-danger-outline:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.emp-filters {
    flex-shrink: 0;
}

.emp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 0;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc 0%, var(--card) 100%);
}

.emp-pagination-info {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.emp-pagination-info strong {
    color: var(--text);
    font-weight: 700;
}

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

.emp-pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-page-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.emp-page-link,
.emp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.emp-page-link {
    min-width: 36px;
    padding: 0;
}

.emp-page-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.emp-page-link:hover,
.emp-page-btn:not(.is-disabled):hover {
    background: #f5f3ff;
    border-color: #c7d2fe;
    color: var(--primary);
}

.emp-page-link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

.emp-page-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.emp-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    color: var(--text-muted);
    font-size: 0.9rem;
    user-select: none;
}

.upload-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ev-att-edit-form .form-row {
    align-items: flex-end;
}


.ev-att-edit-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ev-att-edit-form-sidebar .form-group {
    margin: 0;
}

.ev-att-edit-form-sidebar label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ev-att-edit-form-sidebar input,
.ev-att-edit-form-sidebar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--card);
}

.ev-att-edit-form-sidebar input:focus,
.ev-att-edit-form-sidebar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.ev-att-edit-form-sidebar .btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}

.ev-att-edit-hint {
    margin: 12px 0 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== EMPLOYEE VIEW PAGE ========== */
.employee-view-page {
    max-width: 1200px;
}

.ev-profile-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #312e81 55%, #4f46e5 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.ev-profile-banner-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.emp-avatar-xl {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.ev-profile-banner-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ev-profile-banner-text > p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 10px;
}

.ev-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-profile-tags .dept-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ev-role-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.25);
    border: 1px solid rgba(6, 182, 212, 0.45);
    color: #e0f2fe;
    font-weight: 600;
}

.ev-readiness {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-readiness-chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ev-readiness-chip.ok {
    background: rgba(16, 185, 129, 0.2);
    color: #d1fae5;
    border-color: rgba(16, 185, 129, 0.4);
}

.ev-readiness-chip.warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fef3c7;
    border-color: rgba(245, 158, 11, 0.45);
}

.ev-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ev-quick-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.ev-quick-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
}

.ev-quick-stat-present::before {
    background: var(--success);
}

.ev-quick-stat-absent::before {
    background: var(--danger);
}

.ev-quick-stat-net::before {
    background: var(--primary);
}

.ev-quick-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.ev-quick-stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.ev-quick-stat-net strong {
    color: var(--primary);
}

.ev-quick-stat-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ev-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.ev-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ev-info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.ev-info-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.ev-info-card-title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--primary);
}

.ev-info-card-title-split {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.ev-info-card-title-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ev-info-card-title-label > span {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    line-height: 1.2;
}

.ev-adj-panel .panel-header {
    align-items: center;
}

.ev-adj-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.ev-adj-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ev-adj-intro {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ev-adj-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ev-adj-summary-chip {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
}

.ev-adj-chip-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.ev-adj-chip-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.ev-adj-chip-bonus {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}

.ev-adj-chip-bonus .ev-adj-chip-value {
    color: #047857;
}

.ev-adj-chip-incentive {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.ev-adj-chip-incentive .ev-adj-chip-value {
    color: #1d4ed8;
}

.ev-adj-chip-deduction {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fecaca;
}

.ev-adj-chip-deduction .ev-adj-chip-value {
    color: #b91c1c;
}

.ev-adj-chip-net {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #cbd5e1;
}

.ev-adj-chip-net.is-positive .ev-adj-chip-value {
    color: #047857;
}

.ev-adj-chip-net.is-negative .ev-adj-chip-value {
    color: #b91c1c;
}

.ev-adj-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-adj-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ev-adj-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.ev-adj-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
}

.ev-adj-card-icon svg {
    width: 18px;
    height: 18px;
}

.ev-adj-card-bonus .ev-adj-card-icon {
    background: #dcfce7;
    color: #047857;
}

.ev-adj-card-incentive .ev-adj-card-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.ev-adj-card-deduction .ev-adj-card-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.ev-adj-card-main {
    min-width: 0;
}

.ev-adj-card-type {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.ev-adj-card-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.ev-adj-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ev-adj-card-amount {
    font-size: 0.9375rem;
    font-weight: 700;
    white-space: nowrap;
}

.ev-adj-card-amount.is-credit {
    color: #047857;
}

.ev-adj-card-amount.is-deduction {
    color: #b91c1c;
}

.ev-adj-remove-form {
    margin: 0;
}

.ev-adj-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ev-adj-remove-btn svg {
    width: 15px;
    height: 15px;
}

.ev-adj-remove-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.ev-adj-empty {
    text-align: center;
    padding: 28px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.ev-adj-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #64748b;
}

.ev-adj-empty-icon svg {
    width: 24px;
    height: 24px;
}

.ev-adj-empty p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ev-adj-empty p strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.875rem;
    color: var(--text);
}

.ev-adj-lock-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.45;
}

.ev-adj-lock-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.ev-adj-form-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.ev-adj-form-title {
    margin: 0 0 12px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

.ev-adj-form {
    margin: 0;
}

.ev-adj-form-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1.1fr) minmax(180px, 1.4fr) minmax(120px, 0.9fr) auto;
    gap: 12px;
    align-items: end;
}

.ev-adj-form-grid .form-group {
    margin: 0;
}

.ev-adj-form-grid label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ev-adj-form-grid input,
.ev-adj-form-grid select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    background: #fff;
}

.ev-adj-form-submit .btn {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .ev-adj-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .ev-adj-form-submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .ev-adj-summary {
        grid-template-columns: 1fr;
    }

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

    .ev-adj-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .ev-adj-card-actions {
        grid-column: 2;
        justify-content: space-between;
    }
}

/* Legacy list styles kept for compatibility */
.ev-adj-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-adj-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.ev-adj-list .ev-adj-amount.bonus {
    color: #047857;
    font-weight: 700;
}

.ev-adj-list .ev-adj-amount.deduction {
    color: #b91c1c;
    font-weight: 700;
}

.ev-lock-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: #92400e;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.ev-info-card-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--primary);
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.2;
}

.ev-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ev-info-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ev-slip-history {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.ev-slip-history-heading {
    margin: 0 0 2px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
}

.ev-slip-history-sub {
    margin: 0 0 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ev-slip-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-slip-history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), background var(--transition);
}

.ev-slip-history-item.is-active-period {
    border-color: #a5b4fc;
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
}

.ev-slip-history-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    text-decoration: none;
    min-width: 0;
}

.ev-slip-history-main:hover .ev-slip-history-period {
    color: var(--primary);
}

.ev-slip-history-period {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.ev-slip-history-net {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #047857;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ev-slip-history-pdf {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    background: #fff;
}

.ev-slip-history-pdf:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ev-slip-history-date {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.ev-slip-history-empty {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.ev-slip-history-empty a {
    color: var(--primary);
    font-weight: 600;
}

.ev-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ev-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.ev-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.ev-panel-header-split {
    flex-wrap: wrap;
    gap: 12px;
}

.ev-period-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ev-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ev-period-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
}

.ev-salary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ev-salary-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.ev-salary-meta-item {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.ev-salary-meta-item span {
    display: block;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ev-salary-meta-item strong {
    color: var(--text);
    font-size: 0.9375rem;
}

.ev-salary-meta-highlight {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}

.ev-salary-meta-highlight strong {
    color: #047857;
}

.ev-salary-meta-sub {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    color: #059669;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ev-salary-table-section {
    margin: 0;
}

.ev-salary-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.ev-salary-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.ev-salary-section-icon.earnings {
    background: #ecfdf5;
    color: #059669;
}

.ev-salary-section-icon.deductions {
    background: #fef2f2;
    color: #dc2626;
}

.ev-salary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ev-salary-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.ev-salary-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.ev-salary-table .col-pct {
    width: 88px;
    text-align: center;
}

.ev-salary-table .col-amt {
    width: 120px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ev-salary-table .col-amt.strong {
    font-weight: 700;
    color: var(--text);
}

.ev-salary-table .col-amt.ded {
    color: #b91c1c;
}

.ev-comp-label {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.ev-comp-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.ev-pct-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border-radius: 999px;
}

.ev-pct-badge.ev-pct-ded {
    color: #b45309;
    background: #fffbeb;
}

.ev-salary-tfoot td {
    background: #f8fafc;
    border-top: 2px solid var(--border);
}

.ev-salary-tfoot-ded td {
    background: #fef2f2;
}

.ev-salary-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.ev-salary-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.875rem;
}

.ev-salary-summary-row span {
    color: var(--text-muted);
}

.ev-salary-summary-row span small {
    display: block;
    font-size: 0.75rem;
    margin-top: 2px;
}

.ev-salary-summary-row strong {
    color: var(--text);
    white-space: nowrap;
}

.ev-salary-summary-row strong.ded {
    color: #dc2626;
}

.ev-salary-footnote {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ev-salary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.ev-salary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.ev-salary-row span {
    color: var(--text-muted);
}

.ev-salary-row strong {
    color: var(--text);
    font-weight: 700;
}

.ev-net-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
}

.ev-net-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.ev-net-formula {
    margin: 0;
    font-size: 0.8rem;
    color: #6366f1;
}

.ev-net-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.ev-day-cell {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Attendance calendar (employee profile) */
.ev-att-cal-header {
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.att-cal-month-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.att-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-muted);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.att-cal-nav-btn:hover {
    background: var(--bg);
    color: var(--primary);
    border-color: #c7d2fe;
}

.att-cal-nav-btn svg {
    width: 16px;
    height: 16px;
}

.att-cal-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.att-cal-select:focus {
    outline: none;
    border-color: var(--primary);
}

.att-cal-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.att-cal-summary .att-legend-item {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.att-cal-summary .att-legend-item.att-code-p {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.att-cal-summary .att-legend-item.att-code-a {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.att-cal-summary .att-legend-item.att-code-hd {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.att-cal-panel-body {
    padding: 14px 16px 16px !important;
}

.att-cal-month-title {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.att-cal-empty-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

.att-cal-empty-note a {
    color: var(--primary);
    font-weight: 600;
}

.att-calendar-compact {
    margin-bottom: 10px;
}

.att-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 4px;
}

.att-cal-weekdays span {
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 2px 0;
    line-height: 1;
}

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

.att-cal-cell {
    min-height: 0;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 2px 1px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.att-cal-cell-empty {
    background: transparent;
    border-color: transparent;
    height: 38px;
    padding: 0;
}

.att-cal-cell.att-cal-no-record {
    background: #fafbfc;
}

.att-cal-cell.att-cal-today {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.2);
}

.att-cal-cell-clickable {
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.att-cal-cell-clickable:hover,
.att-cal-cell-clickable:focus-visible {
    transform: translateY(-1px);
    border-color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    outline: none;
}

.att-cal-holiday {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

.att-cal-holiday-code {
    color: #c2410c;
    font-weight: 800;
}

.att-cal-day-num {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1;
}

.att-cal-today .att-cal-day-num {
    color: var(--primary);
    font-weight: 700;
}

.att-cal-code {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 16px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.att-code-p {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.att-code-a {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.att-code-hd {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.att-code-wo {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

.att-code-l,
.att-cal-code-leave {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
    font-size: 0.52rem;
}

.att-cal-summary .att-legend-item.att-code-l {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.att-cal-roster-wo {
    background: #f5f3ff;
}

.att-cal-summary .att-legend-item.att-code-wo {
    background: #e0e7ff;
    color: #3730a3;
}

.att-code-unknown {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--border);
}

.att-cal-dash,
.att-legend-empty {
    background: #f8fafc;
    color: #cbd5e1;
    border: 1px dashed #e2e8f0;
    font-weight: 600;
}

.att-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.att-cal-legend-compact {
    gap: 8px 12px;
    padding-top: 8px;
}

.att-cal-legend .att-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.att-legend-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 16px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .ev-att-cal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .att-cal-summary {
        margin-left: 0;
        width: 100%;
    }

    .att-cal-month-nav {
        width: 100%;
        justify-content: space-between;
    }

    .att-cal-select {
        flex: 1;
        min-width: 0;
    }

    .att-cal-cell,
    .att-cal-cell-empty {
        height: 34px;
    }

    .att-cal-code {
        width: 18px;
        height: 14px;
        font-size: 0.55rem;
    }
}

.ev-edit-panel {
    margin-bottom: 32px;
}

.ev-form-section {
    margin-bottom: 24px;
}

.ev-form-section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.ev-form-actions {
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.ev-edit-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1024px) {
    .ev-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ev-layout {
        grid-template-columns: 1fr;
    }

    .ev-salary-grid {
        grid-template-columns: 1fr;
    }
}

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

    .ev-profile-banner {
        padding: 20px;
    }

    .ev-period-filter {
        width: 100%;
    }

    .ev-period-filter select {
        flex: 1;
        min-width: 0;
    }
}

/* ========== MODAL ========== */
.modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 48px);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    margin: 0;
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal[open] {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #06b6d4 100%);
    color: #fff;
}

.modal-head-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-head-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-head-icon svg {
    width: 26px;
    height: 26px;
}

.modal-head h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.modal-head p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.modal-body {
    padding: 24px 28px 8px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 8px;
}

.modal-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.modal-employee .form-group {
    margin-bottom: 0;
}

.modal-employee .form-row {
    margin-bottom: 16px;
}

.modal-employee .form-row:last-child {
    margin-bottom: 0;
}

.modal-employee label .req {
    color: var(--danger);
}

.modal-employee .form-hint {
    margin-top: 6px;
    font-size: 0.75rem;
}

.input-prefix-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-prefix-wrap input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    flex: 1;
}

.input-prefix-wrap input:focus {
    z-index: 1;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.modal-foot .btn {
    min-width: 120px;
}

@media (max-width: 600px) {
    .modal-employee .form-row {
        grid-template-columns: 1fr;
    }

    .modal-head {
        padding: 20px;
    }

    .modal-body,
    .modal-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .upload-preview-foot-pagination {
        padding-left: 20px;
        padding-right: 20px;
    }

    .upload-preview-foot-actions {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ========== SETTINGS PAGE ========== */
.settings-status {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.settings-status-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    min-width: 220px;
    box-shadow: var(--shadow-sm);
}

.settings-status-chip .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.settings-status-chip.ok .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-bg);
}

.settings-status-chip.warn .status-dot {
    background: var(--warning);
    box-shadow: 0 0 0 3px #fef3c7;
}

.settings-status-chip.neutral .status-dot {
    background: var(--primary);
    box-shadow: 0 0 0 3px #ede9fe;
}

.settings-status-chip strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 2px;
}

.settings-status-chip span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}

.settings-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 4px 10px 10px;
    margin: 0;
}

.settings-tab {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.settings-tab-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}

.settings-tab-icon {
    width: 20px;
    height: 20px;
}

.settings-tab-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.settings-tab-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.settings-tab-desc {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.settings-tab:hover {
    background: var(--bg);
    border-color: var(--border);
}

.settings-tab:hover .settings-tab-icon-wrap {
    background: #ede9fe;
    color: var(--primary);
}

.settings-tab.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.settings-tab.active .settings-tab-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.settings-tab.active .settings-tab-title,
.settings-tab.active .settings-tab-desc {
    color: #fff;
}

.settings-tab.active .settings-tab-desc {
    opacity: 0.9;
}

.settings-content {
    min-width: 0;
}

.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.settings-card-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc 0%, var(--card) 100%);
}

.settings-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-card-icon svg {
    width: 26px;
    height: 26px;
}

.settings-card-icon.tab-smtp {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #0891b2;
}

.settings-card-icon.tab-password {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #db2777;
}

.settings-card-icon.tab-payroll {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.settings-card-icon.tab-admins {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
}

.settings-card-head h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.settings-card-head p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.settings-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 20px 28px 0;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #1e40af;
    line-height: 1.5;
}

.settings-tip svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.settings-tip code {
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.settings-tip a {
    color: #1d4ed8;
    font-weight: 600;
}

.settings-tip-security {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.settings-form {
    padding: 24px 28px 28px;
}

.settings-form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.settings-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-form-section h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 16px;
}

.settings-form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.settings-form-actions .btn {
    min-width: 200px;
}

.smtp-test-form {
    margin: 0 28px 28px;
    padding: 20px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.signature-preview-box {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.signature-preview-box img {
    max-width: 220px;
    max-height: 80px;
    object-fit: contain;
}

.signature-preview-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.signature-preview-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.signature-remove-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--danger);
    cursor: pointer;
}

.smtp-test-form h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

/* Password show/hide */
.password-field {
    position: relative;
    display: flex;
    align-items: stretch;
}

.password-field input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--bg);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
}

.password-toggle .icon-eye-hide {
    display: none;
}

.password-toggle.is-visible .icon-eye-show {
    display: none;
}

.password-toggle.is-visible .icon-eye-hide {
    display: block;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
}

.password-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.seed-list {
    margin: 0 0 20px 20px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.8;
}

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

/* ========== DASHBOARD ========== */
.dashboard-page-header p strong {
    color: var(--text);
}

.dashboard-status {
    margin-bottom: 24px;
}

.dashboard-stats {
    margin-bottom: 28px;
}

.stat-card-payroll::before {
    background: #059669;
}

.stat-icon-wrap.payroll {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.stat-value-money {
    font-size: 1.65rem;
    letter-spacing: -0.02em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    margin-bottom: 28px;
    align-items: start;
}

.dashboard-send-panel,
.dashboard-payroll-panel {
    overflow: hidden;
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc 0%, var(--card) 100%);
}

.dashboard-panel-head-table {
    flex-wrap: wrap;
}

.dashboard-panel-head-actions {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-panel-period-filter {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.dashboard-panel-period-filter .form-group {
    margin: 0;
    min-width: 120px;
}

.dashboard-panel-period-filter label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dashboard-panel-period-filter select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    background: var(--card);
}

.dashboard-panel-total-inline {
    margin-left: 0;
    align-self: center;
    white-space: nowrap;
}

.dashboard-panel-head h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.dashboard-panel-head p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dashboard-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-panel-icon svg {
    width: 24px;
    height: 24px;
}

.dashboard-panel-icon.send {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #0891b2;
}

.dashboard-panel-icon.payroll {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.dashboard-panel-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.dashboard-panel-badge.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.dashboard-panel-badge.warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.dashboard-panel-total {
    margin-left: auto;
    font-size: 1.25rem;
    font-weight: 800;
    color: #047857;
    font-variant-numeric: tabular-nums;
}

.dashboard-send-controls {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dashboard-send-hint {
    margin: 14px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.dashboard-send-empty {
    padding: 24px 16px;
    text-align: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.dashboard-send-empty p {
    margin: 0 0 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.dashboard-send-empty span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dashboard-inline-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.dashboard-inline-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.dashboard-inline-alert p {
    margin: 0;
    line-height: 1.45;
}

.dashboard-inline-alert.warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.dashboard-inline-alert a {
    color: #b45309;
    font-weight: 600;
}

.slip-recipient-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
}

.slip-recipient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.slip-recipient-item:hover {
    border-color: #c7d2fe;
    background: #fafafa;
}

.slip-recipient-item:has(input:checked) {
    border-color: #a5b4fc;
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
}

.slip-recipient-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.slip-recipient-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slip-recipient-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.slip-recipient-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.slip-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.dashboard-send-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dashboard-period-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.slip-recipient-sent {
    opacity: 0.85;
}

.slip-recipient-sent .slip-recipient-meta::after {
    content: ' · already sent';
    color: #047857;
    font-weight: 600;
}

.dashboard-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-aside-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.dashboard-aside-card h4 {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
}

.dashboard-aside-desc {
    margin: 0 0 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.dashboard-period-form {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.dashboard-period-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dashboard-period-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--card);
}

.dashboard-table-wrap {
    margin-top: 4px;
}

.dashboard-payroll-footnote {
    margin: 14px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.dashboard-payroll-footnote a {
    color: var(--primary);
    font-weight: 600;
}

.dashboard-empty {
    margin-top: 8px;
}

.payroll-phl {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-send-slips svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========== SLIP LOGS ========== */
.slip-logs-page .page-header-main p strong {
    color: var(--text);
}

.slip-logs-status {
    margin-bottom: 24px;
}

.slip-logs-layout {
    display: block;
}

.slip-logs-panel {
    overflow: hidden;
}

.slip-logs-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.slip-logs-stat {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.slip-logs-stat span {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.slip-logs-stat strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.slip-logs-stat.ok strong {
    color: #047857;
}

.slip-logs-stat.warn strong {
    color: #b45309;
}

.slip-logs-stat.highlight {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: #a7f3d0;
}

.slip-logs-stat.highlight strong {
    color: #047857;
}

.slip-logs-table-wrap {
    margin-top: 4px;
}

.slip-logs-table .slip-log-date {
    white-space: nowrap;
}

.slip-log-date-main {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.slip-log-date-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.slip-log-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slip-log-row.is-failed {
    background: #fffbfb;
}

.slip-log-row.is-failed:hover {
    background: #fef2f2;
}

.emp-name-link {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

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

.slip-logs-footnote {
    margin: 14px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.slip-logs-empty {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.slip-logs-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slip-logs-empty-icon svg {
    width: 28px;
    height: 28px;
}

.slip-logs-empty h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--text);
}

.slip-logs-empty p {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.slip-logs-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ========== DASHBOARD SLIP FORM ========== */
.panel-action {
    margin-bottom: 28px;
}

.slip-form-row {
    align-items: flex-end;
    max-width: 520px;
}

.form-group-btn .btn {
    width: 100%;
}

.warn-hint a {
    color: var(--primary);
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-aside {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-aside-card {
        flex: 1 1 240px;
    }

    .dashboard-panel-total {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .dashboard-panel-head-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        justify-content: flex-end;
    }

    .dashboard-panel-total-inline {
        width: auto;
        margin-top: 0;
    }

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

@media (max-width: 768px) {
    .sidebar {
        width: 72px;
    }

    .sidebar-header h2,
    .sidebar-header span,
    .sidebar-menu a span {
        display: none;
    }

    .sidebar-header {
        padding: 16px 12px;
        text-align: center;
    }

    .sidebar-brand {
        justify-content: center;
    }

    .sidebar-menu a {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 72px;
    }

    .topbar {
        padding: 0 16px;
    }

    .user-info {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .page-header {
        padding: 18px 20px;
    }

    .page-header-row,
    .page-header-profile .page-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .page-header-actions,
    .page-header-profile .page-header-actions {
        width: 100%;
        align-items: stretch;
    }

    .page-header-btn-group {
        width: 100%;
        justify-content: stretch;
    }

    .page-header-btn-group .btn {
        flex: 1 1 auto;
        justify-content: center;
        min-width: calc(50% - 4px);
    }

    .card-container {
        grid-template-columns: 1fr;
    }

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

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
        padding: 12px;
    }

    .settings-nav-label {
        width: 100%;
    }

    .settings-tab {
        flex: 1;
        min-width: 140px;
    }

    .settings-tab-desc {
        display: none;
    }

    .settings-card-head,
    .settings-form,
    .settings-tip {
        padding-left: 20px;
        padding-right: 20px;
    }

    .settings-tip {
        margin-left: 20px;
        margin-right: 20px;
    }

    .admin-user-card {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .admin-user-card-actions {
        width: 100%;
        padding-left: 58px;
    }

    .employees-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .emp-search {
        max-width: none;
        min-width: 0;
    }

    .emp-pagination {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .emp-pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .emp-page-btn span {
        display: none;
    }

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

    .emp-stat-card {
        padding: 16px 18px;
    }

    .emp-table th:nth-child(3),
    .emp-table td:nth-child(3) {
        display: none;
    }

    .contact-line {
        max-width: 140px;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.branch-switcher {
    margin: 0;
}

.branch-switcher select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
    min-width: 160px;
}

.branch-pill-table {
    font-size: 0.72rem;
    padding: 4px 10px;
}

.branch-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ede9fe;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.upload-lock-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.upload-reopen-form {
    margin: 0;
    flex-shrink: 0;
}

.upload-undo-card {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    background: #fff5f5;
}

.upload-undo-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #991b1b;
}

.upload-undo-card p {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #7f1d1d;
    line-height: 1.45;
}

.upload-undo-notes {
    margin: 0 0 14px;
    padding-left: 18px;
    font-size: 0.8rem;
    color: #9a3412;
    line-height: 1.5;
}

.upload-undo-form {
    margin: 0;
}

.btn.btn-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff;
}

.btn.btn-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.holidays-template-btn {
    margin-top: 8px;
}

.emp-topbar-logout-form {
    margin: 0;
}

.emp-topbar-logout-form .emp-topbar-logout {
    font-family: inherit;
    cursor: pointer;
}

/* ========== HOLIDAYS PAGE ========== */
.holidays-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.holidays-workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.holidays-workflow-num {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ede9fe;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.holidays-workflow-step strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.88rem;
}

.holidays-workflow-step span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.holidays-page .holidays-status {
    margin-bottom: 24px;
}

.holidays-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.holidays-add-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    position: sticky;
    top: 24px;
}

.holidays-add-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.holidays-add-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--primary);
}

.holidays-add-icon svg {
    width: 24px;
    height: 24px;
}

.holidays-add-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.holidays-add-head p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.holidays-add-form .form-group {
    margin-bottom: 16px;
}

.holidays-sidebar-divider {
    margin: 22px 0;
    border-top: 1px solid var(--border);
}

.holidays-upload-head {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.holidays-upload-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.holidays-upload-form .form-group {
    margin-bottom: 16px;
}

.holidays-format-guide {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.holidays-format-guide strong {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.holidays-format-guide p {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.holidays-tip {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
    border: 1px solid #c7d2fe;
}

.holidays-tip strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 6px;
}

.holidays-tip p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.holidays-panel {
    overflow: hidden;
}

.holidays-period-form {
    margin: 0;
}

.holidays-table .holidays-date-main {
    font-weight: 600;
    color: var(--text);
}

.holidays-day-name {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.holidays-row-today {
    background: #f5f3ff;
}

.holidays-today-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #ede9fe;
    color: var(--primary);
    vertical-align: middle;
}

.badge-holiday {
    background: #fef3c7;
    color: #b45309;
}

.badge-weekoff {
    background: #e0e7ff;
    color: #4338ca;
}

.holidays-table .td-actions {
    width: 96px;
}

.holidays-table .action-btns {
    justify-content: flex-end;
}

.holidays-table .action-delete-form {
    display: inline-flex;
    margin: 0;
}

.modal-holiday-edit {
    max-width: 480px;
}

.modal-holiday-edit .modal-body .form-group {
    margin-bottom: 16px;
}

.modal-holiday-edit .modal-body .form-group:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .holidays-workflow {
        grid-template-columns: 1fr;
    }

    .holidays-layout {
        grid-template-columns: 1fr;
    }

    .holidays-add-card {
        position: static;
    }
}

/* ========== WEEKOFF ROSTER ========== */
.weekoff-roster-page .weekoff-roster-status {
    margin-bottom: 24px;
}

.weekoff-roster-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.weekoff-roster-side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.weekoff-roster-side-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.weekoff-roster-side-card p {
    margin: 0 0 14px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.weekoff-roster-actions {
    margin-bottom: 10px;
}

.weekoff-roster-tip strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 8px;
}

.weekoff-roster-tip .inline-code {
    display: inline-flex;
    padding: 1px 6px;
    font-size: 0.65rem;
    vertical-align: middle;
}

.weekoff-roster-panel {
    overflow: hidden;
}

.weekoff-roster-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.weekoff-roster-panel-body {
    padding: 0;
}

.weekoff-roster-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.weekoff-roster-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
    min-width: 900px;
}

.weekoff-roster-grid th,
.weekoff-roster-grid td {
    border: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
    padding: 0;
}

.weekoff-roster-grid thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.wo-col-employee {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    min-width: 160px;
    text-align: left !important;
    padding: 8px 10px !important;
}

.wo-col-total {
    position: sticky;
    left: 160px;
    z-index: 3;
    background: #fff;
    width: 42px;
}

.wo-col-day {
    width: 28px;
    min-width: 28px;
}

.wo-col-sun {
    background: #fff7ed;
}

.wo-day-num {
    display: block;
    font-weight: 700;
    line-height: 1.2;
}

.wo-day-dow {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.wo-emp-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.wo-emp-link strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
}

.wo-emp-link span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.wo-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 0.7rem;
}

.wo-day-cell {
    background: #fff;
}

.wo-day-cell.wo-day-sun {
    background: #fffbeb;
}

.wo-day-toggle {
    width: 100%;
    height: 26px;
    border: none;
    background: transparent;
    color: transparent;
    font-size: 0.55rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.wo-day-cell.wo-day-on .wo-day-toggle {
    background: #e0e7ff;
    color: #3730a3;
}

.wo-day-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.weekoff-roster-form-foot {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.weekoff-roster-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .weekoff-roster-layout {
        grid-template-columns: 1fr;
    }
}

/* ========== EMPLOYEE PORTAL ========== */
.page-emp-auth .login-brand-emp {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.login-card-emp {
    border-top: 3px solid #6366f1;
}

.page-emp-portal {
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.emp-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.emp-topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.emp-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    justify-self: start;
}

.emp-topbar-brand:hover strong {
    color: var(--primary);
}

.emp-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.22);
    user-select: none;
}

.emp-topbar-brand-text {
    min-width: 0;
}

.emp-topbar-brand strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.25;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-topbar-brand span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-topbar-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    justify-self: center;
}

.emp-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.emp-topbar-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.emp-topbar-link.active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.emp-topbar-link:not(.active):hover {
    color: var(--primary);
    background: #ede9fe;
}

.emp-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.emp-topbar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    min-width: 0;
}

.emp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.emp-topbar-user-text {
    min-width: 0;
}

.emp-topbar-user-text strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.emp-topbar-user-text span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.emp-topbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.emp-topbar-logout svg {
    width: 16px;
    height: 16px;
}

.emp-topbar-logout:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.emp-content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 32px;
}

.emp-site-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 24px;
}

.emp-site-footer-inner {
    max-width: 1440px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.emp-site-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.emp-site-footer-brand-text {
    min-width: 0;
}

.emp-site-footer-brand strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
}

.emp-site-footer-brand span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.emp-site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.emp-site-footer-nav a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.emp-site-footer-nav a:hover,
.emp-site-footer-nav a.active {
    color: var(--primary);
}

.emp-site-footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.emp-site-footer-bottom a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.emp-site-footer-bottom a:hover {
    text-decoration: underline;
}

.emp-login-site-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

.emp-login-site-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.emp-login-site-footer a:hover {
    text-decoration: underline;
}

/* ---- Dashboard banner ---- */
.emp-dash-banner {
    margin-bottom: 20px;
    padding: 0;
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 38%, #6366f1 62%, #0ea5e9 100%);
    color: #fff;
    box-shadow: 0 16px 48px rgba(49, 46, 129, 0.28);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.emp-dash-banner-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.emp-dash-banner-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.emp-dash-banner-orb-1 {
    width: 320px;
    height: 320px;
    top: -120px;
    right: -60px;
}

.emp-dash-banner-orb-2 {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: 28%;
    background: rgba(14, 165, 233, 0.18);
}

.emp-dash-banner-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    padding: 28px 32px;
    align-items: stretch;
}

.emp-dash-banner-main {
    min-width: 0;
}

.emp-dash-banner-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.emp-dash-banner .emp-dash-avatar {
    background: rgba(255, 255, 255, 0.14) !important;
    border: 2px solid rgba(255, 255, 255, 0.38) !important;
    color: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.emp-page-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%) !important;
    border: 2px solid rgba(99, 102, 241, 0.15) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    font-weight: 800;
}

.emp-dash-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.78);
}

.emp-dash-banner-text h1 {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.emp-dash-id {
    font-size: 0.84rem;
    opacity: 0.9;
    margin-bottom: 14px;
    font-weight: 600;
}

.emp-dash-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-dash-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.emp-dash-tag-branch {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.45);
}

.emp-dash-banner-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
}

.emp-dash-banner-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.emp-dash-today-pill,
.emp-dash-period-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.emp-dash-period-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.emp-dash-today-pill svg,
.emp-dash-period-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.9;
}

.emp-dash-banner-stats {
    /* display: grid; */
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.emp-dash-banner-stat {
    text-align: center;
    padding: 4px 6px;
}

.emp-dash-banner-stat span {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 4px;
}

.emp-dash-banner-stat strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
}

.emp-dash-banner-stat strong small {
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.82;
}

.emp-dash-pending-note {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.92;
}

.emp-dash-pending-note span {
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.25);
    border: 1px solid rgba(245, 158, 11, 0.45);
}

/* ---- Stat cards ---- */
.emp-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.emp-dash-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.emp-dash-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.emp-dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-dash-stat-icon svg {
    width: 22px;
    height: 22px;
}

.emp-dash-stat-paid .emp-dash-stat-icon {
    background: #ede9fe;
    color: #5b21b6;
}

.emp-dash-stat-present .emp-dash-stat-icon {
    background: #d1fae5;
    color: #047857;
}

.emp-dash-stat-absent .emp-dash-stat-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.emp-dash-stat-quota .emp-dash-stat-icon {
    background: #e0f2fe;
    color: #0369a1;
}

.emp-dash-stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.emp-dash-stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.emp-dash-stat-value small {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.emp-dash-stat-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Jump nav ---- */
.emp-dash-jump {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.emp-dash-jump-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: #334155;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.emp-dash-jump-link svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.emp-dash-jump-link:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
    color: var(--primary);
}

/* ---- Sections ---- */
.emp-section {
    margin-bottom: 28px;
}

.emp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.emp-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.emp-section-title h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 2px;
    letter-spacing: -0.01em;
}

.emp-section-title p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.emp-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-section-icon svg {
    width: 24px;
    height: 24px;
}

.emp-section-icon-cal {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
}

.emp-section-icon-user {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.emp-period-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.emp-period-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    color: #334155;
    font-weight: 700;
    transition: background 0.15s;
}

.emp-period-nav-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.emp-period-nav-label {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0 8px;
    min-width: 120px;
    text-align: center;
}

.emp-section-grid {
    display: grid;
    gap: 20px;
    align-items: start;
}

.emp-section-grid-att {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 420px);
}

.emp-section-grid-profile {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
}

.emp-section-grid-leave {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.emp-leave-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.emp-leave-table-card {
    padding: 0 0 16px;
}

.emp-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.emp-leave-empty {
    padding: 20px 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.emp-leave-note-row td {
    padding-top: 0 !important;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.emp-att-month-table-wrap {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
}

.emp-att-month-table-wrap h4 {
    margin: 16px 0 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.emp-att-legend-chips-inline {
    margin-left: auto;
}

.emp-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.emp-card-calendar {
    padding: 0;
}

.emp-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.emp-att-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.emp-att-legend-heading {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.emp-att-legend-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

/* Month summary — desktop: flat row; mobile: 3+2 grid rows */
.emp-att-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.emp-att-summary-row {
    display: contents;
}

.emp-att-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    min-width: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (min-width: 641px) {
    .emp-att-legend-chip {
        min-width: 108px;
    }
}

.emp-att-legend-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.emp-att-legend-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.emp-att-legend-count {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.emp-att-legend-name {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.85;
    line-height: 1.2;
}

.emp-att-legend-chip-p {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.emp-att-legend-chip-p .emp-att-legend-code {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.emp-att-legend-chip-a {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.emp-att-legend-chip-a .emp-att-legend-code {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.emp-att-legend-chip-hd {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.emp-att-legend-chip-hd .emp-att-legend-code {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.emp-att-legend-chip-wo {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.emp-att-legend-chip-wo .emp-att-legend-code {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #a5b4fc;
}

.emp-att-legend-chip-l {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.emp-att-legend-chip-l .emp-att-legend-code {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.emp-att-legend-chip-hd .emp-att-legend-code,
.emp-att-legend-chip-wo .emp-att-legend-code {
    min-width: 36px;
    width: auto;
    padding: 0 5px;
    font-size: 0.65rem;
}

.emp-cal-wrap {
    padding: 16px 20px 8px;
}

.emp-cal-legend-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

.emp-cal-legend-key {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.emp-cal-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.emp-cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.emp-cal-legend-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 20px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.emp-cal-legend-p {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.emp-cal-legend-a {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.emp-cal-legend-hd {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.emp-cal-legend-wo {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.emp-cal-legend-l {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fdba74;
}

/* ---- Request panels (attendance + profile) ---- */
.emp-request-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: sticky;
    top: 88px;
    align-self: start;
}

.emp-request-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.emp-request-panel-att .emp-request-panel-header {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-bottom-color: #ddd6fe;
}

.emp-request-panel-profile .emp-request-panel-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom-color: #bae6fd;
}

.emp-request-panel-security .emp-request-panel-header {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-bottom-color: #fcd34d;
}

.emp-request-panel-security .emp-request-panel-icon {
    color: #b45309;
}

.modal-head-password {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
}

.modal-password {
    max-width: 480px;
}

.modal-password .modal-body .form-group {
    margin-bottom: 16px;
}

.modal-password .modal-body .form-group:last-child {
    margin-bottom: 0;
}

.emp-request-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.emp-request-panel-att .emp-request-panel-icon {
    color: #5b21b6;
}

.emp-request-panel-profile .emp-request-panel-icon {
    color: #0369a1;
}

.emp-request-panel-icon svg {
    width: 22px;
    height: 22px;
}

.emp-request-panel-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.emp-request-panel-header p {
    margin: 0;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.55;
}

.emp-request-panel-header p strong {
    color: #0f172a;
}

.emp-request-panel-body {
    padding: 20px 22px 22px;
}

.emp-request-form .form-group {
    margin-bottom: 14px;
}

.emp-request-form .form-group:last-child {
    margin-bottom: 0;
}

.emp-request-fields .form-group label {
    font-size: 0.8125rem;
    margin-bottom: 6px;
}

.emp-request-form .form-group input,
.emp-request-form .form-group select,
.emp-request-form .form-group textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.emp-request-form .form-group textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.5;
}

.emp-request-form .form-group input:focus,
.emp-request-form .form-group select:focus,
.emp-request-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.emp-request-form .form-group input:disabled,
.emp-request-form .form-group select:disabled,
.emp-request-form .form-group textarea:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.emp-request-form .form-hint {
    margin-top: 5px;
    font-size: 0.72rem;
}

.emp-request-fieldset {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--border);
}

.emp-request-fieldset:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 14px;
}

.emp-request-fieldset-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.emp-request-submit {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.emp-request-submit .btn {
    padding: 13px 20px;
    font-size: 0.9rem;
}

.emp-request-submit .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.emp-request-footnote {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.45;
}

.emp-request-form.is-disabled .emp-request-fields {
    opacity: 0.72;
}

.emp-quota-meter {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
}

.emp-quota-meter-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 8px;
}

.emp-quota-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(3, 105, 161, 0.15);
    overflow: hidden;
}

.emp-quota-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    transition: width 0.3s ease;
}

.emp-quota-fill.is-full {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.emp-quota-hint {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #0369a1;
}

.emp-inline-alert {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.8125rem;
}

.emp-inline-alert strong {
    font-size: 0.8rem;
}

.emp-inline-alert span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.emp-inline-alert-warn {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.emp-inline-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.emp-info-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.emp-info-card {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.emp-info-card-wide {
    grid-column: 1 / -1;
}

.emp-info-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.emp-info-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.emp-info-card small {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.emp-timeline {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.emp-timeline h4 {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.emp-timeline-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.emp-timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.emp-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.emp-timeline-pending { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.emp-timeline-approved { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.emp-timeline-rejected { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }

.emp-timeline-body {
    flex: 1;
    min-width: 0;
}

.emp-timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.emp-timeline-top strong {
    font-size: 0.875rem;
}

.emp-timeline-body p {
    margin: 0 0 4px;
    font-size: 0.8125rem;
    color: #475569;
}

.emp-timeline-body time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.emp-timeline-note {
    margin-top: 6px !important;
    font-style: italic;
    color: var(--text-muted) !important;
}

/* ---- Standalone pages (attendance, details, dashboard) ---- */
.emp-page {
    animation: empPageIn 0.25s ease;
}

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

.emp-page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.emp-page-hero-profile {
    background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 45%, #fff 100%);
    border-color: #c7d2fe;
}

.emp-page-hero-text {
    min-width: 0;
}

.emp-page-eyebrow {
    margin-bottom: 10px;
}

.emp-page-hero-main h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

.emp-page-hero-main p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 560px;
}

.emp-page-hero-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.emp-page-hero-user .emp-page-avatar {
    flex-shrink: 0;
}

.emp-page-hero-sub {
    font-size: 0.875rem !important;
    color: #475569 !important;
    font-weight: 600;
}

.emp-page-stats {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.emp-page-stats-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.emp-page-lock-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.emp-details-board {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.emp-details-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
    padding-left: 2px;
}

.emp-info-board-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Dashboard quick cards */
.emp-dash-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.emp-dash-alert {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s;
}

.emp-dash-alert:hover {
    transform: translateY(-1px);
}

.emp-dash-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.emp-dash-alert-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

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

.emp-quick-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 26px 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

button.emp-quick-card {
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

.emp-quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.emp-quick-card-att:hover {
    border-color: #c7d2fe;
}

.emp-quick-card-profile:hover {
    border-color: #bae6fd;
}

.emp-quick-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-quick-card-icon svg {
    width: 26px;
    height: 26px;
}

.emp-quick-card-att .emp-quick-card-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
}

.emp-quick-card-leave .emp-quick-card-icon {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #9d174d;
}

.emp-quick-card-leave:hover {
    border-color: #f9a8d4;
}

.emp-quick-card-slip .emp-quick-card-icon {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #047857;
}

.emp-quick-card-slip:hover {
    border-color: #6ee7b7;
}

.emp-quick-card-profile .emp-quick-card-icon {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.emp-quick-card-security .emp-quick-card-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.emp-quick-card-security:hover {
    border-color: #fcd34d;
}

.emp-quick-card h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
}

.emp-quick-card p {
    margin: 0 0 14px;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.emp-quick-card-cta {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

.emp-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.emp-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.emp-badge.ok {
    background: #d1fae5;
    color: #065f46;
}

.emp-page-hero-slips {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.emp-slips-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.emp-slips-hero-stat {
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.emp-slips-hero-stat span {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.emp-slips-hero-stat strong {
    display: block;
    font-size: 1.125rem;
    color: #0f172a;
}

.emp-slips-hero-stat small {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.emp-slips-hero-stat-highlight {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
}

.emp-slips-hero-stat-highlight strong {
    color: #047857;
}

.emp-slips-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.emp-slips-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #b45309;
    margin-top: 2px;
}

.emp-slips-notice strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.875rem;
    color: #92400e;
}

.emp-slips-notice p {
    margin: 0;
    font-size: 0.8125rem;
    color: #a16207;
    line-height: 1.45;
}

.emp-slips-card {
    padding: 0;
    overflow: hidden;
}

.emp-slips-card .emp-card-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.emp-slips-empty {
    text-align: center;
    padding: 40px 24px;
}

.emp-slips-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: #f1f5f9;
    color: #64748b;
}

.emp-slips-empty-icon svg {
    width: 28px;
    height: 28px;
}

.emp-slips-empty p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.emp-slips-empty p strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9375rem;
    color: #0f172a;
}

.emp-slip-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.emp-slip-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

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

.emp-slip-item:hover {
    background: #f8fafc;
}

.emp-slip-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #047857;
    flex-shrink: 0;
}

.emp-slip-item-icon svg {
    width: 20px;
    height: 20px;
}

.emp-slip-item-main {
    min-width: 0;
}

.emp-slip-period {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.emp-slip-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.emp-slip-item-pay {
    text-align: right;
    flex-shrink: 0;
}

.emp-slip-pay-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.emp-slip-net {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #047857;
    white-space: nowrap;
}

.emp-slip-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.emp-slip-download svg {
    width: 16px;
    height: 16px;
}

.emp-slip-download:hover {
    background: #047857;
    color: #fff;
    transform: translateY(-1px);
}

.emp-request-history {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.emp-request-history h4 {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.emp-request-history ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.emp-request-history li {
    font-size: 0.8125rem;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.emp-req-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 6px;
}

.emp-req-pending { background: #fef3c7; color: #92400e; }
.emp-req-approved { background: #d1fae5; color: #065f46; }
.emp-req-rejected { background: #fee2e2; color: #991b1b; }

.emp-req-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.emp-req-table th,
.emp-req-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

/* ========== ADMIN APPROVALS ========== */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 700;
    vertical-align: middle;
}

.approvals-branch-alert {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.approvals-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.approvals-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.approvals-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.approvals-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.approvals-stat-icon svg {
    width: 22px;
    height: 22px;
}

.approvals-stat-warn .approvals-stat-icon {
    background: #fef3c7;
    color: #b45309;
}

.approvals-stat-ok .approvals-stat-icon {
    background: var(--success-bg);
    color: var(--success-text);
}

.approvals-stat-profile .approvals-stat-icon {
    background: #ede9fe;
    color: var(--primary-dark);
}

.approvals-stat-leave .approvals-stat-icon {
    background: #fce7f3;
    color: #9d174d;
}

.approvals-stat-attendance .approvals-stat-icon {
    background: #e0f2fe;
    color: #0369a1;
}

.approvals-panel-leave-full {
    margin-top: 24px;
}

.approvals-panel-icon-leave {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #9d174d;
}

.approval-card-leave {
    border-left: 4px solid #ec4899;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.08);
}

.approval-card-top-leave {
    background: linear-gradient(135deg, #fff5f9 0%, #fff 55%);
    border-bottom-color: #fce7f3;
    flex-wrap: wrap;
    gap: 14px;
}

.approval-card-avatar-leave {
    background: linear-gradient(135deg, #f472b6, #ec4899) !important;
}

.approval-leave-head-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.approval-leave-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fce7f3;
    border: 1px solid #f9a8d4;
    color: #9d174d;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.approval-leave-duration-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fbcfe8;
    color: #be185d;
    font-size: 0.78rem;
    font-weight: 700;
}

.approval-leave-body {
    padding: 18px 16px;
    background: linear-gradient(180deg, #fffbfd 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
}

.approval-leave-timeline {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.approval-leave-date-card {
    flex: 1 1 140px;
    max-width: 200px;
    text-align: center;
    padding: 14px 12px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid #fbcfe8;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.08);
}

.approval-leave-date-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #db2777;
    margin-bottom: 6px;
}

.approval-leave-date-day {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: #831843;
    margin-bottom: 4px;
}

.approval-leave-date-month {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #9d174d;
}

.approval-leave-date-weekday {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.approval-leave-timeline-mid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    position: relative;
    min-height: 80px;
}

.approval-leave-timeline-line {
    position: absolute;
    left: 50%;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: linear-gradient(180deg, #fbcfe8, #f472b6);
    transform: translateX(-50%);
}

.approval-leave-timeline-arrow {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fce7f3;
    border: 1px solid #f9a8d4;
    color: #db2777;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.approval-leave-timeline-arrow svg {
    width: 18px;
    height: 18px;
}

.approval-leave-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.approval-leave-meta-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
}

.approval-leave-meta-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.approval-leave-meta-item time {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.approval-leave-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.approval-leave-type-pill em {
    font-style: normal;
    font-weight: 600;
    opacity: 0.85;
}

.approval-leave-dates-strip {
    padding-top: 4px;
}

.approval-leave-date-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.approval-leave-date-chip {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fbcfe8;
    color: #9d174d;
}

.approval-employee-note-leave {
    background: #fff5f9;
    border-color: #fbcfe8;
    margin: 0 16px;
}

.approval-employee-note-leave strong {
    color: #be185d;
}

.approval-employee-note-leave p {
    color: #831843;
}

.approvals-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.approvals-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 4px;
}

.approvals-stat-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.approvals-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.approvals-panel .panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.approvals-panel-head {
    width: 100%;
    align-items: flex-start !important;
}

.approvals-panel-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.approvals-panel-icon svg {
    width: 20px;
    height: 20px;
}

.approvals-panel-icon-profile {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: var(--primary-dark);
}

.approvals-panel-icon-attendance {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.approvals-panel-desc {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.approvals-panel-body {
    padding: 16px !important;
}

.approvals-empty {
    padding: 40px 24px !important;
}

.approvals-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.approval-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.approval-card-profile {
    border-left: 4px solid var(--primary);
}

.approval-card-attendance {
    border-left: 4px solid #0ea5e9;
}

.approval-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.approval-card-employee {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.approval-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.approval-card-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}

.approval-card-name:hover {
    color: var(--primary);
}

.approval-card-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.approval-card-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.approval-diff-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
}

.approval-diff-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.approval-diff-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.approval-diff-values {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.approval-diff-old {
    color: var(--text-muted);
    text-decoration: line-through;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    word-break: break-word;
}

.approval-diff-arrow {
    color: var(--primary);
    font-weight: 700;
}

.approval-diff-new {
    color: var(--text);
    font-weight: 700;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    border-radius: 6px;
    padding: 4px 8px;
    word-break: break-word;
}

.approval-att-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.approval-att-date-label,
.approval-att-status-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.approval-att-date strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
}

.approval-att-status-wrap {
    text-align: right;
}

.approval-att-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.approval-att-status.att-code-p {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.approval-att-status.att-code-a {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.approval-att-status.att-code-hd {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.approval-att-status.att-code-wo {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.approval-att-status.att-code-unknown {
    background: #f1f5f9;
    color: #64748b;
}

.approval-att-status em {
    font-style: normal;
    font-weight: 600;
    opacity: 0.85;
}

.approval-employee-note {
    margin: 0 16px;
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.approval-employee-note strong {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #92400e;
    margin-bottom: 4px;
}

.approval-employee-note p {
    margin: 0;
    color: #78350f;
    line-height: 1.45;
}

.approval-card-footer {
    padding: 12px 16px 16px;
    margin-top: 12px;
}

.approval-card:has(.approval-employee-note) .approval-card-footer {
    margin-top: 10px;
}

.approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.approval-note-field {
    flex: 1;
    min-width: 200px;
}

.approval-note-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.approval-note-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.approval-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

@media (max-width: 1024px) {
    .emp-dash-stats,
    .emp-page-stats-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-section-grid-att,
    .emp-section-grid-profile,
    .emp-section-grid-leave,
    .emp-quick-cards,
    .approvals-layout,
    .approvals-stats {
        grid-template-columns: 1fr;
    }

    .approval-att-box {
        grid-template-columns: 1fr;
    }

    .approval-leave-meta-row {
        grid-template-columns: 1fr;
    }

    .approval-leave-timeline {
        flex-direction: column;
        align-items: stretch;
    }

    .approval-leave-date-card {
        max-width: none;
    }

    .approval-leave-timeline-mid {
        min-height: auto;
        flex: none;
        padding: 4px 0;
    }

    .approval-leave-timeline-line {
        display: none;
    }

    .approval-leave-timeline-arrow {
        transform: rotate(90deg);
    }

    .approval-leave-head-badges {
        width: 100%;
        margin-left: 0;
    }

    .approval-att-status-wrap {
        text-align: left;
    }

    .approval-action-buttons {
        width: 100%;
        margin-left: 0;
    }

    .emp-request-panel {
        position: static;
    }

    .emp-dash-banner-grid {
        grid-template-columns: 1fr;
    }

    .emp-dash-banner-aside,
    .emp-dash-banner-meta {
        align-items: flex-start;
        width: 100%;
    }

    .emp-page-hero-user {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .emp-topbar-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 10px 16px;
    }

    .emp-topbar-brand {
        grid-column: 1;
        grid-row: 1;
    }

    .emp-topbar-user {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        gap: 8px;
    }

    .emp-topbar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        display: flex;
        justify-self: stretch;
        border-radius: var(--radius-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .emp-topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .emp-topbar-link {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
        padding: 10px 8px;
    }

    .emp-topbar-link span {
        font-size: 0.72rem;
    }

    .emp-topbar-user-text strong {
        max-width: 96px;
    }

    .emp-site-footer {
        padding: 20px 16px 24px;
    }

    .emp-site-footer-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 14px;
    }

    .emp-site-footer-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .emp-site-footer-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        text-align: center;
    }

    .emp-site-footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .emp-slip-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
    }

    .emp-slip-item-pay {
        grid-column: 2;
        text-align: left;
    }

    .emp-slip-download {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .emp-slips-hero-stats {
        width: 100%;
    }

    .emp-page-attendance .emp-page-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .emp-page-attendance .emp-period-nav {
        width: 100%;
        justify-content: center;
    }

    .emp-page-attendance .emp-card-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .emp-page-attendance .emp-att-legend {
        width: 100%;
        min-width: 0;
    }

    .emp-page-attendance .emp-att-summary-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .emp-page-attendance .emp-att-summary-row {
        display: grid;
        gap: 8px;
        width: 100%;
    }

    .emp-page-attendance .emp-att-summary-row:first-child {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .emp-page-attendance .emp-att-summary-row:last-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-chip {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        min-width: 0;
        min-height: 74px;
        padding: 10px 6px 9px;
        gap: 5px;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-meta {
        align-items: center;
        gap: 0;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-code {
        min-width: 30px;
        width: auto;
        height: 30px;
        padding: 0 6px;
        font-size: 0.62rem;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-count {
        font-size: 1.125rem;
        line-height: 1;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-name {
        font-size: 0.58rem;
        line-height: 1.15;
        white-space: normal;
        max-width: 100%;
    }

    .emp-page-attendance .emp-page-lock-badge {
        align-self: flex-start;
    }

    .emp-page-attendance .emp-card-calendar {
        overflow: visible;
    }

    .emp-page-attendance .emp-cal-wrap {
        padding: 12px 10px 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .emp-page-attendance .att-calendar-compact {
        min-width: 280px;
    }

    .emp-page-attendance .att-cal-cell,
    .emp-page-attendance .att-cal-cell-empty {
        height: 40px;
    }

    .emp-page-attendance .att-cal-code {
        width: auto;
        min-width: 16px;
        max-width: calc(100% - 2px);
        padding: 0 2px;
        font-size: 0.52rem;
    }

    .emp-page-attendance .att-cal-day-num {
        font-size: 0.54rem;
    }

    .emp-page-attendance .emp-cal-legend-foot {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px 16px;
        gap: 8px;
    }

    .emp-page-attendance .emp-cal-legend-items {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 10px;
    }

    .emp-page-attendance .emp-att-month-table-wrap {
        padding: 0 12px 16px;
    }

    .emp-page-attendance .emp-att-month-table-wrap .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .emp-page-attendance .emp-att-month-table {
        min-width: 420px;
    }

    .emp-page-attendance .emp-request-panel-header,
    .emp-page-attendance .emp-request-panel-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 640px) {
    .emp-content {
        padding: 16px 16px 32px;
    }

    .emp-dash-banner-grid,
    .emp-page-hero {
        padding: 20px 18px;
    }

    .emp-dash-banner-profile {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .emp-dash-stats,
    .emp-page-stats-4 {
        grid-template-columns: 1fr;
    }

    .emp-info-board,
    .emp-info-board-contact {
        grid-template-columns: 1fr;
    }

    .emp-page-attendance .emp-page-hero-main h1 {
        font-size: 1.25rem;
    }

    .emp-page-attendance .emp-page-hero-main p {
        font-size: 0.8125rem;
    }

    .emp-page-attendance .emp-dash-stat {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .emp-topbar-inner {
        padding: 10px 12px;
        gap: 8px 10px;
    }

    .emp-topbar-brand {
        gap: 10px;
    }

    .emp-topbar-brand span {
        display: none;
    }

    .emp-topbar-brand strong {
        font-size: 0.84rem;
        max-width: 120px;
    }

    .emp-brand-logo {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .emp-topbar-user-text {
        display: none;
    }

    .emp-topbar-user-card {
        padding: 0;
        border: none;
        background: transparent;
    }

    .emp-user-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .emp-topbar-logout {
        padding: 8px;
    }

    .emp-topbar-logout span {
        display: none;
    }

    .emp-topbar-link span {
        display: none;
    }

    .emp-topbar-link {
        padding: 10px 12px;
    }

    .emp-site-footer-brand {
        align-items: flex-start;
    }

    .emp-site-footer-brand strong {
        font-size: 0.88rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .emp-site-footer-brand span {
        font-size: 0.72rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .emp-page-attendance .emp-att-summary-row {
        gap: 6px;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-chip {
        min-height: 68px;
        padding: 8px 4px 7px;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-code {
        min-width: 28px;
        height: 28px;
        font-size: 0.58rem;
        padding: 0 5px;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-count {
        font-size: 1rem;
    }

    .emp-page-attendance .emp-att-summary-row .emp-att-legend-name {
        font-size: 0.54rem;
    }

    .emp-page-attendance .emp-cal-legend-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-page-attendance .att-cal-weekdays span {
        font-size: 0.58rem;
    }

    .emp-page-attendance .att-cal-cell,
    .emp-page-attendance .att-cal-cell-empty {
        height: 36px;
        border-radius: 5px;
    }

    .emp-page-attendance .att-cal-grid,
    .emp-page-attendance .att-cal-weekdays {
        gap: 2px;
    }

    .emp-page-attendance .emp-period-nav-label {
        min-width: 100px;
        font-size: 0.8125rem;
    }

    .emp-page-attendance .emp-request-panel-header h3 {
        font-size: 0.95rem;
    }

    .emp-page-attendance .emp-timeline-top {
        flex-wrap: wrap;
        gap: 6px;
    }
}
