@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;
    overflow: hidden;
}

.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;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.sidebar-menu li {
    margin-bottom: 4px;
    flex-shrink: 0;
}

.sidebar-nav-label {
    margin: 12px 8px 6px;
    padding: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.sidebar-nav-label:first-child {
    margin-top: 0;
}

.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);
    position: sticky;
    bottom: 0;
    background: var(--sidebar-bg);
    z-index: 1;
}

.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;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 140;
    border: none;
    padding: 0;
    cursor: pointer;
}

.admin-sidebar-backdrop[hidden] {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.admin-sidebar-toggle,
.admin-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.admin-sidebar-toggle svg,
.admin-sidebar-close svg {
    width: 20px;
    height: 20px;
}

.sidebar-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

/* ========== 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 .panel-title-group {
    flex: 1;
    min-width: 0;
}

.panel-header .panel-title-group > .panel-badge:first-of-type {
    margin-left: auto;
    flex-shrink: 0;
}

.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="time"],
.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[type="time"],
.form-input-time {
    width: 100%;
    max-width: 200px;
    min-height: 46px;
    padding: 11px 14px;
    line-height: 1.2;
    color-scheme: light;
    cursor: pointer;
}

.form-group input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    margin-left: 4px;
    padding: 2px;
    border-radius: 4px;
}

.form-group input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(79, 70, 229, 0.08);
}

.form-group input[type="time"]::-webkit-datetime-edit {
    padding: 0;
}

.form-group input[type="time"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.form-group input[type="time"]::-webkit-datetime-edit-hour-field,
.form-group input[type="time"]::-webkit-datetime-edit-minute-field,
.form-group input[type="time"]::-webkit-datetime-edit-ampm-field {
    padding: 2px 4px;
    border-radius: 4px;
}

.form-group input[type="time"]::-webkit-datetime-edit-hour-field:focus,
.form-group input[type="time"]::-webkit-datetime-edit-minute-field:focus,
.form-group input[type="time"]::-webkit-datetime-edit-ampm-field:focus {
    background: rgba(79, 70, 229, 0.12);
    color: var(--text);
    outline: none;
}

.form-group input[type="time"]::-moz-focus-inner {
    border: 0;
}

.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 .admin-add-form,
.settings-branches-panel .branch-add-form {
    margin-top: 8px;
}

.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;
}

/* ========== SETTINGS ADD PANELS (branch + admin) ========== */
.settings-add-panel {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.settings-add-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.settings-add-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.settings-add-panel-icon svg {
    width: 24px;
    height: 24px;
}

.settings-add-panel-icon-branch {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
}

.settings-add-panel-icon-admin {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.settings-add-panel-head-text h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.settings-add-panel-head-text p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 52ch;
}

.settings-add-panel-body {
    padding: 20px;
}

.settings-add-fields {
    display: grid;
    gap: 16px;
}

.settings-add-fields-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-add-fields-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-add-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.settings-add-field label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.settings-add-input,
.settings-add-field .password-field input,
.settings-add-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9375rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.settings-add-input:focus,
.settings-add-field .password-field input:focus,
.settings-add-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.settings-add-panel-branch .settings-add-input:focus,
.settings-add-panel-branch .settings-add-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.settings-add-field .password-field {
    width: 100%;
}

.settings-add-field-hint {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.settings-add-tips {
    list-style: none;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-add-tips li {
    position: relative;
    padding-left: 22px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
}

.settings-add-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.settings-add-panel-branch .settings-add-tips li::before {
    background: #38bdf8;
}

.settings-add-panel-admin .settings-add-tips li::before {
    background: #818cf8;
}

.settings-add-panel-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.settings-add-submit {
    min-width: 190px;
    justify-content: center;
}

.settings-add-panel-branch .settings-add-submit {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

.settings-add-panel-branch .settings-add-submit:hover {
    filter: brightness(1.05);
}

@media (max-width: 900px) {
    .settings-add-fields-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .settings-add-fields-2,
    .settings-add-fields-3 {
        grid-template-columns: 1fr;
    }

    .settings-add-panel-foot {
        flex-direction: column;
    }

    .settings-add-submit {
        width: 100%;
    }
}

/* ========== SETTINGS BRANCHES ========== */
.settings-tip-branches {
    margin-bottom: 0;
}

.settings-branches-panel {
    padding-top: 20px;
}

.branch-list-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.branch-list-section-head h4 {
    margin-bottom: 4px;
}

.branch-list-section-hint {
    margin: 0;
}

.branch-list-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, #dbeafe, #e0f2fe);
    color: #0369a1;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.branch-list-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);
}

.branch-list-empty svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.6;
}

.branch-list-empty p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 300px;
}

.branch-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.branch-card:hover {
    border-color: #bae6fd;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.08);
}

.branch-card.is-inactive {
    opacity: 0.72;
    background: #f8fafc;
}

.branch-card-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.branch-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.branch-card.is-inactive .branch-card-icon {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.branch-card-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.branch-card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.branch-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.branch-card-code {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.branch-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.branch-status-active {
    background: #dcfce7;
    color: #166534;
}

.branch-status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.branch-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.branch-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.branch-stat-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.branch-stat-chip.has-value {
    color: var(--text);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.branch-card-lock-hint {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #b45309;
    line-height: 1.4;
}

.branch-card-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.branch-card-removed-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
}

.branch-code-input {
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .branch-card {
        flex-direction: column;
        align-items: stretch;
    }

    .branch-card-actions {
        padding-top: 0;
        justify-content: flex-end;
    }
}

.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-face-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ev-face-status-yes {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ev-face-status-no {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ev-face-status-date {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.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-grid-single {
    grid-template-columns: 1fr;
}

.dashboard-grid-single .dashboard-aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.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;
}

/* ========== PUNCH LOGS ========== */
.punch-logs-page .page-header-main p strong {
    color: var(--text);
}

.punch-logs-status {
    margin-bottom: 24px;
}

.punch-logs-layout {
    display: block;
}

.punch-logs-panel {
    overflow: hidden;
}

.dashboard-panel-icon.punch {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.punch-logs-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.punch-logs-stat {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.punch-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;
}

.punch-logs-stat strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.punch-logs-stat.punch-in strong {
    color: #047857;
}

.punch-logs-stat.punch-out strong {
    color: #1d4ed8;
}

.punch-logs-stat.ok strong {
    color: #047857;
}

.punch-logs-stat.warn strong {
    color: #b45309;
}

.punch-logs-stat.early strong {
    color: #1d4ed8;
}

.punch-timing-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.punch-punctuality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.punch-punctuality-badge small {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.9;
}

.punch-punctuality-on-time {
    background: #ecfdf5;
    color: #047857;
}

.punch-punctuality-late {
    background: #fff7ed;
    color: #c2410c;
}

.punch-punctuality-early {
    background: #eff6ff;
    color: #1d4ed8;
}

.punch-punctuality-na {
    background: var(--bg);
    color: var(--text-muted);
}

.punch-logs-table-wrap {
    margin-top: 4px;
}

.punch-logs-table .punch-log-date {
    white-space: nowrap;
}

.punch-log-date-main {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.punch-log-date-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.punch-log-distance strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.punch-log-distance span {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.punch-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.punch-type-in {
    background: #ecfdf5;
    color: #047857;
}

.punch-type-out {
    background: #eff6ff;
    color: #1d4ed8;
}

.punch-geo-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.punch-geo-in {
    background: #ecfdf5;
    color: #047857;
}

.punch-geo-out {
    background: #fef2f2;
    color: #b91c1c;
}

.punch-geo-off {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.punch-log-row.is-rejected {
    background: #fffbfb;
}

.punch-log-row.is-rejected:hover {
    background: #fef2f2;
}

.punch-logs-footnote {
    margin: 14px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.punch-logs-empty {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.punch-logs-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.punch-logs-empty-icon svg {
    width: 28px;
    height: 28px;
}

.punch-logs-empty h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--text);
}

.punch-logs-empty p {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.punch-logs-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.punch-logs-filter-form {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    max-width: 100%;
}

.punch-logs-filter-form .form-group {
    min-width: 110px;
}

.punch-logs-filter-note {
    margin: 0 0 14px;
}

.dashboard-punch-today-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-punch-today-stat {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dashboard-punch-today-stat span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dashboard-punch-today-stat strong {
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.dashboard-punch-today-stat strong.is-warn {
    color: #b45309;
}

.dashboard-punch-today-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========== 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: 900px) {
    body.page-panel {
        overflow-x: hidden;
    }

    .admin-sidebar-backdrop:not([hidden]) {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    body.admin-sidebar-open .admin-sidebar-backdrop:not([hidden]) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar {
        width: min(280px, 88vw);
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.25);
        z-index: 150;
    }

    body.admin-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        min-width: 0;
    }

    .admin-sidebar-toggle {
        display: inline-flex;
    }

    .admin-sidebar-close {
        display: inline-flex;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

    .topbar {
        height: auto;
        min-height: 56px;
        padding: 10px 14px;
        gap: 10px;
    }

    .topbar-left {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }

    .topbar-title {
        display: none;
    }

    .branch-switcher {
        flex: 1;
        min-width: 0;
    }

    .branch-switcher select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .branch-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .content {
        padding: 16px;
    }

    .dashboard-panel-head,
    .dashboard-panel-head-table {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .dashboard-panel-head-actions {
        width: 100%;
        margin-left: 0;
    }

    .dashboard-panel-period-filter {
        width: 100%;
        flex-wrap: wrap;
    }

    .ev-profile-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .ev-readiness {
        justify-content: flex-start;
    }

    .approval-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .approval-card-time {
        text-align: left;
    }

    .approval-doc-box,
    .approval-doc-preview {
        flex-direction: column;
        align-items: stretch;
    }

    .approval-doc-preview-btn {
        width: 100%;
        justify-content: center;
    }

    .approval-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .approval-actions {
        width: 100%;
    }

    .approval-note-field {
        width: 100%;
    }

    .approval-note-input {
        width: 100%;
    }

    .weekoff-roster-layout {
        grid-template-columns: 1fr;
    }

    .holidays-layout {
        grid-template-columns: 1fr;
    }

    .upload-lock-alert {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-header-split,
    .ev-panel-header-split {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

@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));
    }

    .punch-logs-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .punch-timing-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar-user .user-info {
        display: none;
    }

    .topbar {
        padding: 10px 12px;
    }

    .content {
        padding: 14px 12px;
    }

    .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 LOGIN ========== */
body.page-emp-auth {
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 42%, #312e81 100%);
}

.emp-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 32px;
}

.emp-login-shell {
    width: 100%;
    max-width: 440px;
}

.emp-login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.emp-login-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
    color: #fff;
}

.emp-login-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}

.emp-login-hero-text {
    min-width: 0;
    text-align: left;
}

.emp-login-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.88;
}

.emp-login-hero-text h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.emp-login-hero-text p {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.9;
    line-height: 1.4;
}

.emp-login-body {
    padding: 24px 28px 20px;
    text-align: left;
}

.emp-login-alert {
    margin-bottom: 16px;
    text-align: left;
}

.emp-login-id-group {
    margin-bottom: 16px;
}

.emp-login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 5px;
    margin-bottom: 16px;
    background: #f1f5f9;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.emp-login-body .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.emp-login-body .form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.emp-login-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.emp-login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.emp-login-body .emp-login-input-wrap input[type="text"],
.emp-login-body .emp-login-input-wrap input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 48px !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.emp-login-body .emp-login-input-wrap input[type="text"]:focus,
.emp-login-body .emp-login-input-wrap input[type="password"]:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.emp-login-body .emp-login-input-wrap input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.emp-login-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.emp-login-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.emp-login-tab.is-active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.emp-login-panels {
    position: relative;
}

.emp-login-panel {
    display: none;
}

.emp-login-panel.is-active {
    display: block;
}

.emp-login-form {
    margin: 0;
}

.emp-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    padding: 13px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.emp-login-submit svg {
    width: 18px;
    height: 18px;
}

.emp-login-submit:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.emp-login-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.emp-login-submit-face {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.emp-login-face-panel {
    margin: 0;
    padding: 0;
    border: none;
}

.emp-login-face-steps {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.emp-login-face-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.emp-login-face-step strong {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.65rem;
    background: #e2e8f0;
    color: #475569;
}

.emp-login-face-step.is-done {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.emp-login-face-step.is-done strong {
    background: #10b981;
    color: #fff;
}

.emp-login-camera {
    position: relative;
    max-height: none;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.emp-login-camera-ring {
    position: absolute;
    inset: 12%;
    border: 2px dashed rgba(99, 102, 241, 0.45);
    border-radius: 50%;
    pointer-events: none;
    animation: emp-login-ring-pulse 2.5s ease-in-out infinite;
}

@keyframes emp-login-ring-pulse {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.face-camera-placeholder {
    flex-direction: column;
    gap: 10px;
}

.face-camera-placeholder svg {
    width: 36px;
    height: 36px;
    opacity: 0.7;
}

.emp-login-face-status {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.84rem;
}

.emp-login-face-status.is-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.emp-login-face-actions {
    margin-top: 12px;
}

.emp-login-face-hint {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 0.78rem;
    color: #1e40af;
    line-height: 1.45;
    text-align: center;
}

.emp-login-card-footer {
    padding: 0 28px 24px;
    text-align: center;
}

.emp-login-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.emp-login-admin-link svg {
    width: 16px;
    height: 16px;
}

.emp-login-admin-link:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.emp-login-site-footer {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Legacy emp login classes (enroll page etc.) */
.page-emp-auth .login-brand-emp {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.login-card-emp {
    border-top: 3px solid #6366f1;
}

@media (max-width: 480px) {
    .emp-login-hero {
        padding: 22px 20px 20px;
    }

    .emp-login-body {
        padding: 20px 20px 16px;
    }

    .emp-login-card-footer {
        padding: 0 20px 20px;
    }

    .emp-login-tab span {
        display: none;
    }

    .emp-login-tab {
        padding: 12px 10px;
    }

    .emp-login-tab svg {
        width: 22px;
        height: 22px;
    }
}

/* ========== ADMIN LOGIN ========== */
body.page-admin-auth {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 38%, #312e81 100%);
}

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 32px;
}

.admin-login-shell {
    width: 100%;
    max-width: 440px;
}

.admin-login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.38);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-login-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 48%, #6366f1 100%);
    color: #fff;
}

.admin-login-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.admin-login-hero-text {
    min-width: 0;
    text-align: left;
}

.admin-login-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.88;
}

.admin-login-hero-text h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.admin-login-hero-text p {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.9;
    line-height: 1.4;
}

.admin-login-body {
    padding: 24px 28px 20px;
    text-align: left;
}

.admin-login-alert {
    margin-bottom: 16px;
}

.admin-login-session-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    line-height: 1.35;
}

.admin-login-session-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #6366f1;
}

.admin-login-body .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.admin-login-body .form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-login-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.admin-login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.admin-login-body .admin-login-input-wrap input[type="text"],
.admin-login-body .admin-login-input-wrap input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 48px !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-login-body .admin-login-input-wrap select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 36px 12px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.admin-login-body .admin-login-input-wrap input[type="text"]:focus,
.admin-login-body .admin-login-input-wrap input[type="password"]:focus,
.admin-login-body .admin-login-input-wrap select:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.admin-login-body .admin-login-input-wrap input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.admin-login-form {
    margin: 0;
}

.admin-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    padding: 13px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #312e81, #4f46e5);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.admin-login-submit svg {
    width: 18px;
    height: 18px;
}

.admin-login-submit:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.admin-login-card-footer {
    padding: 0 28px 24px;
}

.admin-login-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.admin-login-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    text-align: center;
    line-height: 1.25;
}

.admin-login-footer-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.admin-login-footer-link:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.admin-login-footer-link-accent {
    color: #0369a1;
    background: #f0f9ff;
    border-color: #bae6fd;
}

.admin-login-footer-link-accent:hover {
    color: #0284c7;
    border-color: #7dd3fc;
    background: #e0f2fe;
}

.admin-login-site-footer {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 480px) {
    .admin-login-hero {
        padding: 22px 20px 20px;
    }

    .admin-login-body {
        padding: 20px 20px 16px;
    }

    .admin-login-card-footer {
        padding: 0 20px 20px;
    }

    .admin-login-footer-links {
        grid-template-columns: 1fr;
    }

    .admin-login-footer-link span {
        display: inline;
    }
}

.face-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--text-muted, #64748b);
    font-size: 0.82rem;
}

.face-login-divider::before,
.face-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #e2e8f0);
}

.face-login-toggle {
    margin-bottom: 4px;
}

.face-login-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border, #e2e8f0);
}

.face-login-hint {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.face-camera-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--border, #e2e8f0);
}

.face-camera-wrap-login {
    max-height: 220px;
}

.face-camera-video,
.face-camera-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.face-camera-overlay {
    pointer-events: none;
}

.face-camera-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.88rem;
    background: rgba(15, 23, 42, 0.72);
}

.face-status {
    margin: 12px 0 0;
    font-size: 0.86rem;
    color: var(--text-muted, #64748b);
    min-height: 1.2em;
}

.face-status.is-error {
    color: #dc2626;
}

.face-enroll-layout {
    max-width: 560px;
}

.face-enroll-panel {
    padding: 20px;
}

.face-enroll-status {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.face-enroll-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.face-enroll-status-dot.is-on {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.face-enroll-status-dot.is-off {
    background: #94a3b8;
}

.face-enroll-status p {
    margin: 4px 0 0;
    font-size: 0.86rem;
    color: var(--text-muted, #64748b);
}

.face-enroll-progress {
    margin-top: 12px;
}

.face-enroll-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.face-enroll-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    transition: width 0.25s ease;
}

.face-enroll-progress p {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
}

.face-enroll-actions,
.face-login-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.face-enroll-tips {
    margin: 16px 0 0;
    padding-left: 18px;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
}

.emp-face-setup-card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.emp-face-setup-head {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.emp-face-setup-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    flex-shrink: 0;
}

.emp-face-setup-icon svg {
    width: 22px;
    height: 22px;
}

.emp-face-setup-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.emp-face-setup-head p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted, #64748b);
}

.btn-danger-outline {
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-danger-outline:hover {
    background: #fef2f2;
}

.page-emp-portal {
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
}

.emp-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 140;
    border: none;
    padding: 0;
    cursor: pointer;
}

.emp-sidebar-backdrop[hidden] {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.emp-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 150;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.emp-sidebar-header {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emp-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.emp-sidebar-brand strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sidebar-brand span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.emp-sidebar-user {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
}

.emp-sidebar-user-text {
    min-width: 0;
}

.emp-sidebar-user-text strong {
    display: block;
    color: #fff;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sidebar-user-text span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.52);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.emp-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 14px 12px 18px;
    display: flex;
    flex-direction: column;
}

.emp-sidebar-menu li {
    margin-bottom: 4px;
}

.emp-sidebar-label {
    margin: 12px 10px 6px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.emp-sidebar-label:first-child {
    margin-top: 0;
}

.emp-sidebar-menu a,
.emp-sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.emp-sidebar-menu a:hover,
.emp-sidebar-logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.emp-sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.32));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.emp-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.92;
}

.emp-sidebar-logout {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.emp-sidebar-footer {
    flex-shrink: 0;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.35);
}

.emp-sidebar-footer .emp-sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.emp-sidebar-footer .emp-sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fff;
}

.emp-sidebar-logout-form {
    margin: 0;
}

.emp-main {
    flex: 1;
    min-width: 0;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.emp-main-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
}

.emp-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

.emp-sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.emp-main-topbar-title {
    flex: 1;
    min-width: 0;
}

.emp-main-eyebrow {
    margin: 0 0 2px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.emp-main-topbar-title h1 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    color: #0f172a;
}

.emp-main-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.emp-user-avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.emp-main-topbar-user-text {
    min-width: 0;
}

.emp-main-topbar-user-text strong {
    display: block;
    font-size: 0.84rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-main-topbar-user-text span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.emp-main-topbar-logout-form {
    display: none;
    margin: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.emp-main-topbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.emp-main-topbar-logout svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.emp-main-topbar-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Legacy topbar — kept for reference, no longer used in employee portal */
.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: 1280px;
    margin: 0 auto;
    padding: 24px 24px 28px;
}

.emp-site-footer-compact {
    margin-top: auto;
    background: transparent;
    border-top: none;
    padding: 0 24px 20px;
}

.emp-site-footer-compact .emp-site-footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.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-record {
    margin-top: 4px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.emp-att-record-hero {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.emp-att-record-hero::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -80px;
    right: -40px;
    pointer-events: none;
}

.emp-att-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.emp-att-record-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.emp-att-record-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
}

.emp-att-record-icon svg {
    width: 21px;
    height: 21px;
}

.emp-att-record-title h4 {
    margin: 0 0 4px;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.emp-att-record-title p {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.emp-att-record-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #4338ca;
    background: #fff;
    border: 0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 1;
}

.emp-att-record-link svg {
    width: 15px;
    height: 15px;
    color: #6366f1;
}

.emp-att-record-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.emp-att-record-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.emp-att-record-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

.emp-att-record-pill strong {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
}

.emp-att-record-pill-p strong { color: #a7f3d0; }
.emp-att-record-pill-a strong { color: #fecaca; }
.emp-att-record-pill-hd strong { color: #fde68a; }
.emp-att-record-pill-wo strong { color: #c7d2fe; }
.emp-att-record-pill-l strong { color: #fed7aa; }

.emp-att-record-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px 20px 22px;
}

.emp-att-record-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.emp-att-record-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 18px;
    min-height: 100%;
}

.emp-att-record-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
    z-index: 1;
}

.emp-att-record-dot svg {
    width: 16px;
    height: 16px;
}

.emp-att-record-item--p .emp-att-record-dot {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.emp-att-record-item--a .emp-att-record-dot {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

.emp-att-record-item--hd .emp-att-record-dot {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
}

.emp-att-record-item--wo .emp-att-record-dot {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
}

.emp-att-record-item--l .emp-att-record-dot {
    background: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}

.emp-att-record-item--today .emp-att-record-dot {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.emp-att-record-line {
    flex: 1;
    width: 2px;
    min-height: 12px;
    margin: 6px 0;
    background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 100%);
    border-radius: 999px;
}

.emp-att-record-card {
    position: relative;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.emp-att-record-item:hover .emp-att-record-card {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.emp-att-record-item--last .emp-att-record-card {
    margin-bottom: 0;
}

.emp-att-record-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #94a3b8;
}

.emp-att-record-item--p .emp-att-record-card-accent {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.emp-att-record-item--a .emp-att-record-card-accent {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.emp-att-record-item--hd .emp-att-record-card-accent {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.emp-att-record-item--wo .emp-att-record-card-accent {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.emp-att-record-item--l .emp-att-record-card-accent {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.emp-att-record-item--today .emp-att-record-card {
    border-color: #c7d2fe;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.emp-att-record-card-inner {
    padding: 14px 16px 15px;
}

.emp-att-record-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.emp-att-record-card-date time {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.emp-att-record-card-day {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.emp-att-record-card-full {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.emp-att-record-today-pill {
    display: inline-flex;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.emp-att-record-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.82rem !important;
    font-weight: 800;
    flex-shrink: 0;
}

.emp-att-record-card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.emp-att-record-card-status {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.emp-att-record-leave-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    line-height: 1.2;
}

.emp-att-record-leave-chip svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #94a3b8;
}

.emp-att-record-card-note {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    font-style: italic;
}

.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,
.emp-page-hero-main .emp-page-hero-title {
    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.75rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 560px;
    margin-bottom: 10px;
}

.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(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.emp-quick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100%;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button.emp-quick-card {
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

.emp-quick-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--emp-quick-accent-a, #6366f1), var(--emp-quick-accent-b, #0ea5e9));
    opacity: 0.95;
}

.emp-quick-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 22px 0;
}

.emp-quick-card-top-end {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.emp-quick-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.emp-quick-card-icon svg {
    width: 24px;
    height: 24px;
}

.emp-quick-card-go {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.04);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.emp-quick-card-go svg {
    width: 16px;
    height: 16px;
}

.emp-quick-card-top > .emp-quick-card-go {
    margin-left: auto;
}

.emp-quick-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.emp-quick-card-body {
    flex: 1;
    padding: 16px 22px 0;
    min-width: 0;
}

.emp-quick-card h2 {
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.emp-quick-card p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: none;
}

.emp-quick-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 16px 22px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--emp-quick-cta, var(--primary));
    letter-spacing: 0.01em;
}

.emp-quick-card-cta::after {
    content: '→';
    transition: transform 0.2s ease;
}

.emp-quick-card:hover,
.emp-quick-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    border-color: rgba(99, 102, 241, 0.28);
    outline: none;
}

.emp-quick-card:hover .emp-quick-card-go,
.emp-quick-card:focus-visible .emp-quick-card-go {
    transform: translateX(2px);
    background: var(--emp-quick-cta, var(--primary));
    color: #fff;
    border-color: transparent;
}

.emp-quick-card:hover .emp-quick-card-cta::after,
.emp-quick-card:focus-visible .emp-quick-card-cta::after {
    transform: translateX(3px);
}

.emp-quick-card-att {
    --emp-quick-accent-a: #7c3aed;
    --emp-quick-accent-b: #6366f1;
    --emp-quick-cta: #5b21b6;
    background: linear-gradient(180deg, #faf5ff 0%, #fff 38%);
}

.emp-quick-card-att .emp-quick-card-icon {
    background: linear-gradient(145deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
}

.emp-quick-card-att:hover {
    border-color: rgba(124, 58, 237, 0.28);
}

.emp-quick-card-leave {
    --emp-quick-accent-a: #db2777;
    --emp-quick-accent-b: #ec4899;
    --emp-quick-cta: #9d174d;
    background: linear-gradient(180deg, #fdf2f8 0%, #fff 38%);
}

.emp-quick-card-leave .emp-quick-card-icon {
    background: linear-gradient(145deg, #fce7f3, #fbcfe8);
    color: #9d174d;
}

.emp-quick-card-leave:hover {
    border-color: rgba(219, 39, 119, 0.26);
}

.emp-quick-card-slip {
    --emp-quick-accent-a: #059669;
    --emp-quick-accent-b: #10b981;
    --emp-quick-cta: #047857;
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 38%);
}

.emp-quick-card-slip .emp-quick-card-icon {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.emp-quick-card-slip:hover {
    border-color: rgba(5, 150, 105, 0.26);
}

.emp-quick-card-profile {
    --emp-quick-accent-a: #0284c7;
    --emp-quick-accent-b: #0ea5e9;
    --emp-quick-cta: #0369a1;
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 38%);
}

.emp-quick-card-profile .emp-quick-card-icon {
    background: linear-gradient(145deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.emp-quick-card-profile:hover {
    border-color: rgba(2, 132, 199, 0.26);
}

.emp-quick-card-security {
    --emp-quick-accent-a: #d97706;
    --emp-quick-accent-b: #f59e0b;
    --emp-quick-cta: #b45309;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 38%);
}

.emp-quick-card-security .emp-quick-card-icon {
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    color: #b45309;
}

.emp-quick-card-security:hover {
    border-color: rgba(217, 119, 6, 0.26);
}

.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, .emp-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.emp-badge.rejected, .emp-badge.cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.emp-page-hero-slips {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.emp-slips-period-hint {
    pointer-events: none;
}

.emp-slips-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.emp-slips-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-width: 0;
}

.emp-slips-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-slips-stat-icon svg {
    width: 20px;
    height: 20px;
}

.emp-slips-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.emp-slips-stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.emp-slips-stat small {
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.emp-slips-stat-count .emp-slips-stat-icon {
    background: linear-gradient(145deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
}

.emp-slips-stat-latest .emp-slips-stat-icon {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #047857;
}

.emp-slips-stat-latest .emp-slips-stat-value {
    color: #047857;
}

.emp-slips-stat-year .emp-slips-stat-icon {
    background: linear-gradient(145deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.emp-slips-stat-total .emp-slips-stat-icon {
    background: linear-gradient(145deg, #ffedd5, #fed7aa);
    color: #c2410c;
}

.emp-slips-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.emp-slips-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, #fff);
}

.emp-slips-policy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.emp-slips-policy-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.emp-slips-policy-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #64748b;
}

.emp-slips-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px 56px;
    max-width: 420px;
    margin: 0 auto;
}

.emp-slips-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    color: #059669;
    margin-bottom: 16px;
}

.emp-slips-empty-icon svg {
    width: 34px;
    height: 34px;
}

.emp-slips-empty h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #0f172a;
}

.emp-slips-empty p {
    margin: 0 0 18px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
}

.emp-slips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 20px;
}

.emp-slip-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 18px 18px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, #f8fffb 0%, #fff 42%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.emp-slip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border-color: rgba(5, 150, 105, 0.28);
}

.emp-slip-card-latest {
    border-color: rgba(5, 150, 105, 0.35);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.1);
}

.emp-slip-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #059669;
    color: #fff;
}

.emp-slip-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.emp-slip-card-period {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emp-slip-card-month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 8px;
    border-radius: 12px;
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #047857;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.emp-slip-card-period strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.emp-slip-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    flex-shrink: 0;
}

.emp-slip-card-icon svg {
    width: 18px;
    height: 18px;
}

.emp-slip-card-body {
    flex: 1;
    min-width: 0;
    margin-bottom: 14px;
}

.emp-slip-card-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.emp-slip-card-pay span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.emp-slip-card-pay strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.emp-slip-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.15s ease, transform 0.15s ease;
    margin-top: auto;
}

.emp-slip-card-action svg {
    width: 16px;
    height: 16px;
}

.emp-slip-card-action:hover {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* Legacy slip list styles (unused) */
.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-cancelled, .emp-req-cancellation_pending { 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(5, 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;
}

/* Compact leave applications list */
.approvals-leave-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-leave-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border-left: 3px solid #ec4899;
}

.approval-leave-item.is-cancel-request {
    border-left-color: #ef4444;
}

.approval-leave-item-main {
    display: grid;
    grid-template-columns: minmax(160px, 1.15fr) minmax(150px, 1fr) minmax(100px, 0.75fr) minmax(120px, 0.85fr);
    gap: 14px 16px;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(180deg, #fffbfd 0%, #fff 100%);
}

.approval-leave-item-employee {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.approval-leave-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.approval-leave-item-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.25;
}

.approval-leave-item-name:hover {
    color: var(--primary);
}

.approval-leave-item-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.approval-leave-item-period-label,
.approval-leave-item-type-name {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.approval-leave-item-period-value {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: #831843;
    line-height: 1.3;
}

.approval-leave-item-days {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #be185d;
    background: #fce7f3;
    padding: 2px 8px;
    border-radius: 999px;
}

.approval-leave-item-flag {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 2px 7px;
    border-radius: 999px;
}

.approval-leave-item-type-code {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    color: #9d174d;
    background: #fce7f3;
    border: 1px solid #f9a8d4;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 3px;
}

.approval-leave-item-submitted {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    line-height: 1.35;
}

.approval-leave-item-extra {
    padding: 8px 14px 10px;
    border-top: 1px dashed #fbcfe8;
    background: #fffafb;
}

.approval-leave-item-note {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #831843;
    line-height: 1.4;
}

.approval-leave-item-note strong {
    font-weight: 700;
    color: #9d174d;
}

.approval-leave-item-date-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.approval-leave-item-date-chips span {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fbcfe8;
    color: #9d174d;
}

.approval-leave-item-footer {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

.approval-leave-item-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.approval-leave-item-note-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.approval-leave-item-note-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.approval-leave-item-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

@media (max-width: 720px) {
    .approval-leave-item-main {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .approval-leave-item-form {
        flex-direction: column;
        align-items: stretch;
    }

    .approval-leave-item-buttons {
        margin-left: 0;
        justify-content: flex-end;
    }
}

.approvals-panel-leave-full .approvals-panel-body {
    padding: 12px !important;
}

.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);
    gap: 16px;
}

.approvals-panel .panel-header > .panel-badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-left: auto;
}

.approvals-panel-head {
    flex: 1;
    min-width: 0;
    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-document {
    border-left: 4px solid #1d4ed8;
}

.approval-card-document-identity {
    border-left-color: #2563eb;
}

.approval-card-document-marksheet {
    border-left-color: #059669;
}

.approval-card-document-office {
    border-left-color: #ea580c;
}

.approval-card-document-other {
    border-left-color: #64748b;
}

.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-item-main {
        grid-template-columns: 1fr 1fr;
    }

    .approval-leave-item-submitted {
        text-align: left;
    }

    .approval-leave-item-buttons {
        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: 900px) {
    .emp-sidebar-backdrop:not([hidden]) {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    body.emp-sidebar-open .emp-sidebar-backdrop:not([hidden]) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .emp-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.2);
    }

    body.emp-sidebar-open .emp-sidebar {
        transform: translateX(0);
    }

    .emp-main {
        margin-left: 0;
    }

    .emp-sidebar-toggle {
        display: inline-flex;
    }

    .emp-main-topbar-logout-form {
        display: block;
    }

    .emp-main-topbar-user {
        display: none;
    }

    .emp-main-topbar {
        padding: 12px 16px;
    }

    .emp-main-topbar-user-text {
        display: none;
    }

    .emp-content {
        padding: 16px 16px 24px;
    }

    .emp-site-footer-compact {
        padding: 0 16px 16px;
    }
}

@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 {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .emp-page-punch-history .emp-ph-banner-grid {
        grid-template-columns: 1fr;
    }

    .emp-page-punch-history .emp-ph-banner-aside {
        align-items: stretch;
    }

    .emp-page-punch-history .emp-ph-period-nav {
        width: 100%;
        justify-content: center;
    }

    .emp-page-punch-history .emp-ph-banner-links {
        justify-content: center;
    }

    .emp-ph-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-ph-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .emp-ph-day {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .emp-ph-day-flow {
        grid-template-columns: 1fr;
    }

    .emp-ph-day-connector {
        width: 4px;
        height: 24px;
        margin: 0 auto;
    }

    .emp-ph-day-step {
        flex-direction: row;
        text-align: left;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .emp-ph-day-step.is-done {
        background: #f0fdfa;
        border-color: #99f6e4;
    }

    .emp-ph-day-step.is-pending {
        border-color: #fde68a;
        background: #fffbeb;
    }

    .emp-ph-day-step-body {
        align-items: flex-start;
    }

    .emp-ph-day-aside {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 0;
        border-top: none;
    }

    .emp-page-slips .emp-page-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .emp-page-slips .emp-slips-period-hint {
        width: 100%;
        justify-content: center;
    }

    .emp-slips-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-slips-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .emp-slips-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .emp-ph-stats {
        grid-template-columns: 1fr;
    }

    .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-record-hero {
        padding: 16px 14px 14px;
    }

    .emp-page-attendance .emp-att-record-head {
        margin-bottom: 12px;
    }

    .emp-page-attendance .emp-att-record-link {
        width: 100%;
        justify-content: center;
    }

    .emp-page-attendance .emp-att-record-timeline {
        padding: 14px 14px 18px;
    }

    .emp-page-attendance .emp-att-record-item {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
    }

    .emp-page-attendance .emp-att-record-dot {
        width: 32px;
        height: 32px;
    }

    .emp-page-attendance .emp-att-record-dot svg {
        width: 14px;
        height: 14px;
    }

    .emp-page-attendance .emp-att-record-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-page-attendance .emp-att-record-badge {
        align-self: flex-start;
    }

    .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;
    }
}

/* Employee punch history page */
.emp-ph-banner {
    margin-bottom: 18px;
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 42%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 16px 48px rgba(13, 148, 136, 0.24);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.emp-ph-banner-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.emp-ph-banner-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.emp-ph-banner-orb-1 {
    width: 280px;
    height: 280px;
    top: -100px;
    right: -40px;
}

.emp-ph-banner-orb-2 {
    width: 160px;
    height: 160px;
    bottom: -60px;
    left: 20%;
    background: rgba(255, 255, 255, 0.12);
}

.emp-ph-banner-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    padding: 28px 32px;
    align-items: stretch;
}

.emp-ph-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.78);
}

.emp-ph-banner-main h1 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.emp-ph-banner-main p {
    margin: 0 0 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    max-width: 38rem;
}

.emp-ph-banner-main p strong {
    color: #fff;
    font-weight: 700;
}

.emp-ph-banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-ph-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff;
}

.emp-ph-banner-tag svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.9;
}

.emp-ph-banner-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.emp-ph-period-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.emp-ph-period-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: background 0.15s, transform 0.15s;
}

.emp-ph-period-btn svg {
    width: 18px;
    height: 18px;
}

.emp-ph-period-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.emp-ph-period-label {
    min-width: 130px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.emp-ph-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.emp-ph-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    transition: background 0.15s;
}

.emp-ph-banner-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.emp-ph-banner-link-primary {
    background: #fff;
    color: #0f766e;
    border-color: #fff;
}

.emp-ph-banner-link-primary:hover {
    background: #f0fdfa;
}

.emp-ph-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.emp-ph-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);
    min-width: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.emp-ph-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.emp-ph-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-ph-stat-icon svg {
    width: 20px;
    height: 20px;
}

.emp-ph-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.emp-ph-stat-value {
    display: block;
    font-size: 1.28rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}

.emp-ph-stat-hint {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}

.emp-ph-stat-days .emp-ph-stat-icon {
    background: #ede9fe;
    color: #5b21b6;
}

.emp-ph-stat-late .emp-ph-stat-icon {
    background: #ffedd5;
    color: #c2410c;
}

.emp-ph-stat-early .emp-ph-stat-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.emp-ph-stat-hours .emp-ph-stat-icon {
    background: #d1fae5;
    color: #047857;
}

.emp-ph-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.emp-ph-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.emp-ph-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.emp-ph-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ccfbf1;
    color: #0f766e;
    flex-shrink: 0;
}

.emp-ph-panel-icon svg {
    width: 20px;
    height: 20px;
}

.emp-ph-panel-title h2 {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.emp-ph-panel-title p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.emp-ph-panel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-ph-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.emp-ph-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.emp-ph-chip-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.emp-ph-chip-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.emp-ph-list {
    display: flex;
    flex-direction: column;
}

.emp-ph-day {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) minmax(120px, 150px);
    gap: 16px 20px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.emp-ph-day:last-child {
    border-bottom: none;
}

.emp-ph-day:hover {
    background: #fafbfc;
}

.emp-ph-day--today {
    background: linear-gradient(90deg, rgba(204, 251, 241, 0.35) 0%, rgba(255, 255, 255, 0) 28%);
    box-shadow: inset 3px 0 0 #0d9488;
}

.emp-ph-day--today:hover {
    background: linear-gradient(90deg, rgba(204, 251, 241, 0.45) 0%, #fafbfc 28%);
}

.emp-ph-day-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.emp-ph-day-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.emp-ph-day--today .emp-ph-day-num {
    background: linear-gradient(145deg, #ccfbf1, #99f6e4);
    color: #0f766e;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.2);
}

.emp-ph-day-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
}

.emp-ph-day-meta strong {
    font-size: 0.74rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.emp-ph-day-today {
    display: inline-block;
    margin-top: 2px;
    font-style: normal;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f766e;
}

.emp-ph-day-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0;
    align-items: start;
    min-width: 0;
}

.emp-ph-day-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-width: 0;
}

.emp-ph-day-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
}

.emp-ph-day-step-dot svg {
    width: 16px;
    height: 16px;
}

.emp-ph-day-step.is-done .emp-ph-day-step-dot {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.emp-ph-day-step.is-pending .emp-ph-day-step-dot {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
}

.emp-ph-day-step-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.emp-ph-day-step-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.emp-ph-day-step-time {
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.emp-ph-day-step.is-empty .emp-ph-day-step-time {
    color: #cbd5e1;
}

.emp-ph-day-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.emp-ph-day-tag.punch-punctuality-on-time {
    background: #d1fae5;
    color: #047857;
}

.emp-ph-day-tag.punch-punctuality-late {
    background: #ffedd5;
    color: #c2410c;
}

.emp-ph-day-tag.punch-punctuality-early {
    background: #dbeafe;
    color: #1d4ed8;
}

.emp-ph-day-tag-warn {
    background: #fef3c7;
    color: #b45309;
}

.emp-ph-day-connector {
    position: relative;
    width: min(100px, 14vw);
    height: 4px;
    margin-top: 16px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.emp-ph-day-connector-fill {
    display: block;
    height: 100%;
    width: var(--ph-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981 0%, #6366f1 100%);
    transition: width 0.3s ease;
}

.emp-ph-day--partial .emp-ph-day-connector-fill {
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%);
}

.emp-ph-day-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px dashed #e2e8f0;
}

.emp-ph-day-hours-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 4px;
    text-align: right;
}

.emp-ph-day-hours-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    text-align: right;
    letter-spacing: -0.02em;
}

.emp-ph-day-result {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.emp-ph-result-present {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.emp-ph-result-half {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.emp-ph-result-absent {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.emp-ph-result-na {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.emp-ph-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 52px 24px 60px;
    max-width: 440px;
    margin: 0 auto;
}

.emp-ph-empty-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ccfbf1, #a7f3d0);
    color: #0f766e;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(13, 148, 136, 0.18);
}

.emp-ph-empty-icon svg {
    width: 36px;
    height: 36px;
}

.emp-ph-empty h3 {
    margin: 0 0 8px;
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
}

.emp-ph-empty p {
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
}

.emp-ph-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Employee punch in/out (Phase 1) */
.emp-punch-card {
    --punch-accent: #0d9488;
    --punch-accent-soft: #ccfbf1;
    --punch-accent-deep: #115e59;
    position: relative;
    margin: 0 0 20px;
    border-radius: calc(var(--radius) + 4px);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.emp-punch-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--punch-accent) 0%, #14b8a6 55%, #2dd4bf 100%);
}

.emp-punch-card--await-in {
    --punch-accent: #0d9488;
    --punch-accent-soft: #ccfbf1;
    --punch-accent-deep: #115e59;
}

.emp-punch-card--await-out {
    --punch-accent: #d97706;
    --punch-accent-soft: #fef3c7;
    --punch-accent-deep: #92400e;
}

.emp-punch-card--await-out .emp-punch-card-accent {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 55%, #fbbf24 100%);
}

.emp-punch-card--complete {
    --punch-accent: #059669;
    --punch-accent-soft: #d1fae5;
    --punch-accent-deep: #047857;
}

.emp-punch-card--complete .emp-punch-card-accent {
    background: linear-gradient(90deg, #059669 0%, #10b981 55%, #34d399 100%);
}

.emp-punch-card--blocked {
    --punch-accent: #64748b;
    --punch-accent-soft: #f1f5f9;
    --punch-accent-deep: #475569;
}

.emp-punch-card--blocked .emp-punch-card-accent {
    background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

.emp-punch-card-body {
    padding: 22px 24px 18px;
}

.emp-punch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.emp-punch-header-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.emp-punch-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--punch-accent-soft);
    color: var(--punch-accent-deep);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.emp-punch-card--await-out .emp-punch-icon {
    background: #fef3c7;
    color: #92400e;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.14);
}

.emp-punch-card--complete .emp-punch-icon {
    background: #d1fae5;
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.14);
}

.emp-punch-card--blocked .emp-punch-icon {
    background: #f1f5f9;
    color: #64748b;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.12);
}

.emp-punch-icon svg {
    width: 22px;
    height: 22px;
}

.emp-punch-header-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.emp-punch-live-time {
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: #0f172a;
    line-height: 1;
}

.emp-punch-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.emp-punch-chip--info {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.emp-punch-chip--warn {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.emp-punch-chip--success {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.emp-punch-chip--muted {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.emp-punch-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.emp-punch-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.emp-punch-track {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0;
    align-items: start;
    margin-bottom: 16px;
}

.emp-punch-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    min-width: 0;
}

.emp-punch-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.emp-punch-step-dot svg {
    width: 18px;
    height: 18px;
}

.emp-punch-step--done .emp-punch-step-dot {
    background: var(--punch-accent-soft);
    border-color: var(--punch-accent);
    color: var(--punch-accent-deep);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.emp-punch-card--await-out .emp-punch-step--done .emp-punch-step-dot {
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.emp-punch-card--complete .emp-punch-step--done .emp-punch-step-dot {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.emp-punch-step--active .emp-punch-step-dot {
    background: #fff;
    border-color: var(--punch-accent);
    color: var(--punch-accent);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
    animation: emp-punch-pulse 2s ease-in-out infinite;
}

.emp-punch-card--await-out .emp-punch-step--active .emp-punch-step-dot {
    border-color: #d97706;
    color: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

@keyframes emp-punch-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.emp-punch-step-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.emp-punch-step-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.emp-punch-step-time {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.emp-punch-step--pending .emp-punch-step-time {
    color: #94a3b8;
}

.emp-punch-step-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.emp-punch-step-tag-meta::before {
    content: '·';
    margin-right: 4px;
    opacity: 0.7;
}

.emp-punch-step-tag.punch-punctuality-on-time {
    background: #d1fae5;
    color: #047857;
}

.emp-punch-step-tag.punch-punctuality-late {
    background: #ffedd5;
    color: #c2410c;
}

.emp-punch-step-tag.punch-punctuality-early {
    background: #dbeafe;
    color: #1d4ed8;
}

.emp-punch-step-tag-muted {
    background: #f1f5f9;
    color: #94a3b8;
}

.emp-punch-connector {
    position: relative;
    width: min(120px, 18vw);
    height: 4px;
    margin-top: 20px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.emp-punch-connector-fill {
    display: block;
    height: 100%;
    width: var(--punch-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--punch-accent) 0%, #2dd4bf 100%);
    transition: width 0.35s ease;
}

.emp-punch-card--await-out .emp-punch-connector-fill {
    background: linear-gradient(90deg, #059669 0%, #d97706 100%);
}

.emp-punch-card--complete .emp-punch-connector-fill {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.emp-punch-message {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
}

.emp-punch-card--await-in .emp-punch-message {
    background: #f0fdfa;
    border-color: #ccfbf1;
    color: #0f766e;
}

.emp-punch-card--await-out .emp-punch-message {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.emp-punch-card--complete .emp-punch-message {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.emp-punch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-punch-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.2;
}

.emp-punch-meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #64748b;
}

.emp-punch-meta-sub {
    font-weight: 500;
    color: #94a3b8;
}

.emp-punch-meta-geo svg {
    color: #0d9488;
}

.emp-punch-meta-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.emp-punch-meta-warn svg {
    color: #d97706;
}

.emp-punch-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 16px 24px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
}

.emp-punch-form {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.emp-punch-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    border: 0;
    border-radius: 14px;
    padding: 14px 22px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--punch-accent-deep) 0%, var(--punch-accent) 100%);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.emp-punch-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(13, 148, 136, 0.32);
}

.emp-punch-btn:active:not(:disabled) {
    transform: translateY(0);
}

.emp-punch-btn-out {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.emp-punch-btn-out:hover:not(:disabled) {
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.32);
}

.emp-punch-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #94a3b8;
}

.emp-punch-btn-icon svg {
    width: 20px;
    height: 20px;
}

.emp-punch-btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

.emp-punch-form-note {
    margin: 0;
    min-height: 1.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b45309;
}

.emp-punch-history-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.emp-punch-history-link svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.emp-punch-history-link:hover {
    background: #fff;
    color: #0f766e;
    border-color: #99f6e4;
}

.emp-punch-history-link:hover svg {
    color: #0d9488;
}

.page-emp-portal .emp-punch-card {
    margin-top: 0;
}

.emp-page-dashboard .emp-punch-card {
    margin: 0 0 20px;
}

.punch-branch-row {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .emp-punch-card-body {
        padding: 18px 16px 14px;
    }

    .emp-punch-header {
        flex-direction: column;
    }

    .emp-punch-header-aside {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .emp-punch-track {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .emp-punch-connector {
        width: 4px;
        height: 28px;
        margin: 4px auto;
    }

    .emp-punch-step {
        flex-direction: row;
        text-align: left;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .emp-punch-step--done {
        background: var(--punch-accent-soft);
        border-color: rgba(13, 148, 136, 0.2);
    }

    .emp-punch-step--active {
        border-color: var(--punch-accent);
        box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    }

    .emp-punch-step-body {
        align-items: flex-start;
    }

    .emp-punch-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px 18px;
    }

    .emp-punch-btn {
        max-width: none;
    }

    .emp-punch-history-link {
        justify-content: center;
    }
}

/* ---------- Leave history (admin) ---------- */

.leave-history-page .page-header-main p strong {
    color: var(--text);
}

.leave-history-branch-alert {
    margin-bottom: 20px;
}

.leave-history-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.leave-history-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.leave-history-stat:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow);
}

.leave-history-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leave-history-stat-icon svg {
    width: 22px;
    height: 22px;
}

.leave-history-stat-total .leave-history-stat-icon {
    background: #eef2ff;
    color: #4f46e5;
}

.leave-history-stat-approved .leave-history-stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.leave-history-stat-pending .leave-history-stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.leave-history-stat-closed .leave-history-stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.leave-history-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.leave-history-stat-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    margin: 4px 0 2px;
}

.leave-history-stat-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.leave-history-panel {
    overflow: hidden;
}

.leave-history-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbff 0%, var(--card) 100%);
}

.leave-history-panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 200px;
}

.leave-history-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ede9fe, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leave-history-panel-icon svg {
    width: 22px;
    height: 22px;
}

.leave-history-panel-title h3 {
    margin: 0;
    font-size: 1.05rem;
}

.leave-history-panel-title p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.leave-history-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
    min-width: min(100%, 520px);
}

.leave-history-filters .form-group {
    margin: 0;
    min-width: 120px;
}

.leave-history-filters .leave-history-search-group {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 300px;
}

.leave-history-filters label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.leave-history-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.leave-history-search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.leave-history-search input[type="search"] {
    width: 100%;
    min-height: 42px;
    padding: 10px 36px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.leave-history-search input[type="search"]::-webkit-search-decoration,
.leave-history-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.leave-history-search input[type="search"]::placeholder {
    color: #94a3b8;
}

.leave-history-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.leave-history-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);
}

.leave-history-search-clear:hover {
    background: var(--bg);
    color: var(--text);
}

.leave-history-filters select {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.leave-history-filters select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.leave-history-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.leave-history-filter-actions label {
    visibility: hidden;
}

.leave-history-panel-body {
    padding: 16px !important;
}

.leave-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leave-history-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border-left: 4px solid #94a3b8;
}

.leave-history-card--approved {
    border-left-color: #22c55e;
}

.leave-history-card--pending {
    border-left-color: #f59e0b;
}

.leave-history-card--cancel-pending {
    border-left-color: #f97316;
}

.leave-history-card--rejected,
.leave-history-card--cancelled {
    border-left-color: #ef4444;
}

.leave-history-card-main {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 1.4fr) minmax(100px, 0.8fr) minmax(130px, 0.9fr);
    gap: 16px 20px;
    align-items: center;
    padding: 16px 18px;
}

.leave-history-card-employee {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.leave-history-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #c4b5fd, #7c3aed);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.leave-history-card-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}

.leave-history-card-name:hover {
    color: var(--primary);
}

.leave-history-card-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.leave-history-period-label,
.leave-history-type-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.leave-history-period-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
}

.leave-history-period-sep {
    color: var(--text-muted);
    font-weight: 600;
}

.leave-history-period-days {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6d28d9;
    background: #f5f3ff;
    padding: 2px 8px;
    border-radius: 999px;
}

.leave-history-type-code {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    color: #5b21b6;
    background: #ede9fe;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.leave-history-card-status-wrap {
    text-align: right;
}

.leave-history-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.leave-history-status--approved {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.leave-history-status--pending {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

.leave-history-status--cancel-pending {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

.leave-history-status--rejected,
.leave-history-status--cancelled {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.leave-history-status--neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.leave-history-submitted {
    display: block;
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.leave-history-card-notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 0 18px 16px;
    border-top: 1px dashed var(--border);
    margin-top: -2px;
    padding-top: 14px;
}

.leave-history-note {
    font-size: 0.84rem;
    border-radius: 10px;
    padding: 10px 12px;
}

.leave-history-note strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.leave-history-note p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
}

.leave-history-note time {
    display: block;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.leave-history-note-employee {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.leave-history-note-review {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.leave-history-empty {
    text-align: center;
    padding: 48px 24px;
}

.leave-history-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leave-history-empty-icon svg {
    width: 32px;
    height: 32px;
}

.leave-history-empty h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.leave-history-empty p {
    margin: 0 auto 16px;
    max-width: 420px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .leave-history-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-history-card-main {
        grid-template-columns: 1fr 1fr;
    }

    .leave-history-card-status-wrap {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .leave-history-stats {
        grid-template-columns: 1fr;
    }

    .leave-history-panel-head {
        padding: 18px 16px;
    }

    .leave-history-filters {
        width: 100%;
        min-width: 0;
    }

    .leave-history-filters .form-group {
        flex: 1 1 100%;
        min-width: 0;
    }

    .leave-history-filters .leave-history-search-group {
        max-width: none;
    }

    .leave-history-card-main {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* Employee documents */
.emp-page-documents {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emp-docs-banner {
    position: relative;
    overflow: hidden;
    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.24);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.emp-docs-banner-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.emp-docs-banner-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.emp-docs-banner-orb-1 {
    width: 280px;
    height: 280px;
    top: -100px;
    right: -40px;
}

.emp-docs-banner-orb-2 {
    width: 160px;
    height: 160px;
    bottom: -60px;
    left: 20%;
    background: rgba(14, 165, 233, 0.2);
}

.emp-docs-banner-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    padding: 28px 32px;
    align-items: center;
}

.emp-docs-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.emp-docs-banner-main h1 {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.emp-docs-banner-main p {
    margin: 0 0 14px;
    max-width: 520px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.emp-docs-banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emp-docs-banner-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-docs-progress-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.emp-docs-progress-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.emp-docs-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.emp-docs-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 3;
}

.emp-docs-progress-fill {
    fill: none;
    stroke: #34d399;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.4s ease;
}

.emp-docs-progress-ring strong {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.emp-docs-progress-text span {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 4px;
}

.emp-docs-progress-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}

.emp-docs-progress-text em {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    color: #fde68a;
}

.emp-docs-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.emp-docs-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-width: 0;
}

.emp-docs-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-docs-stat-icon svg {
    width: 20px;
    height: 20px;
}

.emp-docs-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.emp-docs-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.emp-docs-stat-approved .emp-docs-stat-icon { background: linear-gradient(145deg, #d1fae5, #a7f3d0); color: #047857; }
.emp-docs-stat-pending .emp-docs-stat-icon { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #b45309; }
.emp-docs-stat-identity .emp-docs-stat-icon { background: linear-gradient(145deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.emp-docs-stat-total .emp-docs-stat-icon { background: linear-gradient(145deg, #ede9fe, #ddd6fe); color: #5b21b6; }

.emp-docs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.emp-docs-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.emp-docs-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.emp-docs-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.emp-docs-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.emp-docs-tab:hover {
    color: #334155;
    background: #f8fafc;
}

.emp-docs-tab.is-active {
    color: #4338ca;
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.12);
}

.emp-docs-panel {
    display: none;
}

.emp-docs-panel.is-active {
    display: block;
}

.emp-docs-panel-head {
    margin-bottom: 14px;
}

.emp-docs-panel-head h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: #0f172a;
}

.emp-docs-panel-head p {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
}

.emp-docs-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 16px;
}

.emp-docs-guide {
    padding: 18px 20px;
}

.emp-docs-guide h3,
.emp-docs-recent h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.emp-docs-guide ul {
    margin: 0;
    padding: 0 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emp-docs-guide li {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.45;
}

.emp-docs-recent {
    padding: 18px 20px;
}

.emp-docs-recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emp-docs-recent-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.emp-docs-recent-item strong {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 3px;
    color: #0f172a;
}

.emp-docs-recent-item span {
    display: block;
    font-size: 0.74rem;
    color: #64748b;
    margin-bottom: 6px;
}

.emp-docs-recent-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
}

.emp-docs-recent-link:hover {
    text-decoration: underline;
}

.emp-doc-identity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.emp-doc-card-aadhar {
    grid-column: 1 / -1;
}

.emp-doc-card {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.emp-doc-card-accent {
    position: relative;
    overflow: hidden;
}

.emp-doc-card-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #0ea5e9);
    opacity: 0.85;
}

.emp-doc-card-status-approved::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.emp-doc-card-status-pending::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.emp-doc-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border-color: rgba(99, 102, 241, 0.22);
}

.emp-doc-card-top {
    position: relative;
}

.emp-doc-card-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: #eef2ff;
    color: #4338ca;
}

.emp-doc-card-badge-pan { background: #fef3c7; color: #b45309; }
.emp-doc-card-badge-passport { background: #dbeafe; color: #1d4ed8; }

.emp-doc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 48px;
}

.emp-doc-card-head h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.emp-doc-aadhar-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.emp-doc-aadhar-slot {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px dashed #cbd5e1;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.emp-doc-aadhar-slot-approved {
    padding: 0;
    border: 1px solid #86efac;
    background: #fff;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.1);
    overflow: hidden;
}

.emp-doc-aadhar-slot-approved .emp-doc-aadhar-slot-head {
    margin: 0;
    padding: 14px 16px 10px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-bottom: 1px solid #bbf7d0;
}

.emp-doc-aadhar-slot-approved .emp-doc-aadhar-slot-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #065f46;
}

.emp-doc-aadhar-slot-approved .emp-doc-aadhar-slot-head strong::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.emp-doc-aadhar-approved-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
}

.emp-doc-aadhar-approved-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #10b981, #059669);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

.emp-doc-aadhar-approved-icon svg {
    width: 20px;
    height: 20px;
}

.emp-doc-aadhar-approved-details {
    flex: 1;
    min-width: 0;
}

.emp-doc-aadhar-approved-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #047857;
    margin-bottom: 3px;
}

.emp-doc-aadhar-approved-meta {
    display: block;
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

.emp-doc-aadhar-view-btn {
    flex-shrink: 0;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
    background: #ecfdf5 !important;
    font-weight: 700;
}

.emp-doc-aadhar-view-btn:hover {
    background: #d1fae5 !important;
    border-color: #34d399 !important;
}

.emp-doc-aadhar-replace {
    padding: 12px 16px 16px;
    border-top: 1px dashed #d1fae5;
    background: #fafffe;
}

.emp-doc-aadhar-replace-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.emp-doc-upload-form-compact .emp-doc-file-zone label {
    min-height: 64px;
    padding: 10px;
    border-color: #d1fae5;
    background: #fff;
}

.emp-doc-upload-form-compact .emp-doc-file-zone label svg {
    width: 18px;
    height: 18px;
}

.emp-doc-aadhar-slot-pending {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.emp-doc-aadhar-slot-pending .emp-doc-wait-msg,
.emp-doc-aadhar-slot-missing .emp-doc-upload-form {
    margin-top: 0;
}

.emp-doc-aadhar-slot:not(.emp-doc-aadhar-slot-approved) .emp-doc-wait-msg {
    margin-bottom: 0;
}

.emp-doc-aadhar-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.emp-doc-aadhar-slot-head strong {
    font-size: 0.88rem;
    color: #334155;
}

.emp-doc-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.emp-doc-status-approved { background: #ecfdf5; color: #047857; }
.emp-doc-status-pending { background: #fffbeb; color: #b45309; }
.emp-doc-status-missing { background: #f1f5f9; color: #64748b; }
.emp-doc-status-neutral { background: #eff6ff; color: #1d4ed8; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

.emp-doc-card-meta,
.emp-doc-wait-msg {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #64748b;
}

.emp-doc-upload-form .form-group {
    margin-bottom: 12px;
}

.emp-doc-form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.emp-doc-form-row .form-group {
    margin-bottom: 0;
}

.emp-doc-file-zone {
    position: relative;
    margin-bottom: 15px;
}

.emp-doc-file-zone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.emp-doc-file-zone label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 96px;
    padding: 14px;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    color: #475569;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.emp-doc-file-zone label:hover {
    border-color: #818cf8;
    background: #eef2ff;
    transform: translateY(-1px);
}

.emp-doc-file-zone-lg label {
    min-height: 120px;
    padding: 20px;
}

.emp-doc-file-zone label svg {
    width: 24px;
    height: 24px;
    color: #4f46e5;
}

.emp-doc-file-zone label span {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
    max-width: 100%;
}

.emp-doc-file-zone label em {
    font-size: 0.72rem;
    font-style: normal;
    color: #94a3b8;
}

.emp-doc-aadhar-slot .emp-doc-file-zone label {
    min-height: 78px;
}

.emp-doc-picker-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.emp-doc-picker-select-wrap {
    min-width: min(100%, 320px);
    margin: 0;
}

.emp-doc-type-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.9rem;
    color: #0f172a;
}

.emp-doc-picker-summary {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f1f5f9;
    color: #64748b;
}

.emp-doc-picker-summary.approved { background: #ecfdf5; color: #047857; }
.emp-doc-picker-summary.pending { background: #fffbeb; color: #b45309; }
.emp-doc-picker-summary.missing { background: #f1f5f9; color: #64748b; }

.emp-doc-picker-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.emp-doc-picker-panel-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.emp-doc-picker-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emp-doc-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.emp-doc-type-chips-interactive {
    padding-bottom: 16px;
    border-bottom: 1px dashed #e2e8f0;
}

.emp-doc-type-chip {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid transparent;
    cursor: default;
}

.emp-doc-type-chips-interactive .emp-doc-type-chip {
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.emp-doc-type-chips-interactive .emp-doc-type-chip:hover {
    transform: translateY(-1px);
}

.emp-doc-type-chips-interactive .emp-doc-type-chip.is-selected {
    box-shadow: 0 0 0 2px #6366f1;
    border-color: #6366f1;
}

.emp-doc-type-chip-approved { background: #ecfdf5; color: #047857; }
.emp-doc-type-chip-pending { background: #fffbeb; color: #b45309; }
.emp-doc-type-chip-missing { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }

.emp-doc-approved-grid {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

.emp-doc-approved-grid h4 {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.emp-doc-approved-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.emp-doc-approved-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-width: 0;
}

.emp-doc-approved-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-doc-approved-icon svg {
    width: 18px;
    height: 18px;
}

.emp-doc-approved-item div {
    flex: 1;
    min-width: 0;
}

.emp-doc-approved-item strong {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-doc-approved-item span {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}

.emp-doc-history {
    padding: 20px 22px;
}

.emp-doc-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.emp-doc-history-head h3 {
    margin: 0;
    font-size: 1rem;
}

.emp-doc-history-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
}

.emp-doc-history-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 20px;
}

.emp-doc-history-list::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e2e8f0;
    border-radius: 1px;
}

.emp-doc-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 12px 0;
    margin-bottom: 8px;
    position: relative;
}

.emp-doc-history-dot {
    position: absolute;
    left: -20px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.emp-doc-history-approved .emp-doc-history-dot { background: #10b981; }
.emp-doc-history-pending .emp-doc-history-dot { background: #f59e0b; }
.emp-doc-history-rejected .emp-doc-history-dot { background: #ef4444; }

.emp-doc-history-main {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.emp-doc-history-main strong {
    display: block;
    margin-bottom: 4px;
}

.emp-doc-history-main span,
.emp-doc-history-main em {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
}

.emp-doc-history-main em {
    margin-top: 4px;
    font-style: normal;
    color: #475569;
}

.emp-doc-history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .emp-docs-layout {
        grid-template-columns: 1fr;
    }

    .emp-docs-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .emp-docs-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .emp-docs-banner-grid {
        grid-template-columns: 1fr;
        padding: 22px 20px;
    }

    .emp-docs-progress-card {
        flex-direction: column;
        text-align: center;
    }

    .emp-docs-stats,
    .emp-docs-aside,
    .emp-doc-identity-grid,
    .emp-doc-approved-cards {
        grid-template-columns: 1fr;
    }

    .emp-docs-tabs {
        flex-direction: column;
    }

    .emp-doc-aadhar-slots,
    .emp-doc-form-row {
        grid-template-columns: 1fr;
    }

    .emp-doc-aadhar-approved-strip {
        flex-wrap: wrap;
    }

    .emp-doc-aadhar-view-btn {
        width: 100%;
        justify-content: center;
    }

    .emp-doc-form-row .btn {
        width: 100%;
    }

    .emp-doc-history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .emp-doc-card-head {
        padding-right: 0;
        flex-direction: column;
    }

    .emp-doc-card-badge {
        position: static;
        align-self: flex-start;
        margin-bottom: 8px;
    }
}

.approvals-panel-icon-documents {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.approval-doc-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.approval-doc-file-icon {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.12);
}

.approval-doc-file-icon svg {
    width: 26px;
    height: 26px;
    opacity: 0.35;
}

.approval-doc-file-ext {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #1e40af;
    background: rgba(255, 255, 255, 0.92);
    padding: 2px 6px;
    border-radius: 4px;
}

.approval-doc-file-icon-pdf {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #b91c1c;
}

.approval-doc-file-icon-pdf .approval-doc-file-ext {
    color: #b91c1c;
}

.approval-doc-file-icon-jpg,
.approval-doc-file-icon-jpeg,
.approval-doc-file-icon-png {
    background: linear-gradient(145deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.approval-doc-file-icon-jpg .approval-doc-file-ext,
.approval-doc-file-icon-jpeg .approval-doc-file-ext,
.approval-doc-file-icon-png .approval-doc-file-ext {
    color: #15803d;
}

.approval-doc-meta {
    flex: 1;
    min-width: 0;
}

.approval-doc-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.approval-doc-type {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.approval-doc-type-identity { background: #eff6ff; color: #1d4ed8; }
.approval-doc-type-marksheet { background: #ecfdf5; color: #047857; }
.approval-doc-type-office { background: #ffedd5; color: #c2410c; }
.approval-doc-type-other { background: #f1f5f9; color: #475569; }

.approval-doc-category {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.approval-doc-meta strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: var(--text);
}

.approval-doc-fileinfo {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    word-break: break-all;
}

.approval-doc-preview-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.approval-doc-preview-btn svg {
    width: 16px;
    height: 16px;
}

.approval-doc-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    margin: 12px 0;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.approval-doc-meta span:not(.approval-doc-type):not(.approval-doc-category):not(.approval-doc-fileinfo) {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
}

.ev-documents-sidebar,
.ev-documents-panel {
    margin-top: 0;
}

.ev-documents-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ev-documents-sidebar-review {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 5px 10px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.ev-documents-sidebar-review:hover {
    background: #fef3c7;
    border-color: #fcd34d;
}

.ev-documents-sidebar-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.ev-documents-sidebar-link:hover {
    text-decoration: underline;
}

.ev-documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-documents-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    position: relative;
    overflow: hidden;
}

.ev-documents-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #94a3b8;
}

.ev-documents-list-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.ev-documents-list-item-identity::before { background: #3b82f6; }
.ev-documents-list-item-marksheet::before { background: #10b981; }
.ev-documents-list-item-office::before { background: #f97316; }
.ev-documents-list-item-other::before { background: #64748b; }

.ev-documents-list-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eff6ff;
    color: #1d4ed8;
}

.ev-documents-list-icon svg {
    width: 18px;
    height: 18px;
    opacity: 0.45;
}

.ev-documents-list-icon em {
    position: absolute;
    bottom: 3px;
    font-size: 0.52rem;
    font-weight: 800;
    font-style: normal;
    letter-spacing: 0.03em;
    line-height: 1;
    color: inherit;
    opacity: 0.95;
}

.ev-documents-list-item-identity .ev-documents-list-icon { background: linear-gradient(145deg, #eff6ff, #dbeafe); color: #1d4ed8; }
.ev-documents-list-item-marksheet .ev-documents-list-icon { background: linear-gradient(145deg, #ecfdf5, #d1fae5); color: #047857; }
.ev-documents-list-item-office .ev-documents-list-icon { background: linear-gradient(145deg, #ffedd5, #fed7aa); color: #c2410c; }
.ev-documents-list-item-other .ev-documents-list-icon { background: linear-gradient(145deg, #f1f5f9, #e2e8f0); color: #475569; }

.ev-documents-list-body {
    flex: 1;
    min-width: 0;
}

.ev-documents-list-type {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 2px;
}

.ev-documents-list-body strong {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ev-documents-list-meta {
    display: block;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
}

.ev-documents-list-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.ev-documents-list-btn svg {
    width: 15px;
    height: 15px;
}

.ev-documents-list-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.04);
}

.ev-documents-list-link {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.ev-documents-list-link:hover {
    text-decoration: underline;
}

.ev-documents-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ev-documents-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    color: #64748b;
}

.ev-documents-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ev-documents-empty-icon svg {
    width: 26px;
    height: 26px;
}

.ev-documents-empty p {
    margin: 0;
    font-size: 0.88rem;
}

.panel-badge-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.ev-documents-admin-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ev-doc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: background 0.12s, border-color 0.12s;
}

.ev-doc-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.ev-doc-row.is-pending {
    background: #fffdf5;
    border-color: #fde68a;
}

.ev-doc-row-ext {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    background: #eff6ff;
    color: #1d4ed8;
}

.ev-doc-row-ext-pdf { background: #fee2e2; color: #b91c1c; }
.ev-doc-row-ext-jpg,
.ev-doc-row-ext-jpeg,
.ev-doc-row-ext-png { background: #dcfce7; color: #15803d; }

.ev-doc-row-identity { border-left: 3px solid #3b82f6; }
.ev-doc-row-marksheet { border-left: 3px solid #10b981; }
.ev-doc-row-office { border-left: 3px solid #f97316; }
.ev-doc-row-other { border-left: 3px solid #64748b; }

.ev-doc-row-info {
    flex: 1;
    min-width: 0;
}

.ev-doc-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.ev-doc-row-top strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.ev-doc-row-status {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ev-doc-row-status-approved { background: #ecfdf5; color: #047857; }
.ev-doc-row-status-pending { background: #fffbeb; color: #b45309; }

.ev-doc-row-meta {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.ev-doc-row-action,
.ev-doc-row-actions .ev-doc-row-action {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    transition: background 0.12s, color 0.12s;
}

.ev-doc-row-action:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.ev-doc-row-action-muted {
    color: #475569;
    background: #fff;
    border-color: #e2e8f0;
}

.ev-doc-row-action-muted:hover {
    color: var(--primary);
    background: #eef2ff;
    border-color: #c7d2fe;
}

.ev-doc-row-action-review {
    color: #fff;
    background: #059669;
    border-color: #059669;
}

.ev-doc-row-action-review:hover {
    background: #047857;
    border-color: #047857;
    color: #fff;
}

.ev-doc-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ev-documents-panel .panel-body.padded {
    padding: 16px 18px;
}

@media (max-width: 900px) {
    .emp-doc-grid,
    .emp-doc-upload-fields,
    .emp-doc-stats {
        grid-template-columns: 1fr;
    }

    .ev-documents-admin-grid,
    .ev-documents-admin-list {
        gap: 6px;
    }

    .ev-doc-row {
        flex-wrap: wrap;
        padding: 10px;
    }

    .ev-doc-row-meta {
        white-space: normal;
    }

    .ev-doc-row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .emp-doc-card-wide {
        grid-column: auto;
    }

    .emp-doc-history-item {
        flex-direction: column;
        align-items: stretch;
    }
}
