/* ─────────────────────────────────────────────────────────
   Employee Portal — mobile-first absence request UI
   Uses ep- prefix to avoid conflicts with the main app.
   ───────────────────────────────────────────────────────── */

#employee-portal-screen {
  font-family: inherit;
  color: #1e293b;
}

.ep-shell {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.ep-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 16px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-burger {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.2s;
}
.ep-burger:hover { background: rgba(255,255,255,0.15); }

/* When drawer is open, hide the burger so it doesn't cover the company logo */
body.ep-drawer-open .ep-burger {
  opacity: 0;
  pointer-events: none;
}

.ep-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.ep-logo {
  font-size: 28px;
  flex-shrink: 0;
}

.ep-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}

.ep-header-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-header-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Main ── */
.ep-main {
  flex: 1;
  padding: 16px 14px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Card ── */
.ep-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.ep-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #1e293b;
}

.ep-card-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin: -8px 0 14px;
  line-height: 1.45;
}

.ep-form-card {
  border-left: 3px solid #2563eb;
}

/* ── Greeting ── */
.ep-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
}

.ep-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ep-greeting-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e293b;
}

.ep-greeting-meta {
  font-size: 0.8rem;
  color: #64748b;
}

/* ── Form ── */
.ep-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  margin: 12px 0 6px;
}

.ep-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  background: #fff;
  color: #1e293b;
}

.ep-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea.ep-input {
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
}

.ep-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 5px 0 0;
}

.ep-muted {
  color: #94a3b8;
  font-weight: 400;
}

.ep-errors {
  margin: 10px 0 0;
  color: #dc2626;
  font-size: 0.82rem;
}

.ep-errors div {
  padding: 4px 0;
}

/* ── Buttons ── */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.05s;
}

.ep-btn:active { transform: scale(0.98); }
.ep-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ep-btn-primary {
  background: #2563eb;
  color: #fff;
  width: 100%;
  margin-top: 14px;
}

.ep-btn-primary:hover:not(:disabled) { background: #1d4ed8; }

.ep-btn-ghost {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}

.ep-btn-ghost:hover { background: #fef2f2; }

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

.ep-link-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 8px 12px;
}

/* ── Footer ── */
.ep-footer {
  text-align: center;
  padding: 16px 0 24px;
}

/* ── Request list items ── */
.ep-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ep-request {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.ep-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ep-request-date {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
}

.ep-request-cat {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.ep-request-reason {
  font-size: 0.82rem;
  color: #475569;
  font-style: italic;
  margin-top: 6px;
}

.ep-request-review {
  font-size: 0.78rem;
  color: #1e40af;
  background: #eff6ff;
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 8px;
}

/* ── Status badges ── */
.ep-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ep-status-pending  { background: #fef3c7; color: #92400e; }
.ep-status-approved { background: #dcfce7; color: #166534; }
.ep-status-rejected { background: #fee2e2; color: #991b1b; }

/* ── Empty state ── */
.ep-empty {
  text-align: center;
  padding: 28px 18px;
}
.ep-empty-icon { font-size: 2.4rem; margin-bottom: 10px; }
.ep-empty-text { font-weight: 600; color: #1e293b; }
.ep-empty-sub { font-size: 0.82rem; color: #94a3b8; margin-top: 4px; }

/* ── Status badges in admin table (matches ep- styles) ── */
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* btn-success for the approve button */
.btn.btn-success {
  background: #16a34a;
  color: #fff;
  border: none;
}
.btn.btn-success:hover { background: #15803d; }

/* btn-warning for restore-style operations */
.btn.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: none;
}
.btn.btn-warning:hover { background: #d97706; }

/* ─── Drawer (slide-out menu) ─────────────────────────── */
.ep-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ep-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ep-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.ep-drawer.open { transform: translateX(0); }

.ep-drawer-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ep-drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.ep-drawer-user { flex: 1; min-width: 0; }
.ep-drawer-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-drawer-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.ep-drawer-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: #1e293b;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s;
}
.ep-drawer-item:hover { background: #f1f5f9; }
.ep-drawer-item.active {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
}

.ep-drawer-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.ep-drawer-footer {
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

/* ─── Pay slip ─────────────────────────────────────────── */
.ep-payslip {
  font-variant-numeric: tabular-nums;
}

.ep-payslip-period {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 4px;
}
.ep-payslip-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}
.ep-payslip-type {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 14px;
}

.ep-payslip-section {
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
}

.ep-payslip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #1e293b;
}
.ep-payslip-row strong { font-weight: 700; }

.ep-payslip-row.ep-deduction {
  color: #b91c1c;
}
.ep-payslip-row.ep-deduction strong { color: #b91c1c; }

.ep-payslip-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
}

.ep-payslip-net {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: 12px;
  text-align: center;
}
.ep-payslip-net-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ep-payslip-net-lbp {
  font-size: 1.4rem;
  font-weight: 800;
  color: #14532d;
  margin-top: 4px;
}
.ep-payslip-net-usd {
  font-size: 0.95rem;
  font-weight: 600;
  color: #166534;
}

/* ─── History stats grid ───────────────────────────────── */
.ep-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.ep-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}
.ep-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}
.ep-stat-label {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── Employee portal dark theme overrides ───────────────── */
:root[data-theme="dark"] #employee-portal-screen {
  background: #0f172a;
  color: #f1f5f9;
}
:root[data-theme="dark"] .ep-card {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
}
:root[data-theme="dark"] .ep-card-title { color: #f1f5f9; }
:root[data-theme="dark"] .ep-card-sub   { color: #94a3b8; }
:root[data-theme="dark"] .ep-stat       { background: #0f172a; border-color: #334155; }
:root[data-theme="dark"] .ep-stat-value { color: #f1f5f9; }
:root[data-theme="dark"] .ep-stat-label { color: #94a3b8; }
:root[data-theme="dark"] .ep-empty-text { color: #f1f5f9; }
:root[data-theme="dark"] .ep-empty-sub  { color: #94a3b8; }

/* Form controls — both class-based (.ep-input) and any input/select/textarea */
:root[data-theme="dark"] .ep-input,
:root[data-theme="dark"] #employee-portal-screen input,
:root[data-theme="dark"] #employee-portal-screen select,
:root[data-theme="dark"] #employee-portal-screen textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
  /* Tells the browser to use its dark-mode native widgets, which renders the
     calendar / month / time picker icons in white instead of black. Works in
     Chrome, Edge, Safari, Firefox — both desktop and mobile. */
  color-scheme: dark;
}
:root[data-theme="dark"] .ep-input::placeholder,
:root[data-theme="dark"] #employee-portal-screen input::placeholder,
:root[data-theme="dark"] #employee-portal-screen textarea::placeholder {
  color: #64748b !important;
}
/* Native dropdown options (where supported) */
:root[data-theme="dark"] #employee-portal-screen select option {
  background: #1e293b;
  color: #f1f5f9;
}
/* Belt-and-suspenders: also invert the calendar icon for browsers that
   don't fully respect color-scheme on the input element. */
:root[data-theme="dark"] #employee-portal-screen input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] #employee-portal-screen input[type="month"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] #employee-portal-screen input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
  cursor: pointer;
}

/* Quick-tools tiles & action buttons */
:root[data-theme="dark"] #employee-portal-screen a[href][target="_blank"] {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
:root[data-theme="dark"] #employee-portal-screen .ep-btn:not(.ep-btn-primary) {
  background: #334155;
  color: #f1f5f9;
}

/* History list — items, notes, status pills */
:root[data-theme="dark"] #employee-portal-screen .ep-history-item,
:root[data-theme="dark"] #employee-portal-screen [style*="background:#f8fafc"],
:root[data-theme="dark"] #employee-portal-screen [style*="background: #f8fafc"],
:root[data-theme="dark"] #employee-portal-screen [style*="background:#f1f5f9"],
:root[data-theme="dark"] #employee-portal-screen [style*="background: #f1f5f9"] {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}
/* History note bubble (often background:#fff inline) */
:root[data-theme="dark"] #employee-portal-screen [style*="background:#fff"],
:root[data-theme="dark"] #employee-portal-screen [style*="background: #fff"],
:root[data-theme="dark"] #employee-portal-screen [style*="background:#ffffff"] {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

/* Pay-slip rendered HTML rows + headings + amounts */
:root[data-theme="dark"] #employee-portal-screen .ep-payslip,
:root[data-theme="dark"] #employee-portal-screen .ep-payslip table,
:root[data-theme="dark"] #employee-portal-screen .ep-payslip td,
:root[data-theme="dark"] #employee-portal-screen .ep-payslip th {
  background: transparent;
  color: #f1f5f9;
  border-color: #334155;
}

/* Pay slip — keep light-mode text styling, just make container dark.
   The .ep-card dark background already applies; section dividers softened. */
:root[data-theme="dark"] .ep-payslip-section { border-top-color: #334155; }

/* Greeting card — light-blue gradient → dark blue */
:root[data-theme="dark"] .ep-greeting {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
  color: #f1f5f9 !important;
}

/* Note cards — inline gradient white→#f8fafc, override with !important */
:root[data-theme="dark"] .ep-note-card {
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border-color: #334155 !important;
  border-left-color: #3b82f6 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}
:root[data-theme="dark"] .ep-note-card:hover {
  border-left-color: #60a5fa !important;
}

/* History request items (absence + permanence rows) */
:root[data-theme="dark"] .ep-request {
  background: #0f172a;
  border-color: #334155;
}
:root[data-theme="dark"] .ep-request-date    { color: #f1f5f9; }
:root[data-theme="dark"] .ep-request-cat     { color: #94a3b8; }
:root[data-theme="dark"] .ep-request-reason  { color: #cbd5e1; }
:root[data-theme="dark"] .ep-request-review  {
  background: #1e3a8a;
  color: #dbeafe;
}

/* Status pills — keep accent colors, lighten the surface for contrast */
:root[data-theme="dark"] .ep-status-pending  { background: #422006; color: #fef3c7; }
:root[data-theme="dark"] .ep-status-approved { background: #052e16; color: #bbf7d0; }
:root[data-theme="dark"] .ep-status-rejected { background: #450a0a; color: #fee2e2; }

/* Custom date filter button + dropdown menu in history AND pay slip */
:root[data-theme="dark"] #ep-hist-date-btn,
:root[data-theme="dark"] #ep-payslip-date-btn {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}
:root[data-theme="dark"] #ep-hist-date-menu,
:root[data-theme="dark"] #ep-payslip-date-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5) !important;
}
:root[data-theme="dark"] #ep-hist-date-menu *,
:root[data-theme="dark"] #ep-payslip-date-menu * { color: #f1f5f9; }
:root[data-theme="dark"] #ep-hist-date-menu small,
:root[data-theme="dark"] #ep-payslip-date-menu small { color: #94a3b8 !important; }
:root[data-theme="dark"] #ep-hist-date-menu button:hover,
:root[data-theme="dark"] #ep-payslip-date-menu button:hover {
  background: #334155 !important;
}
/* Disabled (future) month buttons in pay-slip picker stay subdued */
:root[data-theme="dark"] #ep-payslip-date-menu button[disabled] {
  background: #0f172a !important;
  color: #475569 !important;
  border-color: #334155 !important;
  cursor: not-allowed !important;
}

/* ── Notification bell + panel ─────────────────────────── */
.ep-bell {
  position: relative;
}
.ep-bell-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  border: 2px solid rgba(15, 23, 42, 0.95);
  animation: bell-pulse 1.6s ease-in-out infinite;
}
@keyframes bell-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.ep-bell-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: 480px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ep-bell-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
  color: #1e293b;
}
.ep-bell-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.ep-bell-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 8px 16px 4px;
}
.ep-bell-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}
.ep-bell-item:last-child { border-bottom: none; }
.ep-bell-item:hover { background: #f1f5f9; }
.ep-bell-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}
.ep-bell-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ep-bell-item-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-bell-item-sub {
  font-size: 0.74rem;
  color: #64748b;
}

/* Dark theme for the bell + panel */
:root[data-theme="dark"] .ep-bell-panel {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] .ep-bell-panel-header {
  background: #0f172a;
  border-bottom-color: #334155;
  color: #f1f5f9;
}
:root[data-theme="dark"] .ep-bell-section-label { color: #94a3b8; }
:root[data-theme="dark"] .ep-bell-item { border-bottom-color: #334155; }
:root[data-theme="dark"] .ep-bell-item:hover { background: #334155; }
:root[data-theme="dark"] .ep-bell-item-title { color: #f1f5f9; }
:root[data-theme="dark"] .ep-bell-item-sub   { color: #94a3b8; }

/* ── Announcement cards (employee portal) ─────────────── */
.ep-announcement {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.ep-announcement-unread {
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}
.ep-announcement-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.ep-announcement-title {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.98rem;
  flex: 1;
  min-width: 0;
}
.ep-announcement-new {
  font-size: 0.6rem;
  background: #2563eb;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.ep-announcement-meta {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 3px;
}
.ep-announcement-body {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #1e293b;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Dark theme for announcement cards */
:root[data-theme="dark"] .ep-announcement {
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border-color: #334155 !important;
  border-left-color: #475569 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
:root[data-theme="dark"] .ep-announcement-unread {
  background: linear-gradient(180deg, #1e3a8a, #1e40af) !important;
  border-color: #3b82f6 !important;
  border-left-color: #60a5fa !important;
}
:root[data-theme="dark"] .ep-announcement-title { color: #f1f5f9; }
:root[data-theme="dark"] .ep-announcement-meta  { color: #94a3b8; }
:root[data-theme="dark"] .ep-announcement-body  { color: #e2e8f0; }
:root[data-theme="dark"] .ep-announcement-unread .ep-announcement-title,
:root[data-theme="dark"] .ep-announcement-unread .ep-announcement-body { color: #ffffff; }
:root[data-theme="dark"] .ep-announcement-unread .ep-announcement-meta { color: #bfdbfe; }
:root[data-theme="dark"] .ep-announcement-new {
  background: #60a5fa;
  color: #0f172a;
}

/* Year header rows in pay-slip picker — light slate so they're visible on
   the dark dropdown background */
.ep-payslip-year-btn:hover { background: #eff6ff !important; }
:root[data-theme="dark"] .ep-payslip-year-btn {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
:root[data-theme="dark"] .ep-payslip-year-btn:hover {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
}
:root[data-theme="dark"] .ep-payslip-year-btn small { color: #94a3b8 !important; }

/* Calendar / month / time picker icon — bulletproof white-on-dark.
   Some Edge / Safari builds ignore filter on the pseudo-element, so we add
   accent-color and color-scheme: dark on the parent input as well. */
:root[data-theme="dark"] #employee-portal-screen input[type="date"],
:root[data-theme="dark"] #employee-portal-screen input[type="month"],
:root[data-theme="dark"] #employee-portal-screen input[type="time"] {
  color-scheme: dark !important;
  accent-color: #3b82f6;
}
:root[data-theme="dark"] #employee-portal-screen input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] #employee-portal-screen input[type="month"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] #employee-portal-screen input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) !important;
  opacity: 0.9 !important;
  cursor: pointer !important;
}

/* Drawer body — flip from white to dark */
:root[data-theme="dark"] .ep-drawer {
  background: #1e293b;
  box-shadow: 4px 0 20px rgba(0,0,0,0.45);
}
:root[data-theme="dark"] .ep-drawer-nav { background: #1e293b; }
:root[data-theme="dark"] .ep-drawer-item {
  color: #e2e8f0;
  background: transparent;
}
:root[data-theme="dark"] .ep-drawer-item:hover { background: #334155; }
:root[data-theme="dark"] .ep-drawer-item.active {
  background: #1e3a8a;
  color: #ffffff;
}
:root[data-theme="dark"] .ep-drawer-footer {
  background: #1e293b;
  border-top-color: #334155;
}
/* Footer language + theme buttons */
:root[data-theme="dark"] .ep-drawer-footer button[data-lang],
:root[data-theme="dark"] .ep-drawer-footer button[data-theme-opt] {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}
/* Active (selected) language / theme button */
:root[data-theme="dark"] .ep-drawer-footer button[data-lang][style*="2563eb"],
:root[data-theme="dark"] .ep-drawer-footer button[data-theme-opt][style*="2563eb"] {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
:root[data-theme="dark"] .ep-link-btn { color: #f87171; }
