/* ==========================================================================
   Indian Payroll Management System - Main Stylesheet
   Based on zoho-payroll-clone.html reference
   ========================================================================== */

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

:root {
  --zoho-blue: #0f4c81;
  --zoho-blue-light: #1565c0;
  --zoho-orange: #e65100;
  --zoho-green: #2e7d32;
  --zoho-red: #c62828;
  --sidebar-bg: #1a2332;
  --sidebar-hover: #243447;
  --sidebar-active: #0f4c81;
  --topbar-bg: #ffffff;
  --content-bg: #f4f6f9;
  --card-bg: #ffffff;
  --text-primary: #212121;
  --text-secondary: #616161;
  --text-muted: #9e9e9e;
  --border: #e0e0e0;
  --shadow: 0 1px 4px rgba(0,0,0,0.12);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.15);
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-hover: #f5f7fa;
  --bg-overlay: #f0f2f5;
  --input-bg: #ffffff;
  --input-border: #dde1e6;
}

html[data-theme="dark"] {
  --sidebar-bg: #0d1117;
  --sidebar-hover: #161b22;
  --sidebar-active: #1565c0;
  --topbar-bg: #161b22;
  --content-bg: #111820;
  --card-bg: #161b22;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border: #30363d;
  --shadow: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.4);
  --bg-white: #161b22;
  --bg-light: #1c2128;
  --bg-hover: #1c2128;
  --bg-overlay: #21262d;
  --input-bg: #0d1117;
  --input-border: #30363d;
  --zoho-blue: #1565c0;
  --zoho-blue-light: #42a5f5;
  color-scheme: dark;
}

body { font-family: 'Lato', sans-serif; background: var(--content-bg); color: var(--text-primary); display: flex; height: 100vh; overflow: hidden; font-size: 13px; transition: background-color 0.3s, color 0.3s; }

a { text-decoration: none; color: inherit; }
a.link-primary { color: var(--zoho-blue); }
a.link-primary:hover { color: var(--zoho-blue-light); text-decoration: underline; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #e65100, #ff6d00);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
}
.sidebar-logo .logo-text { color: white; font-size: 15px; font-weight: 700; }
.sidebar-logo .logo-sub { color: rgba(255,255,255,0.5); font-size: 10px; }

.sidebar-org {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-org .org-name { color: rgba(255,255,255,0.85); font-size: 12px; font-weight: 600; }
.sidebar-org .org-sub { color: rgba(255,255,255,0.4); font-size: 10px; }
.sidebar-org .chevron { color: rgba(255,255,255,0.4); font-size: 10px; }

.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-section-label {
  padding: 12px 16px 4px;
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.nav-item.active { background: rgba(15,76,129,0.6); color: #ffffff; border-left-color: #e65100; }
.nav-item .nav-icon { width: 16px; text-align: center; font-size: 14px; }
.nav-item .nav-badge,
.nav-item .badge {
  margin-left: auto;
  background: #e65100;
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-breadcrumb { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.topbar-btn:hover { border-color: var(--zoho-blue); color: var(--zoho-blue); }
.topbar-btn.primary { background: var(--zoho-blue); color: white; border-color: var(--zoho-blue); }
.topbar-btn.primary:hover { background: var(--zoho-blue-light); }
.topbar-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 16px;
  position: relative;
}
.topbar-icon-btn:hover { background: var(--bg-hover); }
.notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  background: #e65100;
  border-radius: 50%;
}
.avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0f4c81, #1565c0);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   CONTENT
   ========================================================================== */
.content { flex: 1; overflow-y: auto; padding: 20px; }
.content-inner { max-width: 1500px; margin-left: auto; margin-right: auto; width: 100%; box-sizing: border-box; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-family: 'Lato', sans-serif; font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   EMPLOYEE PROFILE
   ========================================================================== */
.profile-banner {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    overflow: hidden;
    border-top: 4px solid var(--zoho-blue);
}
.profile-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
}
.profile-header-left { display: flex; align-items: center; gap: 20px; }
.profile-header-right { flex-shrink: 0; display: flex; gap: 13px; }
.profile-photo-wrap { position: relative; flex-shrink: 0; }
.profile-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.profile-photo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}
.profile-photo-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.profile-photo-edit:hover { background: var(--zoho-blue); color: #fff; border-color: var(--zoho-blue); }
.profile-name { font-family: 'Lato', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0; }
.profile-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.profile-meta-dot { margin: 0 6px; color: #d0d0d0; }

/* Quick Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.profile-stat-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s;
}
.profile-stat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.profile-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-hover);
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.profile-stat-info { min-width: 0; }
.profile-stat-value { font-size: 16px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Body Layout */
.profile-body { display: flex; gap: 16px; }
.profile-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 6px 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
}
.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.profile-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.profile-nav-item.active {
    color: var(--zoho-blue);
    font-weight: 600;
    background: #f0f6ff;
    border-left-color: var(--zoho-blue);
}
.profile-nav-icon { width: 20px; text-align: center; color: #666; display: flex; align-items: center; justify-content: center; }
.profile-nav-item.active .profile-nav-icon { color: var(--zoho-blue); }
.profile-nav-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    background: #e8eaf6;
    color: var(--zoho-blue);
    padding: 1px 7px;
    border-radius: 10px;
}

/* Content Area */
.profile-content {
    flex: 1;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 24px 28px;
    min-height: 400px;
}
.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bg-overlay);
}
.profile-section-title { font-family: 'Lato', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0; }
.profile-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--zoho-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 28px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaf6;
}
.profile-group-title:first-of-type { margin-top: 0; }
.profile-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0 24px;
}
.profile-field {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.profile-field-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.profile-field-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Info Cards Grid (Profile tab) */
.info-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.info-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.info-card-full {
    grid-column: 1 / -1;
}
.info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--bg-overlay);
}
.info-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-card-icon-blue { background: #e3f2fd; color: #1565c0; }
.info-card-icon-indigo { background: #e8eaf6; color: #3949ab; }
.info-card-icon-amber { background: #fff8e1; color: #f57f17; }
.info-card-icon-green { background: #e8f5e9; color: #2e7d32; }
.info-card-icon-teal { background: #e0f2f1; color: #00796b; }
.info-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
}
.info-card-body {
    padding: 6px 20px 10px;
}
.info-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.info-card-row:last-child {
    border-bottom: none;
}
.info-card-label {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 12px;
}
.info-card-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}
.info-card-bank {
    padding: 8px 0;
}
.info-card-bank + .info-card-bank {
    border-top: 1px dashed #e0e0e0;
    margin-top: 4px;
    padding-top: 12px;
}
.info-card-bank-primary {
    position: relative;
}
.info-card-bank-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}
/* Address items inside full-width card */
.info-card-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 8px 0;
}
.info-card-address-item {
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--bg-overlay);
}
.info-card-address-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.info-card-address-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Leave Policy Cards */
.leave-policy-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}
.leave-policy-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.2s;
}
.leave-policy-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}
.leave-policy-accent {
    height: 4px;
    width: 100%;
}
.leave-policy-body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.leave-policy-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.leave-policy-code {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}
.leave-policy-name {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leave-policy-stats {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 16px;
}
.leave-policy-stat {
    text-align: center;
    flex: 1;
    padding: 8px 4px;
    background: var(--bg-light);
    border-radius: 8px;
}
.leave-policy-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    display: block;
}
.leave-policy-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    display: block;
    margin-top: 3px;
}
.leave-policy-bar {
    height: 6px;
    background: var(--bg-overlay);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}
.leave-policy-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.leave-policy-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

/* Salary cards */
.profile-salary-card {
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--bg-overlay);
}
.profile-salary-card-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.profile-salary-card-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }

/* Document grid */
.profile-doc-grid { display: flex; flex-direction: column; gap: 8px; }
.profile-doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--bg-overlay);
    border-radius: 8px;
    transition: all 0.15s;
}
.profile-doc-card:hover { border-color: var(--border); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.profile-doc-info { flex: 1; min-width: 0; }
.profile-doc-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Edit Form */
.edit-section { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.edit-section-title {
    font-family: 'Lato', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eef4;
}
.edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}
.edit-grid .form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}
.edit-grid .form-row .form-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.edit-grid .form-row .form-input,
.edit-grid .form-row select.form-input {
    padding: 9px 12px;
    font-size: 13px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.edit-grid .form-row .form-input:focus,
.edit-grid .form-row select.form-input:focus {
    border-color: var(--zoho-blue);
    box-shadow: 0 0 0 3px rgba(15,76,129,0.08);
}
.edit-grid .form-row .form-error {
    font-size: 11px;
    color: var(--zoho-red);
    margin-top: 4px;
}
.req { color: var(--zoho-red); font-weight: 400; }

/* Edit form - gross summary card */
.edit-summary-card {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f5e9 100%);
    border-radius: 8px;
    border: 1px solid #d6e4f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.edit-summary-card .summary-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.edit-summary-card .summary-value { font-size: 18px; font-weight: 700; color: var(--zoho-green); }

/* Edit form - sub-section group title */
.edit-group-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--zoho-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eef4;
    display: flex;
    align-items: center;
    gap: 8px;
}
.edit-group-title svg { opacity: 0.6; }

/* Multi-value rows (phones, emails) */
.multi-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px 14px;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.multi-row:hover { border-color: #d0d5dd; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.multi-row .form-input { border-color: transparent; background: var(--bg-light); padding: 8px 10px; }
.multi-row .form-input:focus { border-color: var(--zoho-blue); background: var(--input-bg); }
.multi-check {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}
.multi-check:hover { background: #f0f6ff; }
.multi-check input[type="checkbox"] { accent-color: var(--zoho-blue); }
.multi-remove {
    background: none;
    border: none;
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
}
.multi-remove:hover { color: var(--zoho-red); background: #fef2f2; }

/* Add row button */
.btn-add-row {
    background: var(--bg-white);
    border: 1px dashed #c5cdd8;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zoho-blue);
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-add-row:hover { border-color: var(--zoho-blue); background: #f0f6ff; box-shadow: 0 1px 3px rgba(15,76,129,0.08); }

/* Card-style entries (addresses, bank accounts) */
.address-card {
    padding: 18px;
    background: var(--bg-white);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.address-card:hover { border-color: #d0d5dd; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.address-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-overlay);
}
.address-card-header .multi-remove { margin-left: auto; }
.address-card .edit-grid .form-row .form-input { background: var(--bg-light); }
.address-card .edit-grid .form-row .form-input:focus { background: var(--input-bg); }

/* Bottom save bar */
.edit-bottom-bar {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8eef4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==========================================================================
   Salary Invoice-Style Components
   ========================================================================== */

/* Summary cards */
.sal-summary-card {
    background: var(--bg-white);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    border-top: 3px solid #e0e0e0;
}
.sal-summary-blue { border-top-color: var(--zoho-blue); }
.sal-summary-green { border-top-color: var(--zoho-green); }
.sal-summary-red { border-top-color: #c62828; }
.sal-summary-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.sal-summary-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }

/* Section blocks */
.sal-section {
    background: var(--bg-white);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.sal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--bg-overlay);
}
.sal-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sal-section-title svg { color: var(--text-muted); }
.sal-section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0 24px;
}

/* Line items */
.sal-line-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.sal-line-item:hover { background: var(--bg-light); }
.sal-line-item:last-of-type { border-bottom: none; }
.sal-line-accent {
    width: 4px;
    flex-shrink: 0;
}
.sal-line-body {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 14px 20px;
    gap: 16px;
}
.sal-line-info { flex: 1; min-width: 0; }
.sal-line-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.sal-line-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sal-line-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}
.sal-amount-red { color: #c62828; }
.sal-line-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.sal-badge-base { background: #e8eef4; color: #4a6785; }
.sal-line-actions { display: flex; align-items: center; gap: 6px; }
.sal-line-btn-del {
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    color: #bbb;
    cursor: pointer;
    transition: all 0.15s;
}
.sal-line-btn-del:hover { color: #c62828; background: #fef2f2; }

/* Line totals */
.sal-line-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-light);
    border-top: 2px solid #e8eef4;
}
.sal-total-green { color: var(--zoho-green); }
.sal-total-red { color: #c62828; }

/* Net pay banner */
.sal-net-pay {
    margin-top: 20px;
    background: linear-gradient(135deg, #eef3f9 0%, #e8f5e9 100%);
    border: 1px solid #d6e4f0;
    border-radius: 10px;
    overflow: hidden;
}
.sal-net-pay-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

/* Revision history items */
.sal-revision-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.sal-revision-item:hover { background: var(--bg-light); }
.sal-revision-item:last-child { border-bottom: none; }
.sal-revision-date {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    padding: 6px 0;
}
.sal-revision-day {
    font-size: 20px;
    font-weight: 700;
    color: var(--zoho-blue);
    line-height: 1;
}
.sal-revision-month {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 3px;
}
.sal-revision-body { flex: 1; min-width: 0; }
.sal-revision-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.sal-revision-notes {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.sal-revision-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Salary modals */
.sal-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.sal-modal {
    background: var(--bg-white);
    border-radius: 12px;
    width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.sal-modal-wide { width: 560px; }
.sal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-overlay);
}
.sal-modal-header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.sal-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.sal-modal-close:hover { color: var(--text-primary); }
.sal-modal-body { padding: 20px; }
.sal-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--bg-overlay);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Salary edit rows (in edit form) */
.sal-edit-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}
.sal-edit-row:last-of-type { border-bottom: none; }
.sal-edit-accent { width: 4px; flex-shrink: 0; }
.sal-edit-body {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 14px 20px;
    gap: 16px;
}
.sal-edit-info { flex: 1; min-width: 0; }
.sal-edit-input { width: 180px; flex-shrink: 0; }
.sal-edit-input .form-input {
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}

/* Small button variant */
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Toggle switch */
.toggle-switch { position: relative; }
.toggle-switch input { display: none; }
.toggle-slider {
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #cdd5de;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    vertical-align: middle;
    flex-shrink: 0;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--zoho-blue); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(16px); }

/* Payslip Modal */
.payslip-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.payslip-modal-overlay.active { display: flex; }
.payslip-modal {
    background: var(--bg-white);
    border-radius: 12px;
    width: 720px;
    max-width: 92vw;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.25s ease-out;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.payslip-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #9e9e9e;
    cursor: pointer;
    z-index: 10;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}
.payslip-modal-close:hover { background: var(--bg-overlay); color: var(--text-primary); }
.payslip-modal-body {
    overflow-y: auto;
    max-height: 90vh;
    padding: 28px 32px;
}
.payslip-modal-body .payslip-preview {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: none;
}
.payslip-modal-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 4px;
    margin-top: 16px;
    border-top: 1px solid var(--bg-overlay);
    background: var(--bg-white);
}
.payslip-modal-download .btn { padding: 10px 28px; font-size: 13px; font-weight: 600; border-radius: 6px; }

/* ==========================================================================
   TABS
   ========================================================================== */
.page-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}
.page-tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.page-tab:hover { color: var(--zoho-blue); }
.page-tab.active { color: var(--zoho-blue); border-bottom-color: var(--zoho-blue); font-weight: 600; }

/* ==========================================================================
   CARDS & STAT CARDS
   ========================================================================== */
.cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); }
.stat-card { border-top: 3px solid var(--zoho-blue); }
.stat-card.green { border-top-color: var(--zoho-green); }
.stat-card.orange { border-top-color: #e65100; }
.stat-card.red { border-top-color: var(--zoho-red); }

.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 11px; margin-top: 6px; }
.stat-change.up { color: var(--zoho-green); }
.stat-change.down { color: var(--zoho-red); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.three-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-overlay);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.card-action { font-size: 11px; color: var(--zoho-blue); cursor: pointer; text-decoration: none; }
.card-action:hover { text-decoration: underline; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-light);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}
tr:hover td { background: var(--bg-hover); }

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-gray { background: var(--bg-hover); color: var(--text-secondary); }

/* ==========================================================================
   PAYRUN PROGRESS STEPS
   ========================================================================== */
.payrun-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.step-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-done { background: var(--zoho-green); color: white; }
.step-active { background: var(--zoho-blue); color: white; }
.step-todo { background: #e0e0e0; color: #9e9e9e; }
.step-label { flex: 1; }
.step-status { color: var(--text-muted); font-size: 11px; }

/* ==========================================================================
   CHART BARS (fallback for non-Chart.js)
   ========================================================================== */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 100px; padding-top: 10px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--zoho-blue), #1565c0);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: opacity 0.2s;
}
.chart-bar:hover { opacity: 0.8; }
.chart-bar.highlight { background: linear-gradient(180deg, #e65100, #ff6d00); }
.chart-label { font-size: 9px; color: var(--text-muted); }

/* ==========================================================================
   TODO LIST
   ========================================================================== */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.todo-item:hover { background: var(--bg-hover); margin: 0 -16px; padding: 9px 16px; }
.todo-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.todo-title { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.todo-desc { font-size: 11px; color: var(--text-muted); }
.todo-due { font-size: 10px; color: #e65100; margin-top: 2px; }

/* ==========================================================================
   EMPLOYEE SUMMARY
   ========================================================================== */
.emp-stat-row { display: flex; gap: 16px; margin-bottom: 12px; }
.emp-stat { flex: 1; text-align: center; padding: 10px; background: var(--bg-light); border-radius: 6px; }
.emp-stat-num { font-size: 22px; font-weight: 700; color: var(--zoho-blue); }
.emp-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   TAX SECTION
   ========================================================================== */
.tax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.tax-name, .tax-label { color: var(--text-secondary); }
.tax-amt, .tax-value { font-weight: 600; color: var(--text-primary); }
.tax-row.total {
  border-top: 2px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
  font-weight: 700;
}
.tax-row.total .tax-label,
.tax-row.total .tax-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress-wrap { margin: 4px 0; }
.progress-track { height: 5px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--zoho-blue); }

.progress { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; background: var(--zoho-blue); transition: width 0.4s ease; }
.progress-bar.green { background: var(--zoho-green); }
.progress-bar.orange { background: var(--zoho-orange); }
.progress-bar.red { background: var(--zoho-red); }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   EMPLOYEE TABLE
   ========================================================================== */
.emp-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 11px; font-weight: 700; color: white;
  flex-shrink: 0;
}
div.emp-avatar {
  display: flex; align-items: center; justify-content: center;
}
.emp-cell { display: flex; align-items: center; gap: 8px; }
.emp-name { font-size: 12px; font-weight: 600; }
.emp-id { font-size: 10px; color: var(--text-muted); }

/* ==========================================================================
   RUN PAYROLL BANNER
   ========================================================================== */
.run-payroll-banner {
  background: linear-gradient(135deg, #0f4c81 0%, #1565c0 100%);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}
.run-banner-title { font-size: 15px; font-weight: 700; }
.run-banner-sub { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.run-btn {
  background: white;
  color: var(--zoho-blue);
  border: none;
  padding: 9px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.run-btn:hover { background: #e3f2fd; }

/* ==========================================================================
   NOTIFICATION PANEL
   ========================================================================== */
.notif-panel {
  position: absolute;
  top: 52px; right: 16px;
  width: 320px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  display: none;
}
.notif-panel.open { display: block; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; }
.notif-item { padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-item:hover { background: var(--bg-light); }
.notif-item-title { font-size: 12px; font-weight: 600; }
.notif-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-item-time { font-size: 10px; color: var(--text-muted); }

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8c8c8; border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   MODAL & FORMS
   ========================================================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; display: none; align-items: center; justify-content: center; }
.modal-overlay.open, .modal-overlay.active { display: flex; }
.modal { background: var(--bg-white); border-radius: 8px; width: 480px; max-width: 90vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Holiday Modal */
.holiday-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--bg-overlay);
    background: var(--bg-light);
    border-radius: 8px 8px 0 0;
}
.holiday-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0f4c81;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.holiday-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.holiday-modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.holiday-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.holiday-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.holiday-form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.holiday-form-input {
    padding: 10px 14px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--input-bg);
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}
.holiday-form-input:focus {
    border-color: var(--zoho-blue);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.08);
}
.holiday-form-input::placeholder {
    color: #bbb;
}
.holiday-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
}
.holiday-type-option {
    cursor: pointer;
}
.holiday-type-option input[type="radio"] {
    display: none;
}
.holiday-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-white);
    transition: all 0.2s;
    text-align: center;
}
.holiday-type-card:hover {
    border-color: var(--type-color);
    background: var(--type-bg);
}
.holiday-type-option input[type="radio"]:checked + .holiday-type-card {
    border-color: var(--type-color);
    background: var(--type-bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--type-color) 15%, transparent);
}
.holiday-type-icon {
    font-size: 20px;
    line-height: 1;
}
.holiday-type-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--type-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.holiday-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--bg-overlay);
    background: var(--bg-light);
    border-radius: 0 0 8px 8px;
}

/* Holiday List */
.holiday-list { padding: 4px 0; }
.holiday-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--bg-overlay);
    transition: background 0.15s;
    position: relative;
}
.holiday-row:last-child { border-bottom: none; }
.holiday-row:hover { background: var(--bg-light); }
.holiday-row-accent {
    width: 4px;
    height: 36px;
    border-radius: 4px;
    background: var(--h-color);
    flex-shrink: 0;
}
.holiday-row-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    padding: 6px 8px;
    background: var(--h-bg);
    border-radius: 8px;
    flex-shrink: 0;
}
.holiday-row-day {
    font-size: 20px;
    font-weight: 700;
    color: var(--h-color);
    line-height: 1.1;
}
.holiday-row-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--h-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.holiday-row-weekday {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}
.holiday-row-info {
    flex: 1;
    min-width: 0;
}
.holiday-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.holiday-row-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.holiday-row-type { flex-shrink: 0; }
.holiday-row-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.holiday-delete-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
}
.holiday-delete-btn:hover {
    color: var(--zoho-red);
    background: #fdeeed;
}

/* Calendar View */
.cal-container { }
.cal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cal-month-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}
.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    transition: all 0.15s;
    text-decoration: none;
}
.cal-nav-btn:hover { background: #e8e8ec; color: var(--text-primary); }
.cal-today-btn {
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--zoho-blue);
    background: #e8f0fe;
    text-decoration: none;
    transition: all 0.15s;
}
.cal-today-btn:hover { background: #d2e3fc; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.cal-weekday {
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.cal-weekday-end { color: #bbb; }
.cal-cell {
    min-height: 110px;
    padding: 8px 10px;
    border-right: 1px solid var(--bg-overlay);
    border-bottom: 1px solid var(--bg-overlay);
    transition: background 0.15s;
    position: relative;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg-hover); }
.cal-cell-empty { background: var(--bg-light); }
.cal-cell-empty:hover { background: var(--bg-light); }
.cal-cell-weekend { background: var(--bg-light); }
.cal-cell-weekend:hover { background: var(--bg-hover); }
.cal-cell-today { background: #f0f6ff; }
.cal-cell-today:hover { background: #e5effc; }
.cal-cell-holiday { background: #faf8ff; }
.cal-day-number {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.cal-day-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--zoho-blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.cal-events { display: flex; flex-direction: column; gap: 3px; }
.cal-event {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ev-color);
    background: var(--ev-bg);
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    border-left: 3px solid var(--ev-color);
    transition: opacity 0.15s;
}
.cal-event-text { min-width: 0; }
.cal-event-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-sub { font-size: 10px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event:hover { opacity: 0.85; }
.cal-event-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.cal-event-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.cal-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cal-event-more {
    font-size: 10px;
    font-weight: 600;
    color: #1565c0;
    padding: 1px 7px;
    cursor: default;
}

.cal-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 20px;
    margin-top: 12px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.cal-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid;
}

/* Leave Filter Bar */
.leave-filter-bar {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.leave-filter-form { width: 100%; }
.leave-filter-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.leave-filter-item { display: flex; flex-direction: column; gap: 4px; }
.leave-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.leave-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-light);
    outline: none;
    transition: border-color 0.15s;
    min-width: 150px;
}
.leave-filter-select:focus { border-color: var(--zoho-blue); background: var(--input-bg); }

/* Leave List */
.leave-list { padding: 4px 0; }
.leave-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--bg-overlay);
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}
.leave-row:last-child { border-bottom: none; }
.leave-row:hover { background: var(--bg-light); }
.leave-row-accent {
    width: 4px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}
.leave-row-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.leave-row-info { min-width: 140px; }
.leave-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.leave-row-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}
.leave-row-type {
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
}
.leave-row-type-code {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.leave-row-type-name {
    font-size: 11px;
    color: var(--text-muted);
}
.leave-row-dates {
    flex: 1;
    min-width: 160px;
}
.leave-row-date-range {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}
.leave-row-days {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    padding-left: 20px;
}
.leave-row-status { flex-shrink: 0; }
.leave-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.leave-row-applied {
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}
.leave-row-arrow {
    color: #ccc;
    flex-shrink: 0;
    transition: color 0.15s;
}
.leave-row:hover .leave-row-arrow { color: var(--zoho-blue); }

/* Leave Apply Modal */
.leave-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--bg-overlay);
}
.leave-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e3f2fd;
    color: #1565c0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.leave-modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.leave-modal-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.leave-modal-body { padding: 20px 24px; }
.leave-form-row { margin-bottom: 16px; }
.leave-form-row:last-child { margin-bottom: 0; }
.leave-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.leave-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--input-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-light);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}
.leave-form-input:focus {
    border-color: var(--zoho-blue);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(15,76,129,0.08);
}
.leave-form-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.leave-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.leave-type-chip input[type="radio"] { display: none; }
.leave-type-chip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid var(--input-border);
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.15s;
    min-width: 64px;
}
.leave-type-chip-inner:hover {
    border-color: var(--lt-color);
    background: var(--lt-bg);
}
.leave-type-chip input[type="radio"]:checked + .leave-type-chip-inner {
    border-color: var(--lt-color);
    background: var(--lt-bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lt-color) 15%, transparent);
}
.leave-type-chip-code {
    font-size: 16px;
    font-weight: 800;
    color: var(--lt-color);
    line-height: 1.2;
}
.leave-type-chip-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}
.leave-type-chip input[type="radio"]:checked + .leave-type-chip-inner .leave-type-chip-name {
    color: var(--lt-color);
}
/* Employee Autocomplete */
.emp-autocomplete { position: relative; }
.emp-ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}
.emp-ac-dropdown.open { display: block; }
.emp-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.12s;
}
.emp-ac-item:first-child { border-radius: 10px 10px 0 0; }
.emp-ac-item:last-child { border-radius: 0 0 10px 10px; }
.emp-ac-item:hover { background: #f0f6ff; }
.emp-ac-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.emp-ac-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.emp-ac-info { min-width: 0; }
.emp-ac-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.emp-ac-code {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}
.emp-ac-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.leave-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--bg-overlay);
    background: var(--bg-light);
    border-radius: 0 0 8px 8px;
}

/* Leave Balance Table */
.lb-container { }
.lb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 14px 20px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.lb-year-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}
.lb-table-wrap {
    overflow-x: auto;
}
.lb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.lb-table thead { }
.lb-th-employee {
    position: sticky;
    left: 0;
    background: var(--bg-light);
    z-index: 2;
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid #eef0f3;
    min-width: 200px;
}
.lb-th-type {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 2px solid var(--border);
    background: var(--bg-light);
    min-width: 110px;
}
.lb-th-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.lb-th-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}
.lb-row { transition: background 0.15s; }
.lb-row:nth-child(even) { background: var(--bg-light); }
.lb-row:nth-child(even) .lb-td-employee { background: var(--bg-light); }
.lb-row:hover, .lb-row:hover .lb-td-employee { background: var(--bg-overlay); }
.lb-td-employee {
    position: sticky;
    left: 0;
    background: var(--bg-white);
    z-index: 1;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f2f5;
}
.lb-row:hover .lb-td-employee { background: var(--bg-hover); }
.lb-emp {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lb-emp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.lb-emp-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.lb-emp-code {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}
.lb-td-balance {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f2f5;
    text-align: center;
}
.lb-balance-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.lb-balance-nums {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.lb-balance-used {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}
.lb-balance-sep {
    font-size: 13px;
    color: #ccc;
    font-weight: 400;
}
.lb-balance-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.lb-balance-bar {
    width: 56px;
    height: 5px;
    background: #eef0f3;
    border-radius: 3px;
    overflow: hidden;
}
.lb-balance-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.lb-balance-remaining {
    font-size: 10px;
    font-weight: 500;
}

.form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form-col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; display: block; }
.form-label .required { color: var(--zoho-red); }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--input-bg);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--zoho-blue); box-shadow: 0 0 0 2px rgba(15,76,129,0.1); }
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled { background: var(--bg-hover); cursor: not-allowed; color: var(--text-muted); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616161' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] { accent-color: var(--zoho-blue); }

/* Form validation */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid { border-color: var(--zoho-red); }
.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus { box-shadow: 0 0 0 2px rgba(198,40,40,0.1); }
.invalid-feedback { font-size: 11px; color: var(--zoho-red); margin-top: 4px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--zoho-blue); color: white; border-color: var(--zoho-blue); }
.btn-primary:hover:not(:disabled) { background: var(--zoho-blue-light); }
.btn-secondary { background: var(--bg-white); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--zoho-blue); color: var(--zoho-blue); }
.btn-success { background: var(--zoho-green); color: white; border-color: var(--zoho-green); }
.btn-success:hover:not(:disabled) { background: #1b5e20; }
.btn-danger { background: var(--zoho-red); color: white; border-color: var(--zoho-red); }
.btn-danger:hover:not(:disabled) { background: #b71c1c; }
.btn-warning { background: #e65100; color: white; border-color: #e65100; }
.btn-warning:hover:not(:disabled) { background: #bf360c; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }
.btn-link { background: none; border: none; color: var(--zoho-blue); padding: 0; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }

/* ==========================================================================
   PAGE LAYOUT ELEMENTS
   ========================================================================== */
.page-view { display: none; }
.page-view.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 18px; font-weight: 700; }
.page-header .page-actions { display: flex; gap: 8px; }

/* ==========================================================================
   SEARCH & FILTER
   ========================================================================== */
.search-bar {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  gap: 8px;
  background: var(--input-bg);
  width: 240px;
}
.search-bar:focus-within { border-color: var(--zoho-blue); box-shadow: 0 0 0 2px rgba(15,76,129,0.1); }
.search-bar .search-icon { color: var(--text-muted); font-size: 14px; }
.search-bar input { border: none; outline: none; font-size: 13px; width: 100%; background: transparent; color: var(--text-primary); }
.search-bar input::placeholder { color: var(--text-muted); }

.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-bar .filter-group { display: flex; align-items: center; gap: 6px; }
.filter-bar label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.filter-select,
.filter-bar select,
.filter-bar input[type="date"],
.filter-bar input[type="month"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: var(--input-bg);
  color: var(--text-secondary);
  outline: none;
  height: 32px;
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--zoho-blue); }

/* ==========================================================================
   PAY RUNS WIZARD STEPS
   ========================================================================== */
.run-steps { display: flex; gap: 0; margin-bottom: 20px; }
.run-step-item {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.run-step-item:not(:last-child) { border-right: none; }
.run-step-item:first-child { border-radius: 4px 0 0 4px; }
.run-step-item:last-child { border-radius: 0 4px 4px 0; }
.run-step-item.active { background: #e3f2fd; border-color: var(--zoho-blue); }
.run-step-num { width: 22px; height: 22px; border-radius: 50%; background: #e0e0e0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #757575; }
.run-step-item.active .run-step-num { background: var(--zoho-blue); color: white; }
.run-step-item.done .run-step-num { background: var(--zoho-green); color: white; }
.run-step-lbl { font-size: 12px; color: var(--text-secondary); }
.run-step-item.active .run-step-lbl { color: var(--zoho-blue); font-weight: 600; }

/* ==========================================================================
   REPORTS
   ========================================================================== */
.reports-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.report-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.report-card:hover { border-color: var(--zoho-blue); box-shadow: var(--shadow-md); }
.report-icon { font-size: 24px; }
.report-name { font-size: 13px; font-weight: 600; }
.report-desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.report-card .report-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 0;
}
.report-card .report-icon.blue { background: #e3f2fd; color: var(--zoho-blue); }
.report-card .report-icon.green { background: #e8f5e9; color: var(--zoho-green); }
.report-card .report-icon.orange { background: #fff3e0; color: var(--zoho-orange); }
.report-card .report-icon.red { background: #ffebee; color: var(--zoho-red); }
.report-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.report-card p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ==========================================================================
   SETTINGS
   ========================================================================== */
.settings-layout { display: flex; gap: 24px; }
.settings-menu { width: 220px; flex-shrink: 0; display: flex; gap: 0; flex-wrap: wrap; }
.settings-tab { padding: 8px 16px; cursor: pointer; font-size: 12px; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all 0.15s; }
.settings-tab.active { color: var(--zoho-blue); border-bottom-color: var(--zoho-blue); font-weight: 600; }
.settings-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 4px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
  width: 100%;
}
.settings-menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-menu-item.active { background: #e3f2fd; color: var(--zoho-blue); font-weight: 600; }
.settings-menu-item .settings-icon { width: 18px; text-align: center; font-size: 14px; }
.settings-content { flex: 1; }
.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.settings-section p { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.setting-item { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.setting-name { font-size: 13px; font-weight: 600; }
.setting-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.toggle {
  width: 36px; height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle.on { background: var(--zoho-blue); }
.toggle::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 0.2s;
}
.toggle.on::after { left: 18px; }

/* ==========================================================================
   PAYSLIP PREVIEW
   ========================================================================== */
.payslip {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 4px;
}
.payslip-preview {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}
.payslip-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--zoho-blue); }
.payslip-company { font-size: 16px; font-weight: 700; color: var(--zoho-blue); }
.payslip-company h2 { font-size: 26px; font-weight: 700; color: var(--zoho-blue); margin-bottom: -11px; }
.payslip-company p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.payslip-period { font-size: 12px; color: var(--text-muted); }
.payslip-title { text-align: right; }
.payslip-title h3 { font-size: 18px; font-weight: 700; text-transform: uppercase; color: var(--text-primary); }
.payslip-title p { font-size: 13px; color: var(--text-muted); }
.payslip-divider { border: none; border-top: 2px solid var(--zoho-blue); margin: 12px 0; }
.payslip-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin: 12px 0 6px; }
.payslip-employee-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; margin-bottom: 24px; font-size: 13px; }
.payslip-employee-info .info-row { display: flex; }
.payslip-employee-info .info-label { width: 120px; color: var(--text-muted); flex-shrink: 0; }
.payslip-employee-info .info-value { font-weight: 600; color: var(--text-primary); }
.payslip-earnings-deductions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.payslip-section { display: flex; flex-direction: column; }
.payslip-section h4 { font-size: 15px; font-weight: 700; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.payslip-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.payslip-row.total { border-top: 1px solid var(--border); margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 15px; }
.payslip-total { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; font-weight: 700; border-top: 2px solid var(--border); margin-top: 8px; }
.payslip-net {
  background: var(--zoho-blue);
  color: #fff;
  padding: 14px 20px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}
.payslip-net-label { font-size: 15px; font-weight: 700; }
.payslip-net-amount { font-size: 22px; font-weight: 700; }

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash-message {
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: flashSlideIn 0.3s ease;
}
.flash-message .flash-close { background: none; border: none; font-size: 16px; cursor: pointer; opacity: 0.6; color: inherit; padding: 0 0 0 12px; }
.flash-message .flash-close:hover { opacity: 1; }
.flash-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.flash-error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.flash-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.flash-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

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

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 20px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-white); cursor: pointer; transition: all 0.15s;
  text-decoration: none;
}
.page-link:hover { border-color: var(--zoho-blue); color: var(--zoho-blue); background: var(--bg-hover); }
.page-link.active { background: var(--zoho-blue); color: #fff; border-color: var(--zoho-blue); }
.page-link.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pagination-info { font-size: 12px; color: var(--text-muted); margin-right: 12px; }

/* ==========================================================================
   FILE UPLOAD
   ========================================================================== */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-light);
}
.file-upload-area:hover,
.file-upload-area.drag-over { border-color: var(--zoho-blue); background: var(--bg-hover); }
.file-upload-area .upload-icon { font-size: 36px; color: var(--text-muted); margin-bottom: 12px; }
.file-upload-area .upload-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.file-upload-area .upload-hint { font-size: 12px; color: var(--text-muted); }
.file-upload-area input[type="file"] { display: none; }

/* ==========================================================================
   KANBAN BOARD
   ========================================================================== */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 400px; }
.kanban-column { min-width: 280px; max-width: 320px; background: var(--content-bg); border-radius: 8px; display: flex; flex-direction: column; flex-shrink: 0; }
.kanban-column-header {
  padding: 12px 16px; font-size: 13px; font-weight: 700;
  color: var(--text-primary); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 2px solid var(--border);
}
.kanban-column-header .column-count { background: var(--border); padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--text-secondary); }
.kanban-column-body { flex: 1; padding: 8px; overflow-y: auto; }
.kanban-card {
  background: var(--bg-white); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px; margin-bottom: 8px; cursor: grab;
  box-shadow: var(--shadow); transition: box-shadow 0.15s;
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card:active { cursor: grabbing; }
.kanban-card h5 { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.kanban-card p { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ==========================================================================
   DROPDOWN MENUS
   ========================================================================== */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle {
  background: none; border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 4px; cursor: pointer;
  font-size: 14px; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 4px;
}
.dropdown-toggle:hover { border-color: var(--zoho-blue); color: var(--zoho-blue); }
.dropdown-menu {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 6px; box-shadow: var(--shadow-md);
  min-width: 180px; z-index: 100; padding: 4px 0; display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; color: var(--text-primary); cursor: pointer; transition: background 0.1s; }
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--zoho-red); }
.dropdown-item.danger:hover { background: #ffebee; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--zoho-blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
.spinner.lg { width: 40px; height: 40px; border-width: 4px; }
.loading-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.75); display: flex; align-items: center; justify-content: center; z-index: 50; border-radius: inherit; }
html[data-theme="dark"] .loading-overlay { background: rgba(13,17,23,0.75); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   ATTENDANCE MATRIX
   ========================================================================== */
/* Attendance Filter Bar */
.att-filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.att-filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.att-filter-group {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.att-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.att-filter-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.att-filter-select,
.att-filter-input {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-light);
    outline: none;
    transition: all 0.2s;
}
.att-filter-select:focus,
.att-filter-input:focus {
    border-color: var(--zoho-blue);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.08);
}
.att-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.att-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 14px;
    margin-top: 2px;
    border-top: 1px solid var(--bg-overlay);
}
.att-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}
.att-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.attendance-matrix { overflow: auto; max-height: 600px; border: 1px solid var(--border); border-radius: 6px; }
.attendance-matrix table { border-collapse: separate; border-spacing: 0; }
.attendance-matrix thead th { position: sticky; top: 0; z-index: 10; background: var(--bg-hover); border-bottom: 2px solid var(--border); }
.attendance-matrix tbody td:first-child,
.attendance-matrix thead th:first-child { position: sticky; left: 0; z-index: 5; background: var(--bg-hover); border-right: 2px solid var(--border); min-width: 180px; }
.attendance-matrix thead th:first-child { z-index: 15; }
.attendance-matrix tbody td { text-align: center; padding: 6px 8px; min-width: 36px; font-size: 11px; }
.attendance-matrix .att-present { color: var(--zoho-green); font-weight: 700; }
.attendance-matrix .att-absent { color: var(--zoho-red); font-weight: 700; }
.attendance-matrix .att-half { color: var(--zoho-orange); font-weight: 700; }
.attendance-matrix .att-leave { color: var(--zoho-blue); font-weight: 700; }
.attendance-matrix .att-holiday { background: var(--bg-hover); color: var(--text-muted); }
.attendance-matrix .att-weekend { background: var(--bg-light); color: var(--text-muted); }

/* ==========================================================================
   CALENDAR
   ========================================================================== */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.calendar-header { background: var(--bg-hover); padding: 10px; text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.calendar-day { background: var(--bg-white); padding: 8px; min-height: 80px; font-size: 12px; }
.calendar-day.other-month { background: var(--bg-light); color: var(--text-muted); }
.calendar-day .day-num { font-weight: 600; margin-bottom: 4px; }
.calendar-day.today .day-num { background: var(--zoho-blue); color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.calendar-event { font-size: 10px; padding: 2px 4px; border-radius: 3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event.holiday { background: #ffebee; color: var(--zoho-red); }
.calendar-event.leave { background: #e3f2fd; color: var(--zoho-blue); }
.calendar-event.payroll { background: #fff3e0; color: var(--zoho-orange); }

/* ==========================================================================
   LEAVE BALANCE MATRIX
   ========================================================================== */
.leave-balance-grid { overflow-x: auto; }
.leave-balance-grid table th,
.leave-balance-grid table td { text-align: center; min-width: 80px; }

/* ==========================================================================
   EMPLOYEE PROFILE TABS
   ========================================================================== */
.profile-header {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: 6px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #0f4c81, #1565c0);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 24px; font-weight: 700; flex-shrink: 0;
}
.profile-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-info .profile-meta { font-size: 12px; color: var(--text-muted); }
.profile-info .profile-meta span { margin-right: 16px; }

.tab-nav { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-nav a {
  padding: 10px 20px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s;
}
.tab-nav a:hover { color: var(--zoho-blue); }
.tab-nav a.active { color: var(--zoho-blue); border-bottom-color: var(--zoho-blue); font-weight: 600; }

/* ==========================================================================
   SUMMARY STATS (used in employee summary, etc.)
   ========================================================================== */
.employee-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.summary-item { text-align: center; padding: 14px; background: var(--card-bg); border-radius: 6px; border: 1px solid var(--border); }
.summary-item .summary-value { font-size: 24px; font-weight: 700; color: var(--zoho-blue); }
.summary-item .summary-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; letter-spacing: 0.3px; }

/* ==========================================================================
   GETTING STARTED
   ========================================================================== */
.getting-started { max-width: 700px; margin: 0 auto; }
.getting-started-step { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--bg-overlay); }
.getting-started-step:last-child { border-bottom: none; }
.getting-started-step .gs-num { width: 32px; height: 32px; border-radius: 50%; background: #e3f2fd; color: var(--zoho-blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.getting-started-step.done .gs-num { background: #e8f5e9; color: var(--zoho-green); }
.getting-started-step .gs-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.getting-started-step .gs-content p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }

.gs-step { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.gs-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.gs-done { background: var(--zoho-green); color: white; }
.gs-pending { background: #e3f2fd; color: var(--zoho-blue); border: 2px solid var(--zoho-blue); }
.gs-title { font-size: 13px; font-weight: 600; }
.gs-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.gs-cta { margin-left: auto; }

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--zoho-blue); }
.text-success { color: var(--zoho-green); }
.text-danger { color: var(--zoho-red); }
.text-warning { color: var(--zoho-orange); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none; }
.visible { display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .cards-row { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-row { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
/* Loan Stats */
.loan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.loan-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}
.loan-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.loan-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.loan-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.loan-stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}
.loan-stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Loan List */
.loan-list { padding: 4px 0; }
.loan-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--bg-overlay);
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}
.loan-row:last-child { border-bottom: none; }
.loan-row:hover { background: var(--bg-light); }
.loan-row-accent {
    flex: 0 0 4px;
    width: 4px;
    height: 40px;
    border-radius: 4px;
}
.loan-row-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.loan-row-info { flex: 1 1 150px; min-width: 120px; }
.loan-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.loan-row-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}
.loan-row-type {
    flex: 0 0 120px;
    width: 120px;
}
.loan-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.loan-row-amount {
    flex: 0 0 130px;
    width: 130px;
}
.loan-row-amount-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.loan-row-amount-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}
.loan-row-emi {
    flex: 0 0 110px;
    width: 110px;
    text-align: center;
}
.loan-row-emi-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.loan-row-emi-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--zoho-green);
}
.loan-row-emi-tenure {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}
.loan-row-status { flex: 0 0 90px; width: 90px; }
.loan-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.loan-row-arrow {
    flex: 0 0 16px;
    color: #ccc;
    transition: color 0.15s;
}
.loan-row:hover .loan-row-arrow { color: var(--zoho-blue); }

@media (max-width: 900px) {
    .loan-row { flex-wrap: wrap; gap: 10px; }
    .loan-row-emi { text-align: left; }
    .loan-row-accent { display: none; }
}

/* Loan Detail Modal */
.loan-detail-modal {
    background: var(--bg-white);
    border-radius: 12px;
    width: 700px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    overflow: hidden;
}
.loan-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    flex-shrink: 0;
}
.loan-detail-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.loan-detail-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.loan-detail-emp-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.loan-detail-emp-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.loan-detail-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.loan-detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.loan-detail-metric {
    padding: 16px 12px;
    text-align: center;
}
.loan-detail-metric + .loan-detail-metric {
    border-left: 1px solid #eee;
}
.loan-detail-metric-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.loan-detail-metric-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}
.loan-detail-metric-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}
.loan-detail-info-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.loan-detail-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}
.loan-detail-info-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}
.loan-detail-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.loan-detail-schedule-wrap {
    max-height: 260px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}
.loan-detail-schedule {
    width: 100%;
    border-collapse: collapse;
}
.loan-detail-schedule thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-light);
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}
.loan-detail-schedule td {
    padding: 7px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
}
.loan-detail-schedule tr:last-child td { border-bottom: none; }
.loan-detail-schedule tr:hover td { background: var(--bg-hover); }

/* ==========================================================================
   DARK MODE COMPONENT OVERRIDES
   ========================================================================== */
html[data-theme="dark"] .badge-success { background: #1a3a2a; color: #4caf50; }
html[data-theme="dark"] .badge-warning { background: #3d2600; color: #ff9800; }
html[data-theme="dark"] .badge-info { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .badge-danger { background: #3d1010; color: #ef5350; }
html[data-theme="dark"] .flash-success { background: #1a3a2a; color: #66bb6a; border-color: #2e7d32; }
html[data-theme="dark"] .flash-error { background: #3d1010; color: #ef9a9a; border-color: #c62828; }
html[data-theme="dark"] .flash-warning { background: #3d2600; color: #ffb74d; border-color: #e65100; }
html[data-theme="dark"] .flash-info { background: #0d2744; color: #64b5f6; border-color: #1565c0; }
html[data-theme="dark"] .sal-modal-overlay { background: rgba(0,0,0,0.6); }
html[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
html[data-theme="dark"] .payslip-modal-overlay { background: rgba(0,0,0,0.65); }
/* Payslip modal always stays light — reset CSS variables to light values */
html[data-theme="dark"] .payslip-modal {
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-overlay: #f0f2f5;
    --bg-hover: #f5f7fa;
    --text-primary: #1a2332;
    --text-secondary: #616161;
    --text-muted: #9e9e9e;
    --border: #e0e0e0;
    --zoho-blue: #0f4c81;
    --zoho-blue-light: #1565c0;
    --input-bg: #ffffff;
    --input-border: #dde1e6;
    background: #ffffff;
    color: #1a2332;
    color-scheme: light;
}
html[data-theme="dark"] .payslip-modal-close { color: #9e9e9e; }
html[data-theme="dark"] .payslip-modal-close:hover { background: #f0f2f5; color: #1a2332; }
html[data-theme="dark"] .payslip-modal-download { background: #ffffff; }
html[data-theme="dark"] .payslip-modal-download .toggle-slider { background: #ccc; }
html[data-theme="dark"] .payslip-modal-download span { color: #616161 !important; }
html[data-theme="dark"] .cal-cell-today { background: #0d2744; }
html[data-theme="dark"] .cal-cell-today:hover { background: #112d4e; }
html[data-theme="dark"] .cal-cell-holiday { background: #1a1030; }
html[data-theme="dark"] .run-step-item.active { background: #0d2744; }
html[data-theme="dark"] .settings-menu-item.active { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .profile-nav-item.active { background: #0d2744; }
html[data-theme="dark"] .profile-nav-count { background: #0d2744; }
html[data-theme="dark"] .info-card-icon-blue { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .info-card-icon-indigo { background: #1a1540; color: #7986cb; }
html[data-theme="dark"] .info-card-icon-amber { background: #3d2600; color: #ffb74d; }
html[data-theme="dark"] .info-card-icon-green { background: #1a3a2a; color: #66bb6a; }
html[data-theme="dark"] .info-card-icon-teal { background: #0a3030; color: #4db6ac; }
html[data-theme="dark"] .sal-badge-base { background: #1c2a3d; color: #8b949e; }
html[data-theme="dark"] .edit-summary-card { background: linear-gradient(135deg, #0d2744 0%, #1a3a2a 100%); border-color: #30363d; }
html[data-theme="dark"] .sal-net-pay { background: linear-gradient(135deg, #0d2744 0%, #1a3a2a 100%); border-color: #30363d; color: #e6edf3; }
html[data-theme="dark"] .loan-detail-header { background: linear-gradient(135deg, #161b22 0%, #1c2128 100%); border-color: #30363d; }
html[data-theme="dark"] .report-card .report-icon.blue { background: #0d2744; }
html[data-theme="dark"] .report-card .report-icon.green { background: #1a3a2a; }
html[data-theme="dark"] .report-card .report-icon.orange { background: #3d2600; }
html[data-theme="dark"] .report-card .report-icon.red { background: #3d1010; }
html[data-theme="dark"] .holiday-delete-btn:hover { background: #3d1010; }
html[data-theme="dark"] .multi-remove:hover { background: #3d1010; }
html[data-theme="dark"] .sal-line-btn-del:hover { background: #3d1010; }
html[data-theme="dark"] .multi-check:hover { background: #0d2744; }
html[data-theme="dark"] .btn-add-row:hover { background: #0d2744; }
html[data-theme="dark"] .emp-ac-item:hover { background: #0d2744; }
html[data-theme="dark"] .cal-today-btn { background: #0d2744; }
html[data-theme="dark"] .cal-today-btn:hover { background: #112d4e; }
html[data-theme="dark"] .cal-nav-btn:hover { background: var(--bg-overlay); }
/* Calendar event labels — override --ev-bg pastel backgrounds */
html[data-theme="dark"] .cal-event[style*="#ede7f6"] { background: #1a1540 !important; }
html[data-theme="dark"] .cal-event[style*="#fff3e0"] { background: #3d2600 !important; }
html[data-theme="dark"] .cal-event[style*="#e3f2fd"] { background: #0d2844 !important; }
html[data-theme="dark"] .cal-event[style*="#e8f5e9"] { background: #1a3a2a !important; }
/* Calendar legend swatches — override inline backgrounds */
html[data-theme="dark"] .cal-legend-swatch[style*="#ede7f6"] { background: #1a1540 !important; }
html[data-theme="dark"] .cal-legend-swatch[style*="#fff3e0"] { background: #3d2600 !important; }
html[data-theme="dark"] .cal-legend-swatch[style*="#e3f2fd"] { background: #0d2844 !important; }
html[data-theme="dark"] .cal-legend-swatch[style*="#e8f5e9"] { background: #1a3a2a !important; }
html[data-theme="dark"] .cal-legend-swatch[style*="#f5f5f7"] { background: #21262d !important; }
html[data-theme="dark"] .leave-modal-icon { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .holiday-modal-icon { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .calendar-event.holiday { background: #3d1010; color: #ef5350; }
html[data-theme="dark"] .calendar-event.leave { background: #0d2744; color: #42a5f5; }
html[data-theme="dark"] .calendar-event.payroll { background: #3d2600; color: #ff9800; }
html[data-theme="dark"] .leave-status-badge { opacity: 0.9; }
html[data-theme="dark"] .leave-status-badge[style*="background:#e8f5e9"],
html[data-theme="dark"] .leave-status-badge[style*="background: #e8f5e9"],
html[data-theme="dark"] .leave-status-badge[style*="background: rgb(232, 245, 233)"] { background: #1a3a2a !important; }
html[data-theme="dark"] .leave-status-badge[style*="background:#fff3e0"],
html[data-theme="dark"] .leave-status-badge[style*="background: #fff3e0"],
html[data-theme="dark"] .leave-status-badge[style*="background: rgb(255, 243, 224)"] { background: #3d2600 !important; }
html[data-theme="dark"] .leave-status-badge[style*="background:#fdeeed"],
html[data-theme="dark"] .leave-status-badge[style*="background: #fdeeed"],
html[data-theme="dark"] .leave-status-badge[style*="background: rgb(253, 238, 237)"] { background: #3d1010 !important; }
html[data-theme="dark"] .leave-status-badge[style*="background:#f5f5f5"],
html[data-theme="dark"] .leave-status-badge[style*="background: #f5f5f5"],
html[data-theme="dark"] .leave-status-badge[style*="background: rgb(245, 245, 245)"] { background: #21262d !important; }
html[data-theme="dark"] .loan-status-badge { opacity: 0.9; }
html[data-theme="dark"] .loan-status-badge[style*="background:#e8f5e9"],
html[data-theme="dark"] .loan-status-badge[style*="background: #e8f5e9"],
html[data-theme="dark"] .loan-status-badge[style*="background: rgb(232, 245, 233)"] { background: #1a3a2a !important; }
html[data-theme="dark"] .loan-status-badge[style*="background:#fff3e0"],
html[data-theme="dark"] .loan-status-badge[style*="background: #fff3e0"],
html[data-theme="dark"] .loan-status-badge[style*="background: rgb(255, 243, 224)"] { background: #3d2600 !important; }
html[data-theme="dark"] .loan-status-badge[style*="background:#eceff1"],
html[data-theme="dark"] .loan-status-badge[style*="background: #eceff1"],
html[data-theme="dark"] .loan-status-badge[style*="background: rgb(236, 239, 241)"] { background: #21262d !important; }
html[data-theme="dark"] .loan-status-badge[style*="background:#fdeeed"],
html[data-theme="dark"] .loan-status-badge[style*="background: #fdeeed"],
html[data-theme="dark"] .loan-status-badge[style*="background: rgb(253, 238, 237)"] { background: #3d1010 !important; }
/* Holiday date boxes — override --h-bg pastel backgrounds in dark mode */
html[data-theme="dark"] .holiday-row[style*="#ede7f6"] .holiday-row-date { background: #1a1540 !important; }
html[data-theme="dark"] .holiday-row[style*="#fff3e0"] .holiday-row-date { background: #3d2600 !important; }
html[data-theme="dark"] .holiday-row[style*="#e3f2fd"] .holiday-row-date { background: #0d2844 !important; }
html[data-theme="dark"] .holiday-row[style*="#e8f5e9"] .holiday-row-date { background: #1a3a2a !important; }
/* Holiday type badges — override inline background */
html[data-theme="dark"] .holiday-row-badge[style*="background:#ede7f6"],
html[data-theme="dark"] .holiday-row-badge[style*="background: #ede7f6"],
html[data-theme="dark"] .holiday-row-badge[style*="background: rgb(237, 231, 246)"] { background: #1a1540 !important; }
html[data-theme="dark"] .holiday-row-badge[style*="background:#fff3e0"],
html[data-theme="dark"] .holiday-row-badge[style*="background: #fff3e0"],
html[data-theme="dark"] .holiday-row-badge[style*="background: rgb(255, 243, 224)"] { background: #3d2600 !important; }
html[data-theme="dark"] .holiday-row-badge[style*="background:#e3f2fd"],
html[data-theme="dark"] .holiday-row-badge[style*="background: #e3f2fd"],
html[data-theme="dark"] .holiday-row-badge[style*="background: rgb(227, 242, 253)"] { background: #0d2844 !important; }
html[data-theme="dark"] .holiday-row-badge[style*="background:#e8f5e9"],
html[data-theme="dark"] .holiday-row-badge[style*="background: #e8f5e9"],
html[data-theme="dark"] .holiday-row-badge[style*="background: rgb(232, 245, 233)"] { background: #1a3a2a !important; }
/* Holiday type cards in modal — override hover/checked light backgrounds */
html[data-theme="dark"] .holiday-type-card:hover,
html[data-theme="dark"] .holiday-type-option input[type="radio"]:checked + .holiday-type-card { background: var(--bg-overlay) !important; }
html[data-theme="dark"] .loan-type-badge { opacity: 0.9; }
html[data-theme="dark"] .loan-type-badge[style*="background:#e3f2fd"],
html[data-theme="dark"] .loan-type-badge[style*="background: #e3f2fd"],
html[data-theme="dark"] .loan-type-badge[style*="background: rgb(227, 242, 253)"] { background: #0d2844 !important; }
html[data-theme="dark"] .loan-type-badge[style*="background:#ede7f6"],
html[data-theme="dark"] .loan-type-badge[style*="background: #ede7f6"],
html[data-theme="dark"] .loan-type-badge[style*="background: rgb(237, 231, 246)"] { background: #1a1540 !important; }
html[data-theme="dark"] .loan-type-badge[style*="background:#ffebee"],
html[data-theme="dark"] .loan-type-badge[style*="background: #ffebee"],
html[data-theme="dark"] .loan-type-badge[style*="background: rgb(255, 235, 238)"] { background: #3d1010 !important; }
html[data-theme="dark"] .loan-type-badge[style*="background:#e0f2f1"],
html[data-theme="dark"] .loan-type-badge[style*="background: #e0f2f1"],
html[data-theme="dark"] .loan-type-badge[style*="background: rgb(224, 242, 241)"] { background: #0a3030 !important; }
html[data-theme="dark"] .loan-stat-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .loan-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}
html[data-theme="dark"] .loan-stat-icon[style*="background:#e3f2fd"] {
    background: #0d2844 !important;
}
html[data-theme="dark"] .loan-stat-icon[style*="background:#fff3e0"] {
    background: #3d2600 !important;
}
html[data-theme="dark"] .loan-stat-icon[style*="background:#e8f5e9"] {
    background: #1a3a2a !important;
}
html[data-theme="dark"] .loan-detail-schedule thead th {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .loan-detail-header {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] #ldPurpose {
    background: var(--bg-light) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] #ldApprovalSection {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] #ldScheduleSection {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] #emiPreview > div {
    background: linear-gradient(135deg, #0d2844 0%, #1a3a2a 100%) !important;
}
html[data-theme="dark"] #emiPreview > div > div > div:first-child {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] #emiPreview [style*="border-left"] {
    border-left-color: var(--border) !important;
}
html[data-theme="dark"] #emiPreview [style*="border-right"] {
    border-right-color: var(--border) !important;
}
html[data-theme="dark"] .loan-row-arrow {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .loan-detail-schedule thead th {
    background: var(--bg-overlay) !important;
    color: var(--text-muted) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .loan-detail-schedule td {
    border-bottom-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .loan-detail-schedule-wrap {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .loan-detail-metric-label {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .loan-detail-metric-sub {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .loan-detail-info-label {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .loan-detail-info-value {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .loan-detail-info-item svg {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] [style*="border-top:1px solid #eee"],
html[data-theme="dark"] [style*="border-top: 1px solid #eee"] {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .dropdown-item.danger:hover { background: #3d1010; }
html[data-theme="dark"] .lb-row:nth-child(even) { background: #1c2128; }
html[data-theme="dark"] .lb-row:nth-child(even) .lb-td-employee { background: #1c2128; }
html[data-theme="dark"] .lb-row:hover, html[data-theme="dark"] .lb-row:hover .lb-td-employee { background: #21262d; }
html[data-theme="dark"] .lb-row:hover .lb-td-employee { background: #21262d; }
html[data-theme="dark"] .lb-balance-bar { background: #30363d; }
html[data-theme="dark"] .progress-track { background: #30363d; }
html[data-theme="dark"] .progress { background: #30363d; }
html[data-theme="dark"] .toggle { background: #30363d; }
html[data-theme="dark"] .step-todo { background: #30363d; color: #6e7681; }
html[data-theme="dark"] .run-step-num { background: #30363d; }
html[data-theme="dark"] .info-card-bank + .info-card-bank { border-top-color: #30363d; }
html[data-theme="dark"] .info-card-bank-badge { background: #1a3a2a; color: #66bb6a; }
html[data-theme="dark"] .leave-policy-card { background: var(--bg-white) !important; border-color: #30363d !important; }
html[data-theme="dark"] .leave-policy-stat { background: var(--bg-overlay) !important; }
html[data-theme="dark"] .leave-policy-header { border-bottom-color: #30363d !important; }
html[data-theme="dark"] .leave-policy-name { color: var(--text-primary); }
html[data-theme="dark"] .leave-policy-bar { background: #30363d !important; }
html[data-theme="dark"] .leave-policy-footer { border-top-color: #30363d; color: var(--text-secondary); }
html[data-theme="dark"] .edit-section-title { border-bottom-color: #30363d; }
html[data-theme="dark"] .edit-group-title { border-bottom-color: #30363d; }
html[data-theme="dark"] .edit-bottom-bar { border-top-color: #30363d; }
html[data-theme="dark"] .profile-group-title { border-bottom-color: #30363d; }
html[data-theme="dark"] .loan-detail-metric + .loan-detail-metric { border-left-color: #30363d; }
html[data-theme="dark"] .loan-detail-schedule-wrap { border-color: #30363d; }
html[data-theme="dark"] .loan-detail-header { border-bottom-color: #30363d; }
html[data-theme="dark"] .lb-th-employee { border-bottom-color: #30363d; }
html[data-theme="dark"] .sal-line-total { border-top-color: #30363d; }
html[data-theme="dark"] .sal-summary-card { border-color: #30363d; }
html[data-theme="dark"] .sal-section { border-color: #30363d; }
html[data-theme="dark"] .profile-photo { border-color: var(--bg-white); }
html[data-theme="dark"] .profile-photo-edit { border-color: #30363d; }
html[data-theme="dark"] #doc-upload-form { background: var(--bg-light) !important; }
html[data-theme="dark"] .profile-doc-card { border-color: #30363d; }
html[data-theme="dark"] .profile-doc-card:hover { border-color: #58a6ff; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #30363d; }

/* Dark mode overrides for blade inline styles */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"] {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] [style*="background:#f9f"],
html[data-theme="dark"] [style*="background: #f9f"],
html[data-theme="dark"] [style*="background:#faf"],
html[data-theme="dark"] [style*="background: #faf"],
html[data-theme="dark"] [style*="background:#f8f"],
html[data-theme="dark"] [style*="background: #f8f"] {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] [style*="border-color:#e"],
html[data-theme="dark"] [style*="border-color: #e"] {
    border-color: var(--border) !important;
}
html[data-theme="dark"] [style*="background:#f0f6ff"],
html[data-theme="dark"] [style*="background: #f0f6ff"] {
    background: #0d2844 !important;
}
html[data-theme="dark"] [style*="dashed #e0e0e0"] {
    border-color: #30363d !important;
}
html[data-theme="dark"] [style*="solid #e0e0e0"] {
    border-color: #30363d !important;
}
html[data-theme="dark"] [style*="solid #f0f0f0"] {
    border-color: #30363d !important;
}
html[data-theme="dark"] [style*="solid #f5f5f5"] {
    border-color: #30363d !important;
}
html[data-theme="dark"] [style*="background:#e0e0e0"],
html[data-theme="dark"] [style*="background: #e0e0e0"] {
    background: #30363d !important;
}

/* Talent Acquisition dark mode overrides (inline <style> blocks in blade views) */
html[data-theme="dark"] .ob-card,
html[data-theme="dark"] .iv-card,
html[data-theme="dark"] .ob-form,
html[data-theme="dark"] .ob-sidebar,
html[data-theme="dark"] .ob-checklist,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .picker-box,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .loan-detail-modal,
html[data-theme="dark"] .cand-form-container,
html[data-theme="dark"] .cp-sidebar,
html[data-theme="dark"] .cp-main {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-primary);
}
html[data-theme="dark"] .data-table {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .data-table th {
    background: var(--bg-light) !important;
    border-bottom-color: var(--border) !important;
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .data-table td {
    border-bottom-color: var(--border) !important;
    color: var(--text-primary);
}
html[data-theme="dark"] .data-table tr:hover td {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .iv-board-col {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .iv-board-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .ob-cl-item:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .item-row {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}
html[data-theme="dark"] .cp-tab {
    color: var(--text-secondary);
}
html[data-theme="dark"] .cp-tab.active {
    background: var(--bg-white) !important;
    color: var(--zoho-blue);
}
html[data-theme="dark"] .cp-tab-bar {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .cp-field-label {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .cp-field-value {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cp-tl-card,
html[data-theme="dark"] .cp-doc-card,
html[data-theme="dark"] .cp-notes-card {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}
html[data-theme="dark"] .cp-tag.loc {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .dp-chip {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-emp-results {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .dp-emp-item:hover {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .dp-schedule {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .dp-comment-cancel,
html[data-theme="dark"] .dp-sched-cancel {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .picker-item:hover {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .cand-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cand-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .cand-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cand-title {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cand-meta-item {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .cand-meta-item strong {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cand-skill-tag {
    background: #0d2844 !important;
    color: #58a6ff !important;
}
html[data-theme="dark"] .cand-status-badge {
    opacity: 0.9;
}
html[data-theme="dark"] .skill-tag-selected {
    background: #0d2844 !important;
    color: #58a6ff !important;
}
html[data-theme="dark"] .cf-skills-cell {
    border-right-color: var(--border) !important;
}
html[data-theme="dark"] .skill-search-field {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cf-bar .cf-cell input::placeholder,
html[data-theme="dark"] .skill-search-field::placeholder {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .skill-dropdown-item {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cand-filters {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cand-ac-dropdown {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus {
    background: var(--input-bg) !important;
}
html[data-theme="dark"] .btn-secondary {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .add-repeatable-btn,
html[data-theme="dark"] .cand-step {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .cand-step:hover {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .repeatable-card,
html[data-theme="dark"] .cand-form-section {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .section-divider-line {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cf-bar {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cf-bar .cf-cell {
    border-right-color: var(--border) !important;
}
html[data-theme="dark"] .cf-bar .cf-cell input,
html[data-theme="dark"] .cf-bar .cf-cell select {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .skill-dropdown {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .skill-dropdown-item:hover,
html[data-theme="dark"] .skill-dropdown-item.highlighted {
    background: #0d2744 !important;
}
html[data-theme="dark"] .cf-btn-search {
    background: var(--bg-overlay) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cf-btn-clear {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
    border-left-color: var(--border) !important;
}
html[data-theme="dark"] .cand-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cp-status-select option {
    background: var(--bg-white) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cp-action-btn {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cp-tag {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .dp-tl-from {
    background: #3d1010 !important;
    color: #ef5350 !important;
}
/* Candidate show page */
html[data-theme="dark"] .cp-side {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cp-tabs {
    background: var(--bg-light) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .cp-tl-card,
html[data-theme="dark"] .cp-doc,
html[data-theme="dark"] .cp-iv-card,
html[data-theme="dark"] .cp-comment-form {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}
html[data-theme="dark"] .cp-tl-title,
html[data-theme="dark"] .cp-comment-text {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cp-tl-sub,
html[data-theme="dark"] .cp-tl-desc,
html[data-theme="dark"] .cp-info-label,
html[data-theme="dark"] .cp-comment-meta {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .cp-info-value {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cp-info-heading {
    color: var(--text-muted) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .cp-section-line {
    background: var(--border) !important;
}
html[data-theme="dark"] .cp-comment {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .cp-social a {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cp-tl-icon {
    background: #0d2744 !important;
    color: #42a5f5 !important;
}
html[data-theme="dark"] .cp-tl-icon.work {
    background: #1a1030 !important;
    color: #ba68c8 !important;
}
html[data-theme="dark"] .cp-tag {
    background: #0d2744 !important;
    color: #42a5f5 !important;
    border-color: #30363d !important;
}
html[data-theme="dark"] .cp-tag.cert {
    background: #3d2600 !important;
    color: #ffb74d !important;
    border-color: #30363d !important;
}
html[data-theme="dark"] .cp-tag.lang {
    background: #1a3a2a !important;
    color: #66bb6a !important;
    border-color: #30363d !important;
}
/* Candidate activity log */
html[data-theme="dark"] .cp-log {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .cp-log-dot {
    border-color: #0d2844 !important;
}
html[data-theme="dark"] .cp-log-arrow {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .cp-log-context {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cp-log-who {
    color: var(--text-muted) !important;
}
/* Interviews board */
html[data-theme="dark"] .iv-col {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .iv-col.drag-over {
    background: var(--bg-overlay) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .iv-cand-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .iv-cand-title {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .iv-cand-meta {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .picker-header,
html[data-theme="dark"] .picker-search,
html[data-theme="dark"] .picker-footer {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .picker-search input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .picker-item {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .picker-item.selected {
    background: #0d2744 !important;
}
html[data-theme="dark"] .picker-overlay {
    background: rgba(0,0,0,0.6) !important;
}
html[data-theme="dark"] .detail-overlay {
    background: rgba(0,0,0,0.5) !important;
}
html[data-theme="dark"] .dp-body {
    color: var(--text-primary);
}
html[data-theme="dark"] .dp-section-title {
    color: var(--text-muted) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .iv-col-header {
    border-bottom-color: var(--border) !important;
}
/* Onboarding pages */
html[data-theme="dark"] .ob-cl-header {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .ob-cl-item {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .ob-cl-title {
    color: var(--text-primary);
}
html[data-theme="dark"] .ob-cl-desc,
html[data-theme="dark"] .ob-cl-meta {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .ob-progress-bar {
    background: #30363d !important;
}
html[data-theme="dark"] .ob-cl-check {
    border-color: #30363d !important;
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .form-label {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .iv-col-count {
    opacity: 0.85;
}
html[data-theme="dark"] .iv-card-title,
html[data-theme="dark"] .ob-card-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .iv-card-position,
html[data-theme="dark"] .iv-card-meta,
html[data-theme="dark"] .ob-card-meta {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .iv-card-meta strong {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .data-table td {
    border-bottom-color: var(--border) !important;
    color: var(--text-primary);
}
html[data-theme="dark"] .modal-close {
    color: var(--text-muted) !important;
}
/* Candidate create/edit forms */
html[data-theme="dark"] .cand-step-wizard {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .cand-step {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .cand-step.active {
    background: #0d2744 !important;
    color: var(--zoho-blue) !important;
}
html[data-theme="dark"] .section-divider-icon {
    opacity: 0.85;
}
html[data-theme="dark"] .repeatable-card {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}

/* Tasks / Kanban dark mode overrides */
html[data-theme="dark"] .task-stat-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-stat-icon[style*="background:#e3f2fd"] { background: #0d2844 !important; }
html[data-theme="dark"] .task-stat-icon[style*="background:#e8eaf6"] { background: #1a1540 !important; }
html[data-theme="dark"] .task-stat-icon[style*="background:#e0f2f1"] { background: #0a3030 !important; }
html[data-theme="dark"] .task-user-filter {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-user-filter-label {
    border-right-color: var(--border) !important;
}
html[data-theme="dark"] .task-user-chip {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-user-chip:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-user-chip.active {
    background: #0d2744 !important;
    border-color: #1565c0 !important;
    color: #42a5f5 !important;
}
html[data-theme="dark"] .task-subtask-toggle {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-subtask-toggle:hover {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .task-subtask-toggle.active {
    background: #0d2744 !important;
    border-color: #1565c0 !important;
    color: #42a5f5 !important;
}
html[data-theme="dark"] .kanban-column {
    background: var(--bg-light) !important;
    border-color: transparent !important;
}
html[data-theme="dark"] .kanban-column.drag-over {
    background: var(--bg-overlay) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .kanban-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .kanban-card:hover {
    border-color: #484f58 !important;
}
html[data-theme="dark"] .kanban-card.is-subtask {
    background: #0d2744 !important;
    border-color: #1c3a5e !important;
}
html[data-theme="dark"] .kanban-card.is-subtask:hover {
    background: #112d4e !important;
    border-color: #2a5080 !important;
}
html[data-theme="dark"] .kanban-card.is-subtask .kanban-cat-tag {
    background: #1c3a5e !important;
    color: #6fa3d6 !important;
}
html[data-theme="dark"] .kanban-cat-tag {
    background: var(--bg-overlay) !important;
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .kanban-card-footer {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .kanban-show-more {
    background: rgba(22,27,34,0.7) !important;
    border-color: var(--border) !important;
    color: #42a5f5 !important;
}
html[data-theme="dark"] .kanban-show-more:hover {
    background: var(--bg-white) !important;
    border-color: #1565c0 !important;
}
/* Kanban column count badges */
html[data-theme="dark"] .col-pending .kanban-count { background: #3d2600 !important; }
html[data-theme="dark"] .col-in_progress .kanban-count { background: #0d2844 !important; }
html[data-theme="dark"] .col-blocked .kanban-count { background: #3d1010 !important; }
html[data-theme="dark"] .col-payment_pending .kanban-count { background: #1a1540 !important; }
html[data-theme="dark"] .col-completed .kanban-count { background: #1a3a2a !important; }
/* Kanban priority tags */
html[data-theme="dark"] .kanban-priority-tag.urgent { background: #3d1010 !important; }
html[data-theme="dark"] .kanban-priority-tag.high { background: #3d2600 !important; }
html[data-theme="dark"] .kanban-priority-tag.medium { background: #0d2844 !important; }
html[data-theme="dark"] .kanban-priority-tag.low { background: #1a3a2a !important; }
html[data-theme="dark"] .all-chip .task-user-chip-icon {
    background: var(--bg-overlay) !important;
}
/* Task panel (slide-in) */
html[data-theme="dark"] .task-panel {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-overlay {
    background: rgba(0,0,0,0.5) !important;
}
html[data-theme="dark"] .task-panel-main {
    background: var(--content-bg) !important;
}
html[data-theme="dark"] .task-panel-sidebar {
    background: var(--bg-overlay) !important;
    border-left-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-header-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-body {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .task-panel-tabs {
    background: var(--bg-white) !important;
    border-bottom-color: var(--border) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-tab {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-tab.active {
    color: #1565c0 !important;
    border-bottom-color: #1565c0 !important;
}
html[data-theme="dark"] .task-panel-tab:hover {
    color: var(--text-primary) !important;
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .task-panel-content {
    background: var(--content-bg) !important;
}
html[data-theme="dark"] .task-panel-completion-circle {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-inline-input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-desc-section {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-desc-view {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-desc-view:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .task-panel-flow-section {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-flow-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-flow-item {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-checklist-item {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-checklist-item:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .checklist-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-subtask {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-subtask:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .task-panel-subtask-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-file {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-file:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .task-panel-file-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-file-btn {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-file-btn:hover {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .task-panel-file-btn.delete:hover {
    background: #3d1010 !important;
    color: #ef5350 !important;
    border-color: #5c1a1a !important;
}
html[data-theme="dark"] .task-panel-dropzone-inline {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-activity-item {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-activity-text {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-activity-text strong {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-activity::before {
    background: var(--border) !important;
}
html[data-theme="dark"] .task-panel-comment {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-panel-comment-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-comment-text {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-progress-bar {
    background: var(--border) !important;
}
html[data-theme="dark"] .task-panel-loading {
    background: rgba(13,17,23,0.9) !important;
}
html[data-theme="dark"] .task-panel-spinner {
    border-color: var(--border) !important;
    border-top-color: #1565c0 !important;
}
html[data-theme="dark"] .task-panel-create-footer {
    background: var(--bg-white) !important;
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .tp-sidebar-divider {
    background: var(--border) !important;
}
html[data-theme="dark"] .tp-sidebar-label {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .tp-field-value {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .tp-sidebar-meta-value {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .tp-field-display {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .tp-field-display:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .tp-sidebar-select {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .tp-btn-outline {
    background: var(--bg-white) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .tp-btn-outline:hover {
    background: var(--bg-light) !important;
    border-color: var(--text-muted) !important;
}
html[data-theme="dark"] .tp-subscriber-toggle {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .tp-subscriber-toggle:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] #panelDescEditor,
html[data-theme="dark"] #panelCommentEditor {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel a,
html[data-theme="dark"] .task-panel .ql-editor a {
    color: #58a6ff !important;
}
html[data-theme="dark"] .task-panel-add-link {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-panel-add-link:hover {
    color: #58a6ff !important;
}
html[data-theme="dark"] .task-panel-add-icon {
    background: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-panel-desc-placeholder {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .task-panel-attach-hint {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .tp-manage-labels-link {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .tp-manage-labels-link:hover {
    color: #58a6ff !important;
}
html[data-theme="dark"] .task-panel-meta-sep {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .task-panel-meta-info {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .task-panel-comment a,
html[data-theme="dark"] .task-panel-desc-view a {
    color: #58a6ff !important;
}
/* Label manager modal */
html[data-theme="dark"] .label-manager-modal {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .label-manager-header {
    border-bottom-color: var(--border) !important;
    color: var(--text-primary);
}
html[data-theme="dark"] .label-manager-body {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .label-manager-item {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}
html[data-theme="dark"] .label-manager-item:hover {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .label-manager-color {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .label-manager-input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .label-manager-overlay {
    background: rgba(0,0,0,0.5) !important;
}
/* Automation modal */
html[data-theme="dark"] .automation-select {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .automation-rule-row {
    background: var(--bg-light) !important;
    border-color: var(--bg-overlay) !important;
}
html[data-theme="dark"] .automation-rule-row:hover {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .automation-rule-text {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .automation-rule-text strong {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .checklist-delete:hover {
    background: #3d1010 !important;
}
/* Task list view */
html[data-theme="dark"] .task-filter-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .task-filter-select {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .task-filter-select:focus {
    background: var(--input-bg) !important;
}
html[data-theme="dark"] .task-filter-btn.clear {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .task-filter-btn.clear:hover {
    background: var(--bg-hover) !important;
}
html[data-theme="dark"] .task-list-table {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .task-list-row {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .task-list-row:hover {
    background: var(--bg-hover) !important;
}

/* Quill editor dark mode */
html[data-theme="dark"] .ql-toolbar { background: var(--bg-light); border-color: var(--border) !important; }
html[data-theme="dark"] .ql-container { background: var(--input-bg); border-color: var(--border) !important; color: var(--text-primary); }
html[data-theme="dark"] .ql-editor { color: var(--text-primary); }
html[data-theme="dark"] .ql-editor.ql-blank::before { color: var(--text-muted); }
html[data-theme="dark"] .ql-toolbar .ql-stroke { stroke: var(--text-secondary); }
html[data-theme="dark"] .ql-toolbar .ql-fill { fill: var(--text-secondary); }
html[data-theme="dark"] .ql-toolbar .ql-picker { color: var(--text-secondary); }
html[data-theme="dark"] .ql-toolbar button:hover .ql-stroke { stroke: var(--text-primary); }
html[data-theme="dark"] .ql-toolbar button:hover .ql-fill { fill: var(--text-primary); }

/* Announcements compose/view modal dark mode */
html[data-theme="dark"] #composeModal > div,
html[data-theme="dark"] #viewModal > div {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] #filtersPanel,
html[data-theme="dark"] #viewFilters {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] #composeEditor {
    background: var(--input-bg) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] #composeEditor .ql-editor {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .ql-toolbar.ql-snow {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] #attachmentArea {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .ann-attachment-item {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .ann-recipient-chip input:checked + .ann-recipient-chip-inner {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] [style*="background:#fafbfc"],
html[data-theme="dark"] [style*="background: #fafbfc"] {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background: #f9fafb"] {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] #viewBadge[style*="background:#e3f2fd"],
html[data-theme="dark"] #viewBadge[style*="background: #e3f2fd"],
html[data-theme="dark"] #viewBadge[style*="background: rgb(227, 242, 253)"] {
    background: #0d2844 !important;
}
html[data-theme="dark"] #viewBadge[style*="background:#fff3e0"],
html[data-theme="dark"] #viewBadge[style*="background: #fff3e0"],
html[data-theme="dark"] #viewBadge[style*="background: rgb(255, 243, 224)"] {
    background: #3d2600 !important;
}
html[data-theme="dark"] #viewBadge[style*="background:#e8f5e9"],
html[data-theme="dark"] #viewBadge[style*="background: #e8f5e9"],
html[data-theme="dark"] #viewBadge[style*="background: rgb(232, 245, 233)"] {
    background: #1a3a2a !important;
}
html[data-theme="dark"] #viewFiltersContent span[style*="background:#e3f2fd"] {
    background: #0d2844 !important;
}

/* Announcements page dark mode */
html[data-theme="dark"] [style*="background:linear-gradient(135deg,#e3f2fd"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#e3f2fd"],
html[data-theme="dark"] [style*="background:linear-gradient(135deg, #e3f2fd"] {
    background: #0d2844 !important;
}
html[data-theme="dark"] [style*="background:linear-gradient(135deg,#e8f5e9"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#e8f5e9"],
html[data-theme="dark"] [style*="background:linear-gradient(135deg, #e8f5e9"] {
    background: #1a3a2a !important;
}
html[data-theme="dark"] [style*="background:linear-gradient(135deg,#fff3e0"],
html[data-theme="dark"] [style*="background: linear-gradient(135deg,#fff3e0"],
html[data-theme="dark"] [style*="background:linear-gradient(135deg, #fff3e0"] {
    background: #3d2600 !important;
}
html[data-theme="dark"] .ann-row {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .ann-row:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] [style*="background:#f5f5f5"],
html[data-theme="dark"] [style*="background: #f5f5f5"] {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] [style*="border-bottom:1px solid #f0f2f5"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #f0f2f5"] {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] [style*="border-top:1px solid #f0f2f5"],
html[data-theme="dark"] [style*="border-top: 1px solid #f0f2f5"] {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] [style*="background:#f5f7fa"],
html[data-theme="dark"] [style*="background: #f5f7fa"] {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] [style*="solid #e0e3e8"] {
    border-color: var(--border) !important;
}
html[data-theme="dark"] [style*="border-bottom:1px solid #eef0f3"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #eef0f3"] {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .ann-type-badge[style*="background:#e3f2fd"],
html[data-theme="dark"] .ann-type-badge[style*="background: #e3f2fd"],
html[data-theme="dark"] [style*="background:#e3f2fd"][style*="font-size:10px"] {
    background: #0d2844 !important;
}
html[data-theme="dark"] .ann-type-badge[style*="background:#fff3e0"],
html[data-theme="dark"] .ann-type-badge[style*="background: #fff3e0"],
html[data-theme="dark"] [style*="background:#fff3e0"][style*="font-size:10px"] {
    background: #3d2600 !important;
}
html[data-theme="dark"] .ann-type-badge[style*="background:#e8f5e9"],
html[data-theme="dark"] .ann-type-badge[style*="background: #e8f5e9"],
html[data-theme="dark"] [style*="background:#e8f5e9"][style*="font-size:10px"] {
    background: #1a3a2a !important;
}

/* Generic pastel background overrides for inline styles */
html[data-theme="dark"] [style*="background:#e8f5e9"],
html[data-theme="dark"] [style*="background: #e8f5e9"] { background: #1a3a2a !important; }
html[data-theme="dark"] [style*="background:#fce4ec"],
html[data-theme="dark"] [style*="background: #fce4ec"] { background: #3d1010 !important; }
html[data-theme="dark"] [style*="background:#fff3e0"],
html[data-theme="dark"] [style*="background: #fff3e0"] { background: #3d2600 !important; }
html[data-theme="dark"] [style*="background:#e3f2fd"],
html[data-theme="dark"] [style*="background: #e3f2fd"] { background: #0d2844 !important; }
html[data-theme="dark"] [style*="background:#f3e5f5"],
html[data-theme="dark"] [style*="background: #f3e5f5"] { background: #1a1540 !important; }
html[data-theme="dark"] [style*="background:#ede7f6"],
html[data-theme="dark"] [style*="background: #ede7f6"] { background: #1a1540 !important; }
html[data-theme="dark"] [style*="background:#fdeeed"],
html[data-theme="dark"] [style*="background: #fdeeed"] { background: #3d1010 !important; }
html[data-theme="dark"] [style*="background:#eef4fb"],
html[data-theme="dark"] [style*="background: #eef4fb"] { background: #0d2844 !important; }
html[data-theme="dark"] [style*="background:#edf7ee"],
html[data-theme="dark"] [style*="background: #edf7ee"] { background: #1a3a2a !important; }
html[data-theme="dark"] [style*="background:#fef3ec"],
html[data-theme="dark"] [style*="background: #fef3ec"] { background: #3d2600 !important; }
html[data-theme="dark"] [style*="background:#f5eef9"],
html[data-theme="dark"] [style*="background: #f5eef9"] { background: #1a1540 !important; }
html[data-theme="dark"] [style*="background:#edf6f5"],
html[data-theme="dark"] [style*="background: #edf6f5"] { background: #0a3030 !important; }
html[data-theme="dark"] [style*="background:#dce8f5"],
html[data-theme="dark"] [style*="background: #dce8f5"] { background: #112d4e !important; }
html[data-theme="dark"] [style*="background:#d8eeda"],
html[data-theme="dark"] [style*="background: #d8eeda"] { background: #1a3a2a !important; }
html[data-theme="dark"] [style*="background:#fde4d2"],
html[data-theme="dark"] [style*="background: #fde4d2"] { background: #3d2600 !important; }
html[data-theme="dark"] [style*="background:#ecddf4"],
html[data-theme="dark"] [style*="background: #ecddf4"] { background: #1a1540 !important; }
html[data-theme="dark"] [style*="background:#fadcda"],
html[data-theme="dark"] [style*="background: #fadcda"] { background: #3d1010 !important; }
html[data-theme="dark"] [style*="background:#d6edea"],
html[data-theme="dark"] [style*="background: #d6edea"] { background: #0a3030 !important; }
html[data-theme="dark"] [style*="background:#e8eaf6"],
html[data-theme="dark"] [style*="background: #e8eaf6"] { background: #1a1540 !important; }
html[data-theme="dark"] [style*="background:#e0f2f1"],
html[data-theme="dark"] [style*="background: #e0f2f1"] { background: #0a3030 !important; }
html[data-theme="dark"] [style*="background:#ffebee"],
html[data-theme="dark"] [style*="background: #ffebee"] { background: #3d1010 !important; }
html[data-theme="dark"] [style*="background:#dcfce7"],
html[data-theme="dark"] [style*="background: #dcfce7"] { background: #1a3a2a !important; }
html[data-theme="dark"] [style*="background:#fee2e2"],
html[data-theme="dark"] [style*="background: #fee2e2"] { background: #3d1010 !important; }
html[data-theme="dark"] [style*="background:#f4f6f8"],
html[data-theme="dark"] [style*="background: #f4f6f8"] { background: var(--bg-overlay) !important; }

/* Interview board detail panel dark mode */
html[data-theme="dark"] .detail-panel {
    background: var(--bg-white) !important;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4) !important;
}
html[data-theme="dark"] .dp-body {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-chips {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .dp-chip {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-chip.accent {
    background: #0d2818 !important;
    color: #4caf50 !important;
}
html[data-theme="dark"] .dp-section-title {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .dp-info-row {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-info-row svg {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .dp-info-row a {
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-tag.skill {
    background: #0d2844 !important;
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-tag.lang {
    background: #3d1e00 !important;
    color: #ffb74d !important;
}
html[data-theme="dark"] .dp-link-btn {
    background: #0d2844 !important;
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-link-btn:hover {
    background: #143a5c !important;
}
html[data-theme="dark"] .dp-schedule {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .dp-schedule-date {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-schedule-note {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-schedule-icon {
    background: #0d2844 !important;
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-schedule-form input,
html[data-theme="dark"] .dp-schedule-form textarea {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-sched-cancel {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-interviewer {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .dp-interviewer-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-interviewer-code {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .dp-add-interviewer-btn {
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-emp-search input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-emp-results {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .dp-emp-item:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .dp-comment {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .dp-comment-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-comment-date {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .dp-comment-text {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-comment-toggle {
    color: #58a6ff !important;
}
html[data-theme="dark"] .dp-comment-box textarea {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .dp-comment-cancel {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-tl-meta {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .dp-tl-note {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .dp-empty {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .picker-box {
    background: var(--bg-white) !important;
}
html[data-theme="dark"] .picker-header {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .picker-search {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .picker-search input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .picker-item {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .picker-item:hover {
    background: var(--bg-light) !important;
}
html[data-theme="dark"] .picker-item.selected {
    background: #0d2844 !important;
}
html[data-theme="dark"] .picker-footer {
    border-top-color: var(--border) !important;
}

/* Settings page dark mode */
html[data-theme="dark"] .settings-tabs {
    border-bottom-color: var(--border) !important;
}
html[data-theme="dark"] .config-row {
    border-bottom-color: var(--border) !important;
}

/* Users page dark mode */
html[data-theme="dark"] .user-card {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .user-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}
html[data-theme="dark"] .user-card-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .user-card-email {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .user-card-details {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .user-detail-label {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .user-detail-value {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .user-card-actions {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .user-action-btn {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .user-action-btn:hover {
    background: var(--bg-overlay) !important;
    color: var(--text-primary) !important;
    border-color: var(--text-muted) !important;
}
html[data-theme="dark"] .user-action-btn.danger:hover {
    background: #3d1010 !important;
    color: #ef5350 !important;
    border-color: #5c1a1a !important;
}
html[data-theme="dark"] .user-action-btn.success:hover {
    background: #0d2818 !important;
    color: #4caf50 !important;
    border-color: #1b5e20 !important;
}
html[data-theme="dark"] .user-role-badge {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .user-active-badge.active {
    background: #1a3a2a !important;
    color: #4caf50 !important;
}
html[data-theme="dark"] .user-active-badge.inactive {
    background: #3d1010 !important;
    color: #ef5350 !important;
}
html[data-theme="dark"] .user-status-dot {
    border-color: var(--bg-white) !important;
}
html[data-theme="dark"] .users-empty {
    color: var(--text-muted) !important;
}
/* User modal dark mode */
html[data-theme="dark"] .um-modal {
    background: var(--bg-white) !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5) !important;
}
html[data-theme="dark"] .um-title {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .um-subtitle {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .um-close {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .um-close:hover {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .um-label {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .um-input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .um-input::placeholder {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .um-input:focus {
    border-color: #1565c0 !important;
}
html[data-theme="dark"] .um-toggle-pw {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .um-toggle-pw:hover {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .um-toggle-text {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .um-footer {
    border-top-color: var(--border) !important;
}
html[data-theme="dark"] .um-btn-cancel {
    background: var(--bg-overlay) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .um-btn-cancel:hover {
    background: var(--bg-light) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .um-avatar-preview {
    background: var(--bg-overlay) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .um-errors {
    background: #3d1010 !important;
    border-color: #5c1a1a !important;
    color: #ef5350 !important;
}
html[data-theme="dark"] .um-role-chip {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] .um-role-chip:hover {
    background: var(--bg-light) !important;
    border-color: var(--text-muted) !important;
}
html[data-theme="dark"] .um-role-chip.selected {
    background: var(--bg-overlay) !important;
    border-color: #1565c0 !important;
}
html[data-theme="dark"] .rm-color-input {
    background: var(--bg-white) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .rm-item {
    background: var(--bg-light) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .rm-item:hover {
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .rm-item-name {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .rm-item-slug {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .rm-item-count {
    color: var(--text-secondary) !important;
    background: var(--bg-overlay) !important;
}
html[data-theme="dark"] .rm-item-btn {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .rm-item-btn:hover {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] .rm-item-btn.delete:hover {
    color: #ef5350 !important;
}
html[data-theme="dark"] .rm-empty {
    color: var(--text-muted) !important;
}

@media print {
  .sidebar, .topbar, .notification-panel, .notif-panel,
  .topbar-right, .page-actions, .filter-bar, .tabs,
  .pagination, .flash-message, .btn:not(.btn-print) { display: none !important; }

  body { display: block; background: #fff; font-size: 11px; height: auto; overflow: visible; }
  .main { overflow: visible; }
  .content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  .payslip { border: none; padding: 0; max-width: 100%; }
  table { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  @page { margin: 15mm; }
}
