/* ============================================================
   Greenco Property Group — HR System
   app.css — Mobile-first, PWA-ready
   Colours: #8DC63F (green) | #1e2235 (dark) | #ffffff (white)
   Fonts: Plus Jakarta Sans (headings) | Inter (body)
   ============================================================ */

/* ── Reset & Root ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #8DC63F;
  --green-dark:   #6fa82e;
  --green-light:  #f0f8e6;
  --green-mid:    #c8e89a;
  --dark:         #1e2235;
  --dark-mid:     #2d3452;
  --dark-light:   #3d4466;
  --grey:         #6b7280;
  --grey-light:   #f4f5f7;
  --grey-mid:     #e5e7eb;
  --white:        #ffffff;
  --danger:       #dc2626;
  --danger-light: #fee2e2;
  --warning:      #f59e0b;
  --warning-light:#fff8e1;
  --info:         #3b82f6;
  --info-light:   #dbeafe;

  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --shadow:       0 2px 12px rgba(30,34,53,0.08);
  --shadow-md:    0 4px 20px rgba(30,34,53,0.12);
  --shadow-lg:    0 8px 32px rgba(30,34,53,0.16);

  --top-bar-h:    60px;
  --bottom-nav-h: 72px;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overscroll-behavior-x: none; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--grey-light);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }

/* ── App Shell ────────────────────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--top-bar-h) + env(safe-area-inset-top, 0px));
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 16px 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.top-bar-left { display: flex; align-items: center; gap: 14px; }

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 60px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.25s;
}

.top-bar-logo {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.2rem;
  font-weight: 700;
}
.logo-green { color: var(--white); }
.logo-co    { color: var(--green); }
.logo-sub   {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-left: 6px;
  vertical-align: middle;
}

.top-bar-right { display: flex; align-items: center; gap: 10px; }

.notif-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  border-radius: 50%;
  transition: background 0.2s;
}
.notif-btn:hover { background: rgba(255,255,255,0.1); }

.notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--dark);
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  display: flex; align-items: center; justify-content: center;
}

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* ── Side Navigation ──────────────────────────────────────── */
.side-nav {
  position: fixed;
  top: 0; left: -280px;
  width: 280px; height: 100%;
  background: var(--dark);
  z-index: 200;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.side-nav.open { left: 0; visibility: visible; }

.side-nav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: env(safe-area-inset-top, 0);
  overflow-y: auto;
}

.side-nav-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.side-nav-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.side-nav-name {
  font-weight: 600;
  color: var(--white);
  font-size: 0.9rem;
}
.side-nav-role {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  text-transform: capitalize;
}

.nav-links {
  list-style: none;
  padding: 12px 12px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.nav-link:hover, .nav-link.active {
  background: rgba(141,198,63,0.12);
  color: var(--white);
}
.nav-link.active { color: var(--green); }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 8px 12px 4px;
}

.side-nav-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
}
.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.logout-link:hover { color: var(--danger); }

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
}
.nav-overlay.visible { display: block; }

/* ── Page Content ─────────────────────────────────────────── */
.page-content {
  margin-top: calc(var(--top-bar-h) + env(safe-area-inset-top, 0px));
  margin-bottom: var(--bottom-nav-h);
  padding-bottom: 16px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 767px) {
  .page-content {
    padding-bottom: calc(var(--bottom-nav-h) + 16px);
  }
}

.page-wrap {
  padding: 20px 16px;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--grey-mid);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--grey);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 4px;
  transition: color 0.2s;
  position: relative;
}
.bottom-nav-item.active { color: var(--green-dark); }
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  background: var(--green);
  border-radius: 2px 2px 0 0;
}

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-body {
  background: var(--grey-light);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}


.auth-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  touch-action: pan-y;
}

.auth-shell-centered {
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Brand panel — desktop only */
.auth-brand {
  display: none;
  background: var(--dark);
  flex: 1;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 320px; height: 320px;
  background: var(--green);
  opacity: 0.06;
  border-radius: 50%;
}
.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 240px; height: 240px;
  background: var(--green);
  opacity: 0.08;
  border-radius: 50%;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  padding: 60px 56px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.auth-brand-sub {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 48px;
}

.auth-brand-tagline {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  max-width: 280px;
}

.auth-brand-dots {
  display: flex;
  gap: 8px;
  margin-top: 40px;
}
.auth-brand-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.auth-brand-dots span:first-child { background: var(--green); }

.auth-form-panel {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  flex: 1;
}

.auth-panel-full {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
  padding: 0;
}

.auth-form-narrow {
  max-width: 360px;
  padding: 36px 32px;
}

.auth-logo-mobile {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 28px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.auth-logo-mobile svg {
  width: 160px;
  height: auto;
  display: block;
  max-width: 100%;
}
.auth-logo-mobile .logo-green { color: var(--dark); }
.auth-logo-mobile .logo-co    { color: var(--green); }
.auth-logo-mobile-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  margin-left: 6px;
}

.auth-title {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.75rem;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.2;
}
.auth-subtitle {
  color: var(--grey);
  font-size: 0.9rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-help {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--grey);
}
.auth-help a { color: var(--green-dark); font-weight: 500; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-label-link {
  font-weight: 500;
  color: var(--green-dark);
  font-size: 0.78rem;
}

.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(141,198,63,0.15);
}
.form-input::placeholder { color: #c4c9d4; }

.form-hint {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--grey);
  padding: 4px;
  line-height: 0;
}

.password-strength {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
  min-height: 18px;
  transition: color 0.3s;
}

.otp-input {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-weight: 700;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(141,198,63,0.3);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-full { width: 100%; }

.btn-approve {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1.5px solid var(--green-mid);
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  flex: 1;
}
.btn-approve:hover { background: var(--green); color: white; }

.btn-review {
  background: var(--grey-light);
  color: var(--grey);
  border: 1.5px solid var(--grey-mid);
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 4px;
}
.alert-error { background: var(--danger-light); color: var(--danger); }
.alert-info  { background: var(--info-light);   color: var(--info);   }
.alert svg   { flex-shrink: 0; margin-top: 1px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Sections ─────────────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 10px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--grey);
}
.section-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-dark);
}

/* ── List Items ───────────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--grey-mid);
  transition: background 0.15s;
}
.list-item:last-child { border-bottom: none; }
.list-item-link:hover { background: var(--grey-light); }
.list-item-urgent { border-left: 3px solid var(--green); }

.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

.list-item-icon {
  width: 36px; height: 36px;
  background: var(--grey-light);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey);
  flex-shrink: 0;
}
.list-item-icon-green { background: var(--green-light); color: var(--green-dark); }

/* ── Balance Card ─────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: var(--green);
  opacity: 0.08;
  border-radius: 50%;
}
.balance-card-compact { padding: 18px 16px; }

.balance-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}
.balance-days {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 2.8rem;
  color: var(--white);
  line-height: 1;
}
.balance-unit {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 500;
  margin-top: 3px;
}

.balance-card-right {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Centred variant — used on employee dashboard */
.balance-card-centred {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.balance-card-pills {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
}
.balance-pill {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  min-width: 52px;
}
.balance-pill-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.balance-pill-lbl {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

/* ── Quick Actions ────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-action {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  color: var(--grey);
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-action-primary { background: var(--green); color: var(--white); box-shadow: 0 4px 14px rgba(141,198,63,0.3); }

/* ── Status Badges ────────────────────────────────────────── */
.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-approved   { background: var(--green-light);   color: var(--green-dark); }
.status-pending    { background: var(--warning-light);  color: var(--warning);    }
.status-declined   { background: var(--danger-light);   color: var(--danger);     }
.status-cancelled  { background: var(--grey-light);     color: var(--grey);       }

.new-badge {
  background: var(--green);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Leave Type Dots ──────────────────────────────────────── */
.leave-type-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.leave-type-holiday     { background: var(--green); }
.leave-type-sick        { background: var(--warning); }
.leave-type-unpaid      { background: var(--grey); }
.leave-type-compassionate { background: var(--info); }
.leave-type-maternity   { background: #ec4899; }
.leave-type-paternity   { background: #8b5cf6; }

.leave-type-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--grey);
  background: var(--grey-light);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: capitalize;
  flex-shrink: 0;
}

/* ── Page Greeting ────────────────────────────────────────── */
.page-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.greeting-title {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.4rem;
  color: var(--dark);
  line-height: 1.2;
}
.greeting-date {
  font-size: 0.8rem;
  color: var(--grey);
  margin-top: 3px;
}

/* ── Manager Stats ────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-val {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.8rem;
  color: var(--dark);
  line-height: 1;
}
.stat-lbl {
  font-size: 0.65rem;
  color: var(--grey);
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* ── Approval Cards ───────────────────────────────────────── */
.approval-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
}
.approval-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.approval-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.approval-name { font-weight: 700; font-size: 0.9rem; color: var(--dark); }
.approval-detail { font-size: 0.78rem; color: var(--grey); margin-top: 2px; }
.approval-note {
  font-size: 0.8rem;
  color: var(--grey);
  font-style: italic;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--grey-light);
  border-radius: var(--radius-xs);
}
.approval-actions { display: flex; gap: 10px; }

.pending-badge-large {
  background: var(--warning-light);
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
}

.team-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.view-more-link {
  text-align: center;
  display: block;
  font-size: 0.82rem;
  color: var(--green-dark);
  font-weight: 600;
  padding: 8px;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state-small {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--grey);
}

/* ── Auth special elements ────────────────────────────────── */
.twofa-icon, .success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

/* ── Desktop breakpoints ──────────────────────────────────── */
@media (min-width: 768px) {
  .auth-brand { display: flex; max-width: 420px; }
  .auth-logo-mobile { display: none; }
  .auth-form-panel { padding: 48px; }
  .auth-panel-full { border-radius: 0; box-shadow: none; max-width: none; }

  .side-nav { left: 0; width: 240px; visibility: visible; }
  .menu-toggle { display: none; }
  .page-content { margin-left: 240px; }
  .bottom-nav { left: 240px; }
  .top-bar { left: 240px; }

  .page-wrap { padding: 28px 24px; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .page-wrap { max-width: 800px; }
  .balance-days { font-size: 3rem; }
}

/* ── PWA safe areas ───────────────────────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .page-content { margin-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
}
/* ============================================================
   Greenco HR — Phase 3 CSS additions
   Append to assets/css/app.css
   ============================================================ */

/* ── Page Headings ────────────────────────────────────────── */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 1.5rem;
  color: var(--dark);
  line-height: 1.2;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey);
  margin-bottom: 2px;
}
.back-link:hover { color: var(--dark); }

/* ── Info Strip ───────────────────────────────────────────── */
.info-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--info-light);
  color: var(--info);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.info-strip strong { font-weight: 700; }

/* ── Form Card ────────────────────────────────────────────── */
.form-card { padding: 20px; }
.form-card form { display: flex; flex-direction: column; gap: 20px; }

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

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-label-optional {
  font-weight: 400;
  color: var(--grey);
  font-size: 0.75rem;
}

/* ── Leave Type Grid ──────────────────────────────────────── */
.leave-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.leave-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.leave-type-option input[type="radio"] { display: none; }
.leave-type-option:hover { border-color: var(--green); background: var(--green-light); }
.leave-type-option.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.leave-type-icon { font-size: 1.2rem; line-height: 1; }
.leave-type-label { font-size: 0.82rem; font-weight: 600; color: var(--dark); }

/* ── Toggle Switch ────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-label input[type="checkbox"] { display: none; }

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--grey-mid);
  border-radius: 12px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-label input:checked ~ .toggle-switch { background: var(--green); }
.toggle-label input:checked ~ .toggle-switch::after { left: 23px; }
.toggle-text { font-size: 0.88rem; font-weight: 500; color: var(--dark); }

/* ── Radio Group ──────────────────────────────────────────── */
.radio-group { display: flex; gap: 10px; }
.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
}
.radio-option input { display: none; }
.radio-option:hover { border-color: var(--green); }
.radio-option.selected { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }

/* ── Days Preview ─────────────────────────────────────────── */
.days-preview {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--dark);
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
}
.days-preview-val {
  font-family: var(--font-display); letter-spacing: -0.02em;
  font-size: 2rem;
  color: var(--green);
  line-height: 1;
}
.days-preview-lbl { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ── Success Card ─────────────────────────────────────────── */
.success-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--green-light);
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 18px;
}
.success-card-icon {
  width: 48px; height: 48px;
  background: var(--green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.success-card-title { font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.success-card-msg { font-size: 0.85rem; color: var(--grey); line-height: 1.5; }

/* ── Leave Row ────────────────────────────────────────────── */
.leave-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.leave-row:last-child { border-bottom: none; }

.leave-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.leave-row-left .leave-type-dot { margin-top: 5px; }

.leave-row-type {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.leave-row-dates { font-size: 0.78rem; color: var(--grey); margin-top: 2px; }
.leave-row-note {
  font-size: 0.75rem;
  color: var(--grey);
  font-style: italic;
  margin-top: 4px;
}
.leave-row-reviewer-note {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

.leave-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.leave-half-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--grey-light);
  color: var(--grey);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-cancel-link {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--grey);
  text-align: center;
}
.empty-state p { font-size: 0.9rem; }

/* ── Approval Cards (extended) ────────────────────────────── */
.approval-role { font-size: 0.72rem; color: var(--grey); margin-top: 1px; }

.approval-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grey-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 12px 0;
}
.approval-date-item { flex: 1; }
.approval-date-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); }
.approval-date-val { font-size: 0.85rem; font-weight: 600; color: var(--dark); margin-top: 2px; }
.approval-date-sep { color: var(--grey); font-size: 1rem; }

.approval-balance-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
}
.balance-warning { background: var(--warning-light); color: var(--warning); }

.approval-submitted {
  font-size: 0.72rem;
  color: var(--grey);
  margin-bottom: 12px;
}

/* ── Detail Card ──────────────────────────────────────────── */
.detail-card { padding: 20px; }
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.approval-avatar-lg { width: 52px; height: 52px; font-size: 1rem; }
.detail-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.detail-role { font-size: 0.78rem; color: var(--grey); margin-top: 2px; }

.detail-rows { display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-mid);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { font-size: 0.8rem; color: var(--grey); font-weight: 500; flex-shrink: 0; }
.detail-row-val { font-size: 0.88rem; font-weight: 600; color: var(--dark); text-align: right; }
.text-green { color: var(--green-dark); }
.text-danger { color: var(--danger); }

/* ── Decision Options ─────────────────────────────────────── */
.decision-options { display: flex; gap: 12px; }
.decision-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s;
}
.decision-option input { display: none; }
.decision-approve.selected { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.decision-decline.selected { border-color: var(--danger); background: var(--danger-light); color: var(--danger); }
.decision-approve:hover { border-color: var(--green); }
.decision-decline:hover { border-color: var(--danger); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .leave-type-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .approval-dates { flex-wrap: wrap; }
}
/* ============================================================
   Greenco HR — Phase 4 CSS additions
   Append contents to assets/css/app.css
   ============================================================ */

/* ── Section Count ────────────────────────────────────────── */
.section-count {
  font-size: 0.75rem;
  color: var(--grey);
  font-weight: 500;
}

/* ── Payslip Row ──────────────────────────────────────────── */
.payslip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.payslip-row:last-child { border-bottom: none; }

.payslip-row-icon {
  width: 40px; height: 40px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
  flex-shrink: 0;
}

.payslip-row-content { flex: 1; min-width: 0; }
.payslip-row-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.payslip-row-meta {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

.payslip-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.payslip-action-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--grey-light);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.payslip-action-btn:hover { background: var(--dark); color: white; }
.payslip-action-danger:hover { background: var(--danger-light); color: var(--danger); }

/* ── Payslip Meta Card ────────────────────────────────────── */
.payslip-meta-card { padding: 20px; }
.payslip-meta-row {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.payslip-meta-item { flex: 1; }
.payslip-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-bottom: 3px;
}
.payslip-meta-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
}

.payslip-actions-row {
  display: flex;
  gap: 10px;
}

/* ── Secondary Button ─────────────────────────────────────── */
.btn-secondary {
  background: var(--grey-light);
  color: var(--dark);
  border: 1.5px solid var(--grey-mid);
}
.btn-secondary:hover { background: var(--grey-mid); }

/* ── PDF Viewer ───────────────────────────────────────────── */
.pdf-viewer-wrap {
  background: var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 500px;
  position: relative;
}

.pdf-viewer-frame {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  border: none;
  display: block;
}

.pdf-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--grey);
}

/* Show fallback when iframe fails (JS detects) */
.pdf-viewer-wrap.iframe-failed .pdf-viewer-frame { display: none; }
.pdf-viewer-wrap.iframe-failed .pdf-fallback { display: flex; }

/* ── File Upload Area ─────────────────────────────────────── */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--grey-mid);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.file-upload-area:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.file-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  pointer-events: none;
}

.file-upload-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.file-upload-hint {
  font-size: 0.75rem;
  color: var(--grey);
}

/* ── Form Select ──────────────────────────────────────────── */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
/* ============================================================
   Greenco HR — Phase 3 CSS additions
   Append to assets/css/app.css
   ============================================================ */

/* ── Page Headings ────────────────────────────────────────── */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--dark);
  line-height: 1.2;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey);
  margin-bottom: 2px;
}
.back-link:hover { color: var(--dark); }

/* ── Info Strip ───────────────────────────────────────────── */
.info-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--info-light);
  color: var(--info);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.info-strip strong { font-weight: 700; }

/* ── Form Card ────────────────────────────────────────────── */
.form-card { padding: 20px; }
.form-card form { display: flex; flex-direction: column; gap: 20px; }

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

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-label-optional {
  font-weight: 400;
  color: var(--grey);
  font-size: 0.75rem;
}

/* ── Leave Type Grid ──────────────────────────────────────── */
.leave-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.leave-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.leave-type-option input[type="radio"] { display: none; }
.leave-type-option:hover { border-color: var(--green); background: var(--green-light); }
.leave-type-option.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.leave-type-icon { font-size: 1.2rem; line-height: 1; }
.leave-type-label { font-size: 0.82rem; font-weight: 600; color: var(--dark); }

/* ── Toggle Switch ────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-label input[type="checkbox"] { display: none; }

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--grey-mid);
  border-radius: 12px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-label input:checked ~ .toggle-switch { background: var(--green); }
.toggle-label input:checked ~ .toggle-switch::after { left: 23px; }
.toggle-text { font-size: 0.88rem; font-weight: 500; color: var(--dark); }

/* ── Radio Group ──────────────────────────────────────────── */
.radio-group { display: flex; gap: 10px; }
.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
}
.radio-option input { display: none; }
.radio-option:hover { border-color: var(--green); }
.radio-option.selected { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }

/* ── Days Preview ─────────────────────────────────────────── */
.days-preview {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--dark);
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
}
.days-preview-val {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green);
  line-height: 1;
}
.days-preview-lbl { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ── Success Card ─────────────────────────────────────────── */
.success-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--green-light);
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 18px;
}
.success-card-icon {
  width: 48px; height: 48px;
  background: var(--green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.success-card-title { font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.success-card-msg { font-size: 0.85rem; color: var(--grey); line-height: 1.5; }

/* ── Leave Row ────────────────────────────────────────────── */
.leave-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.leave-row:last-child { border-bottom: none; }

.leave-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.leave-row-left .leave-type-dot { margin-top: 5px; }

.leave-row-type {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.leave-row-dates { font-size: 0.78rem; color: var(--grey); margin-top: 2px; }
.leave-row-note {
  font-size: 0.75rem;
  color: var(--grey);
  font-style: italic;
  margin-top: 4px;
}
.leave-row-reviewer-note {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

.leave-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.leave-half-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--grey-light);
  color: var(--grey);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-cancel-link {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--grey);
  text-align: center;
}
.empty-state p { font-size: 0.9rem; }

/* ── Approval Cards (extended) ────────────────────────────── */
.approval-role { font-size: 0.72rem; color: var(--grey); margin-top: 1px; }

.approval-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grey-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 12px 0;
}
.approval-date-item { flex: 1; }
.approval-date-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); }
.approval-date-val { font-size: 0.85rem; font-weight: 600; color: var(--dark); margin-top: 2px; }
.approval-date-sep { color: var(--grey); font-size: 1rem; }

.approval-balance-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
}
.balance-warning { background: var(--warning-light); color: var(--warning); }

.approval-submitted {
  font-size: 0.72rem;
  color: var(--grey);
  margin-bottom: 12px;
}

/* ── Detail Card ──────────────────────────────────────────── */
.detail-card { padding: 20px; }
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.approval-avatar-lg { width: 52px; height: 52px; font-size: 1rem; }
.detail-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.detail-role { font-size: 0.78rem; color: var(--grey); margin-top: 2px; }

.detail-rows { display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-mid);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label { font-size: 0.8rem; color: var(--grey); font-weight: 500; flex-shrink: 0; }
.detail-row-val { font-size: 0.88rem; font-weight: 600; color: var(--dark); text-align: right; }
.text-green { color: var(--green-dark); }
.text-danger { color: var(--danger); }

/* ── Decision Options ─────────────────────────────────────── */
.decision-options { display: flex; gap: 12px; }
.decision-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px solid var(--grey-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s;
}
.decision-option input { display: none; }
.decision-approve.selected { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.decision-decline.selected { border-color: var(--danger); background: var(--danger-light); color: var(--danger); }
.decision-approve:hover { border-color: var(--green); }
.decision-decline:hover { border-color: var(--danger); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .leave-type-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .approval-dates { flex-wrap: wrap; }
}
/* ============================================================
   Greenco HR — Phase 4 CSS additions
   Append contents to assets/css/app.css
   ============================================================ */

/* ── Section Count ────────────────────────────────────────── */
.section-count {
  font-size: 0.75rem;
  color: var(--grey);
  font-weight: 500;
}

/* ── Payslip Row ──────────────────────────────────────────── */
.payslip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.payslip-row:last-child { border-bottom: none; }

.payslip-row-icon {
  width: 40px; height: 40px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
  flex-shrink: 0;
}

.payslip-row-content { flex: 1; min-width: 0; }
.payslip-row-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.payslip-row-meta {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

.payslip-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.payslip-action-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--grey-light);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.payslip-action-btn:hover { background: var(--dark); color: white; }
.payslip-action-danger:hover { background: var(--danger-light); color: var(--danger); }

/* ── Payslip Meta Card ────────────────────────────────────── */
.payslip-meta-card { padding: 20px; }
.payslip-meta-row {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.payslip-meta-item { flex: 1; }
.payslip-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-bottom: 3px;
}
.payslip-meta-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
}

.payslip-actions-row {
  display: flex;
  gap: 10px;
}

/* ── Secondary Button ─────────────────────────────────────── */
.btn-secondary {
  background: var(--grey-light);
  color: var(--dark);
  border: 1.5px solid var(--grey-mid);
}
.btn-secondary:hover { background: var(--grey-mid); }

/* ── PDF Viewer ───────────────────────────────────────────── */
.pdf-viewer-wrap {
  background: var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 500px;
  position: relative;
}

.pdf-viewer-frame {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  border: none;
  display: block;
}

.pdf-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--grey);
}

/* Show fallback when iframe fails (JS detects) */
.pdf-viewer-wrap.iframe-failed .pdf-viewer-frame { display: none; }
.pdf-viewer-wrap.iframe-failed .pdf-fallback { display: flex; }

/* ── File Upload Area ─────────────────────────────────────── */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--grey-mid);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.file-upload-area:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.file-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  pointer-events: none;
}

.file-upload-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.file-upload-hint {
  font-size: 0.75rem;
  color: var(--grey);
}

/* ── Form Select ──────────────────────────────────────────── */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
/* ============================================================
   Greenco HR — Phase 5 CSS additions
   Append to assets/css/app.css
   ============================================================ */

/* ── Hours Row (employee view) ────────────────────────────── */
.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.hours-row:last-child { border-bottom: none; }

.hours-row-left { flex: 1; min-width: 0; }
.hours-row-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.hours-row-meta {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}
.hours-row-right { flex-shrink: 0; }

/* ── Hours Team Row (manager view) ───────────────────────── */
.hours-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-mid);
}
.hours-team-row:last-child { border-bottom: none; }

.hours-team-info { flex: 1; min-width: 0; }
.hours-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
}
.hours-team-detail {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

/* ── Text button green ────────────────────────────────────── */
.btn-text-green {
  background: none;
  border: none;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-text-green:hover { text-decoration: underline; }

/* ── Confirmation token field ─────────────────────────────── */
.confirmation_token { display: none; }
/* ============================================================
   Greenco HR — Phase 6 CSS additions
   Append to assets/css/app.css
   ============================================================ */

/* ── Employee Row ─────────────────────────────────────────── */
.employee-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-mid);
  transition: background 0.15s;
}
.employee-row:last-child { border-bottom: none; }
.employee-row:hover { background: var(--grey-light); }

.emp-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.emp-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.emp-info { flex: 1; min-width: 0; }
.emp-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.emp-meta {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.emp-hours {
  font-size: 0.72rem;
  color: var(--grey);
  font-weight: 500;
}

.emp-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Role Badges ──────────────────────────────────────────── */
.role-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role-manager { background: var(--info-light);    color: var(--info);        }
.role-admin   { background: var(--green-light);   color: var(--green-dark);  }

/* ── Form Section Title ───────────────────────────────────── */
.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  padding-top: 4px;
  border-top: 1px solid var(--grey-mid);
  margin-top: 4px;
}
.form-section-title:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ── Danger Zone ──────────────────────────────────────────── */
.danger-zone {
  background: var(--white);
  border: 1.5px solid var(--danger-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.danger-zone-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--danger);
}
.danger-zone-desc {
  font-size: 0.78rem;
  color: var(--grey);
}
.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
}
.btn-danger:hover { background: var(--danger); color: white; }
/* ============================================================
   Greenco HR — Phase 7 CSS
   Append to assets/css/app.css
   ============================================================ */

/* ── Month Navigator ──────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.cal-nav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grey-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
  transition: all 0.2s;
  text-decoration: none;
}
.cal-nav-btn:hover { background: var(--green-light); color: var(--green-dark); }

.cal-nav-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
}

/* ── Desktop Grid (hidden on mobile) ─────────────────────── */
.cal-grid-wrap { display: none; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-day-header {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 10px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cal-cell {
  background: var(--white);
  min-height: 90px;
  padding: 6px;
  position: relative;
  vertical-align: top;
}

.cal-cell-empty { background: var(--grey-light); }
.cal-weekend    { background: #fafafa; }
.cal-today      { background: var(--green-light); }
.cal-bank-hol   { background: #fff8e1; }

.cal-cell-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.cal-today .cal-cell-date {
  background: var(--green);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cal-weekend .cal-cell-date { color: var(--grey); }

.cal-event {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-holiday      { background: var(--green-light);   color: var(--green-dark); }
.cal-event-sick         { background: var(--warning-light);  color: #b45309; }
.cal-event-unpaid       { background: var(--grey-light);     color: var(--grey); }
.cal-event-compassionate { background: var(--info-light);   color: var(--info); }
.cal-event-maternity    { background: #fce7f3;               color: #9d174d; }
.cal-event-paternity    { background: #ede9fe;               color: #5b21b6; }
.cal-event-other        { background: var(--grey-light);     color: var(--grey); }
.cal-event-bank         { background: #fff8e1;               color: #92400e; font-style: italic; }

/* Pending leave — dashed border */
.cal-event-status-pending {
  border: 1.5px dashed currentColor;
  background: transparent !important;
}

.cal-event-more {
  font-size: 0.6rem;
  color: var(--grey);
  padding: 1px 5px;
}

/* Legend */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 4px 4px;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--grey);
  font-weight: 500;
}
.cal-legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Mobile Agenda (shown on mobile) ─────────────────────── */
.cal-agenda { display: flex; flex-direction: column; gap: 8px; }

.agenda-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.agenda-bank {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.agenda-date {
  text-align: center;
  flex-shrink: 0;
  min-width: 36px;
}
.agenda-day {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}
.agenda-month {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey);
  margin-top: 2px;
}

.agenda-content { flex: 1; min-width: 0; }
.agenda-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}
.agenda-meta {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
}

.agenda-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.agenda-dot-bank { background: #f59e0b; }

/* ── Responsive: show grid on desktop ────────────────────── */
@media (min-width: 768px) {
  .cal-grid-wrap { display: block; }
  .cal-agenda    { display: none;  }
}

/* ============================================================
   Phase 9 — Right to Work
   ============================================================ */

/* Summary cards */
.rtw-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .rtw-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rtw-summary-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
}

.rtw-summary-card.rtw-summary-danger  { border-top-color: var(--danger); }
.rtw-summary-card.rtw-summary-warning { border-top-color: var(--warning); }
.rtw-summary-card.rtw-summary-grey    { border-top-color: var(--grey); }
.rtw-summary-card.rtw-summary-green   { border-top-color: var(--green); }

.rtw-summary-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 4px;
}

.rtw-summary-label {
  font-size: 0.8rem;
  color: var(--grey);
  font-weight: 500;
}

/* Table */
.rtw-table {
  width: 100%;
  border-collapse: collapse;
}

.rtw-table thead th {
  background: var(--grey-light);
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}

.rtw-table tbody tr {
  border-bottom: 1px solid var(--grey-mid);
  transition: background 0.15s;
}

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

.rtw-table tbody tr:hover {
  background: var(--grey-light);
}

.rtw-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  vertical-align: middle;
}

/* Row highlight for issues */
.rtw-row-expired td:first-child {
  border-left: 3px solid var(--danger);
}

.rtw-row-expiring_soon td:first-child {
  border-left: 3px solid var(--danger);
}

.rtw-row-expiring td:first-child {
  border-left: 3px solid var(--warning);
}

.rtw-row-not_checked td:first-child {
  border-left: 3px solid var(--grey);
}

.rtw-row-valid td:first-child {
  border-left: 3px solid var(--green);
}

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

.rtw-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.875rem;
}

.rtw-job {
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 1px;
}

/* Status banner on edit page */
.rtw-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.rtw-status-banner-success {
  background: var(--green-light);
  color: #166534;
  border: 1px solid #bbf7d0;
}

.rtw-status-banner-success svg { stroke: #16a34a; flex-shrink: 0; margin-top: 1px; }

.rtw-status-banner-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.rtw-status-banner-warning svg { stroke: var(--warning); flex-shrink: 0; margin-top: 1px; }

.rtw-status-banner-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.rtw-status-banner-danger svg { stroke: var(--danger); flex-shrink: 0; margin-top: 1px; }

/* Helpers */
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-grey    { color: var(--grey); }
.fw-600       { font-weight: 600; }

/* Nav badge for RTW alerts */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: auto;
  line-height: 1;
}

/* Mobile — hide some table columns */
@media (max-width: 768px) {
  .rtw-table .hide-mobile {
    display: none;
  }
}

/* ============================================================
   Stage 1 Design + Bug Fixes — June 2026
   ============================================================ */

/* ── 1. Hide bottom nav on desktop ─────────────────────────── */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
  .page-content { margin-bottom: 0; }
}


/* ── 3. Team Hours — vibrant avatars (match Team page) ──────── */
.hours-team-row .team-avatar {
  background: #e8f5d9;
  color: #3a6b10;
}
/* Use same per-id colours as employee list */
.team-avatar[data-idx="0"] { background:#e8f5d9; color:#3a6b10; }
.team-avatar[data-idx="1"] { background:#dbeafe; color:#1e40af; }
.team-avatar[data-idx="2"] { background:#ede9fe; color:#5b21b6; }
.team-avatar[data-idx="3"] { background:#fef3c7; color:#92400e; }
.team-avatar[data-idx="4"] { background:#fce7f3; color:#9d174d; }
.team-avatar[data-idx="5"] { background:#ccfbf1; color:#0f766e; }
.team-avatar[data-idx="6"] { background:#ffedd5; color:#c2410c; }

/* ── 4. Calendar legend — ensure dots have colour ───────────── */
.cal-legend-dot.cal-event-holiday      { background: var(--green);    }
.cal-legend-dot.cal-event-sick         { background: var(--warning);  }
.cal-legend-dot.cal-event-unpaid       { background: var(--grey);     }
.cal-legend-dot.cal-event-compassionate{ background: var(--info);     }
.cal-legend-dot.cal-event-bank         { background: #f59e0b;         }
.cal-legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── 5. Documents — filter row always one line ──────────────── */
.doc-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 16px;
  overflow-x: auto;
}
.doc-filters .form-input {
  margin: 0;
  min-width: 0;
  flex: 1;
}
.doc-filters .form-input[type="text"] { flex: 2; max-width: 280px; }
.doc-filters select { max-width: 160px; }

/* ── 6. Security — "Add This Device" full width ─────────────── */
#registerBtn {
  width: 100%;
  justify-content: center;
}

/* ── 7. Security — device icon contrast ─────────────────────── */
.device-icon {
  background: var(--grey-mid);
  color: var(--dark);
}

/* ── 8. Login page — hide decorative dots if static ─────────── */
.auth-dots { display: none; }

/* ── 9. General — consistent primary button style ───────────── */
.btn-primary-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
  font-weight: 600;
}
.btn-primary-outline:hover {
  background: var(--green-light);
}


/* ============================================================
   Stage 4 Design Fixes — June 2026
   ============================================================ */

/* ── Employee profile — pill labels on light background ─────── */
.emp-profile-pills .balance-pill {
  background: var(--grey-light);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 60px;
}
.emp-profile-pills .balance-pill-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}
.emp-profile-pills .balance-pill-lbl {
  font-size: 0.65rem;
  color: var(--grey);
  margin-top: 3px;
  font-weight: 500;
}
.emp-profile-pills .balance-pill:last-child {
  background: var(--green-light);
}
.emp-profile-pills .balance-pill:last-child .balance-pill-val {
  color: var(--green-dark);
}
.emp-profile-pills .balance-pill:last-child .balance-pill-lbl {
  color: var(--green-dark);
  opacity: 0.8;
}

/* ── RTW table — horizontal scroll on narrow viewports ──────── */
.rtw-table { min-width: 700px; }
.rtw-row:hover { background: var(--grey-light); }

/* ── Hours / Send for Signing label consistency ──────────────── */
.send-for-signing-label { font-weight: 600; }


/* ============================================================
   Stage 5 — Styles moved from inline <style> blocks
   ============================================================ */

/* oauth-status detail table (was inline in oauth-status.php) */
/* Already covered by .dv-table — reuse same styles */

/* document-view table */
.dv-table { width:100%;border-collapse:collapse;font-size:0.875rem;table-layout:fixed; }
.dv-table tr { border-bottom:1px solid var(--grey-mid); }
.dv-table tr:last-child { border-bottom:none; }
.dv-table th { width:160px;padding:13px 20px;color:var(--grey);font-weight:500;vertical-align:top;white-space:nowrap; }
.dv-table td { padding:13px 20px;color:var(--dark);overflow-wrap:break-word;word-break:break-word; }
.dv-table td.hash-cell { font-family:monospace;font-size:0.72rem;color:var(--dark);word-break:break-all; }

/* RTW stat cards — responsive grid */
.rtw-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* Approvals tab bar (was inline in approvals.php) */
.tab-bar { display:flex;gap:4px;border-bottom:2px solid var(--grey-mid);padding-bottom:0;margin-bottom:20px; }
.tab-btn { background:none;border:none;padding:10px 18px;font-size:0.875rem;font-weight:600;color:var(--grey);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;display:flex;align-items:center;gap:7px;transition:color .15s; }
.tab-btn.active { color:var(--green-dark);border-bottom-color:var(--green); }
.tab-btn:hover { color:var(--dark); }
.tab-count { background:var(--green);color:#fff;border-radius:20px;padding:1px 7px;font-size:0.72rem;font-weight:700; }

/* Dashboard balance — fix trailing .0 */
.balance-days { font-variant-numeric: tabular-nums; }


/* Required field asterisk — inline with label */
.required { color: var(--danger); margin-left: 2px; font-weight: 700; }

/* Hours team — AWAITING SIGN badge — use info blue instead of orange */
.badge-awaiting { background: #dbeafe; color: #1e40af; }

/* RTW summary grid — override to always be responsive */
.rtw-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* form-actions spacing */
.form-actions { display:flex; gap:10px; align-items:center; margin-top:24px; }


/* Status badge — info/blue for awaiting-sign states */
.status-info { background: #dbeafe; color: #1e40af; }


/* ============================================================
   Stage 6 Fixes
   ============================================================ */

/* BUG #1 FIX — employee profile pills — dark text on light bg  */
/* Override the base white-on-dark pill style for profile context */
.emp-profile-pills .balance-pill {
  background: var(--grey-light) !important;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 64px;
}
.emp-profile-pills .balance-pill-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark) !important;
  line-height: 1;
}
.emp-profile-pills .balance-pill-lbl {
  font-size: 0.65rem;
  color: var(--grey) !important;
  margin-top: 3px;
  font-weight: 500;
}
/* Highlight the Remaining pill */
.emp-profile-pills .balance-pill:last-child {
  background: var(--green-light) !important;
}
.emp-profile-pills .balance-pill:last-child .balance-pill-val {
  color: var(--green-dark) !important;
}
.emp-profile-pills .balance-pill:last-child .balance-pill-lbl {
  color: var(--green-dark) !important;
}

/* BUG #3 FIX — status-info badge — explicit blue, higher specificity */
.status-badge.status-info {
  background: #dbeafe !important;
  color: #1e40af !important;
}


/* ============================================================
   Stage 7 Fixes
   ============================================================ */

/* Stronger form input borders — visible on all backgrounds/mobile */
.form-input {
  border: 1.5px solid #c4c9d4 !important;
  background: #ffffff !important;
}
.form-input:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(141,198,63,0.15) !important;
}

/* Avatar dropdown */
.avatar-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.avatar-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  min-width: 200px;
  z-index: 500;
  overflow: hidden;
  border: 1px solid var(--grey-mid);
}
.avatar-dropdown-menu.open { display: block; }
.avatar-dropdown-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--grey-mid);
}
.avatar-dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
}
.avatar-dropdown-role {
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 2px;
  text-transform: capitalize;
}
.avatar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 0.875rem;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.15s;
}
.avatar-dropdown-item:hover { background: var(--grey-light); }
.avatar-dropdown-item.danger { color: var(--danger); }
.avatar-dropdown-item svg { flex-shrink: 0; opacity: 0.7; }

/* PDF viewer — hide iframe on mobile, show buttons only */
@media (max-width: 768px) {
  .pdf-viewer-wrap { display: none; }
  .payslip-mobile-notice {
    background: var(--grey-light);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--grey);
  }
}
@media (min-width: 769px) {
  .payslip-mobile-notice { display: none; }
}


/* ============================================================
   Stage 9 — Employee profile card redesign
   ============================================================ */

/* Profile pills — always dark text on light bg */
.emp-profile-pills .balance-pill {
  background: var(--grey-light) !important;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 70px;
  flex: 1;
  max-width: 100px;
}
.emp-profile-pills .balance-pill-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark) !important;
  line-height: 1;
  font-family: var(--font-display);
}
.emp-profile-pills .balance-pill-lbl {
  font-size: 0.65rem;
  color: var(--grey) !important;
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Last pill (Remaining) gets green treatment */
.emp-profile-pills .balance-pill:last-child {
  background: var(--green-light) !important;
}
.emp-profile-pills .balance-pill:last-child .balance-pill-val {
  color: var(--green-dark) !important;
}
.emp-profile-pills .balance-pill:last-child .balance-pill-lbl {
  color: var(--green-dark) !important;
  opacity: 0.85;
}


/* ============================================================
   Stage 10 — Detail row fix + checklist styles
   ============================================================ */

/* Detail rows — proper label/value layout */
.detail-rows { }
.detail-row {
  display: flex;
  align-items: baseline;
  padding: 13px 20px;
  border-bottom: 1px solid var(--grey-mid);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-label {
  font-size: 0.8rem;
  color: var(--grey);
  font-weight: 500;
  flex-shrink: 0;
  width: 160px;
  min-width: 130px;
}
.detail-row-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left !important;
  flex: 1;
}


/* ================================================================
   Fixes — June 2026
   ================================================================ */

/* ── 1. Nav overlay full-screen + z-index stack ─────────────── */
.top-bar {
  z-index: 195;
}
.bottom-nav {
  z-index: 195;
}
@media (min-width: 768px) {
  .top-bar   { left: 240px; }
  .bottom-nav { left: 240px; z-index: 100; }
}

/* ── 2. Holiday balance pills — no label truncation ─────────── */
.emp-profile-pills {
  flex-wrap: nowrap;
}
.emp-profile-pills .balance-pill {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  padding: 10px 6px !important;
}
.emp-profile-pills .balance-pill-lbl {
  white-space: nowrap !important;
  font-size: 0.56rem !important;
  overflow: visible !important;
  letter-spacing: -0.01em;
}

/* ── 3. Employee profile header — buttons on one row ────────── */
.page-heading {
  flex-wrap: wrap;
  gap: 8px;
}
.page-heading .btn {
  white-space: nowrap;
}

/* ── 4. Detail row values — prevent overflow clipping ───────── */
.detail-row-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── 5. Employee profile tabs — prevent wrapping ────────────── */
.emp-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.emp-tabs::-webkit-scrollbar { display: none; }
.emp-tab {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================================================
   Stage 6 Fixes — June 2026
   ================================================================ */

/* ── 1. Calendar — horizontal scroll on mobile ──────────────── */
@media (max-width: 767px) {
  .cal-grid-wrap {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cal-grid {
    min-width: 560px;
    overflow: visible;
  }
  .cal-agenda {
    display: none;
  }
}

/* ── 2. Leave balance card — prevent overflow on mobile ─────── */
@media (max-width: 767px) {
  .balance-card {
    flex-direction: column;
    gap: 12px;
  }
  .balance-card-right,
  .balance-card-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
  }
  .balance-pill {
    min-width: 0;
  }
  .balance-pill-lbl {
    font-size: 0.55rem;
    white-space: nowrap;
  }
}

/* ── 3. Leave request form — stack date fields on mobile ─────── */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Employee list — truncate long names cleanly ────────── */
.emp-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.emp-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* ── Hide role badges on mobile — name space more important ─ */
@media (max-width: 767px) {
  .role-badge { display: none; }
  .emp-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* ── Employee profile tabs — standalone fix ─────────────── */
.emp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--grey-mid);
  margin-bottom: 16px;
  margin-top: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.emp-tabs::-webkit-scrollbar { display: none; }
.emp-tab {
  background: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey);
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none !important;
}
.emp-tab.active {
  color: var(--green-dark) !important;
  border-bottom-color: var(--green) !important;
}
.emp-tab:hover { color: var(--dark); }
.emp-tab-panel { display: none !important; }
.emp-tab-panel.active { display: block !important; }

/* ── Bank holiday leave type dot ────────────────────────── */
.leave-type-bank_holiday { background: #1e2235; }
.leave-type-other        { background: #6b7280; }

/* ── Additional leave type dot colours ──────────────────── */
.leave-type-appointment { background: #0ea5e9; }
.leave-type-medical     { background: #ef4444; }
.leave-type-toil        { background: #f97316; }
