/* Arctic Frost Neomorphism Design System */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────── */
/* PART 1: ROOT COLOR SYSTEM              */
/* ─────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg:         #EEF4FA;
  --bg2:        #E5EDF6;

  /* Shadows */
  --shadow-d:   #BDD0E4;
  --shadow-l:   #FFFFFF;

  /* Blue accent family */
  --blue:       #1B6BAA;
  --blue-mid:   #3A7EC7;
  --blue-light: #5B9DD4;
  --blue-pale:  #A8CCE8;
  --blue-tint:  #DCEEf8;

  /* Text hierarchy */
  --text-1:     #1A3A5C;
  --text-2:     #3D6A8A;
  --text-3:     #7AAABF;

  /* Semantic */
  --red:        #D94F6A;
  --yellow:     #C98A00;

  /* Neomorphic shadows */
  --neo-out:    6px 6px 14px #BDD0E4, -6px -6px 14px #FFFFFF;
  --neo-out-sm: 4px 4px 10px #BDD0E4, -4px -4px 10px #FFFFFF;
  --neo-out-xs: 3px 3px 7px #BDD0E4, -3px -3px 7px #FFFFFF;
  --neo-in:     inset 3px 3px 8px #BDD0E4, inset -3px -3px 8px #FFFFFF;
  --neo-in-sm:  inset 2px 2px 5px #BDD0E4, inset -2px -2px 5px #FFFFFF;

  /* Border radius */
  --radius-lg:  22px;
  --radius-md:  14px;
  --radius-sm:  10px;
  --radius-xs:  8px;
}

/* ─────────────────────────────────────── */
/* PART 2: GLOBAL STYLES                  */
/* ─────────────────────────────────────── */

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

html, body {
  height: 100%;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

/* ─────────────────────────────────────── */
/* PART 3: LOGIN SCREEN                   */
/* ─────────────────────────────────────── */

#screen-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(150deg, #EEF4FA 0%, #E0ECF7 50%, #D8E8F5 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative radial glow */
#screen-login::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(27, 107, 170, 0.07) 0%, transparent 65%);
  top: -150px;
  right: -150px;
  pointer-events: none;
  z-index: 2;
}

/* ─────────────────────────────────────── */
/* LOGIN BOX */
/* ─────────────────────────────────────── */

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--neo-out);
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 3;
  animation: fadeUp 0.6s ease;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────── */
/* LOGO */
/* ─────────────────────────────────────── */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: var(--neo-out-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'DM Mono', monospace;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 0.62rem;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: 2.5px;
  margin-top: 2px;
}

/* ─────────────────────────────────────── */
/* LOGIN HEADINGS */
/* ─────────────────────────────────────── */

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 1.8rem;
}

/* ─────────────────────────────────────── */
/* FORM ELEMENTS */
/* ─────────────────────────────────────── */

.input-group {
  margin-bottom: 1rem;
}

.input-label {
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 7px;
  display: block;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  box-shadow: var(--neo-in);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.input-field:focus {
  box-shadow: var(--neo-in), 0 0 0 2px rgba(27, 107, 170, 0.2);
}

.input-field::placeholder {
  color: var(--text-3);
}

select.input-field option {
  background: #d6e8f5;
  color: var(--text-1);
}

/* ─────────────────────────────────────── */
/* BUTTONS */
/* ─────────────────────────────────────── */

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  box-shadow: var(--neo-out);
  color: var(--blue-mid);
}

.btn-primary:active {
  box-shadow: var(--neo-in-sm);
}

/* ─────────────────────────────────────── */
/* ALERTS & FEEDBACK */
/* ─────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid rgba(217, 79, 106, 0.3);
}

.alert-danger {
  background: rgba(217, 79, 106, 0.08);
  color: var(--red);
}

.alert-success {
  background: rgba(27, 107, 170, 0.08);
  color: var(--blue);
  border-color: rgba(27, 107, 170, 0.3);
}

/* ─────────────────────────────────────── */
/* RESPONSIVE */
/* ─────────────────────────────────────── */

@media (max-width: 600px) {
  .login-box {
    padding: 2rem 1.5rem;
  }

  .login-title {
    font-size: 1.4rem;
  }

  .logo {
    margin-bottom: 1.5rem;
  }
}

/* ─────────────────────────────────────── */
/* PART 4: TOP NAVIGATION                 */
/* ─────────────────────────────────────── */

.topnav {
  background: var(--bg);
  box-shadow: 0 3px 10px var(--shadow-d);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--blue-mid);
  font-weight: 500;
  letter-spacing: 1.5px;
}

.nav-page {
  font-size: 0.8rem;
  color: var(--text-3);
}

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

.avatar {
  width: 34px;
  height: 34px;
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
}

.btn-logout {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: none;
  color: var(--text-3);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  color: var(--red);
  box-shadow: var(--neo-out-sm);
}

/* ─────────────────────────────────────── */
/* PART 5: FLASH MESSAGES                 */
/* ─────────────────────────────────────── */

.flash-message {
  margin: 0.75rem 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}

.flash-notice {
  background: rgba(27, 107, 170, 0.08);
  color: var(--blue);
  border: 1px solid rgba(27, 107, 170, 0.3);
}

.flash-alert {
  background: rgba(217, 79, 106, 0.08);
  color: var(--red);
  border: 1px solid rgba(217, 79, 106, 0.3);
}

/* ─────────────────────────────────────── */
/* PART 6: APP BODY                       */
/* ─────────────────────────────────────── */

.app-body {
  padding: 1.25rem 1.2rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ─────────────────────────────────────── */
/* PART 7: FIELD CHECK-IN                 */
/* ─────────────────────────────────────── */

.field-body {
  padding: 1.2rem;
  flex: 1;
}

/* Status card */
.status-card {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.status-card--in {
  border-left: 4px solid var(--blue);
}

.status-label {
  font-size: 0.7rem;
  color: var(--text-3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.status-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.6rem;
}

.status-value--in {
  color: var(--blue);
}

.status-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 4px;
}

.status-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.status-task-badge {
  background: var(--blue-tint);
  color: var(--blue);
  border-radius: var(--radius-xs);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-site-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-2);
}

.status-since {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-3);
}

.status-gps-warn {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--yellow);
}

/* Locked notice */
.locked-notice {
  font-size: 0.82rem;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 1.2rem;
}

/* Section title */
.section-title {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

/* Task grid */
.task-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.task-card {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.2s, color 0.2s;
  border: 2px solid transparent;
  user-select: none;
}

.task-card:active {
  box-shadow: var(--neo-in-sm);
}

.task-card.selected {
  box-shadow: var(--neo-in-sm);
  border-color: var(--blue-pale);
  background: var(--blue-tint);
}

.task-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  line-height: 1;
}

.task-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.25;
}

.task-card.selected .task-name {
  color: var(--blue);
}

/* Camera grid */
.camera-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.camera-box {
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--blue-pale);
}

.camera-box:active {
  box-shadow: var(--neo-in);
}

.camera-box.captured {
  border-style: solid;
  border-color: var(--blue);
  background-size: cover;
  background-position: center;
}

.camera-box.captured .camera-icon {
  display: none;
}

.camera-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.camera-label {
  font-size: 0.74rem;
  color: var(--text-3);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.camera-box.captured .camera-label {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
  color: var(--text-2);
}

/* GPS bar */
.gps-bar {
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.gps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}

@keyframes gps-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.4); }
}

.gps-dot.active {
  background: var(--blue);
  animation: gps-pulse 1.5s ease-in-out infinite;
}

.gps-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-3);
  flex: 1;
}

/* Cancel confirmation card (inline) */
.cancel-confirm-card {
  display: none;
  background: var(--bg);
  box-shadow: var(--neo-out);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 1.4rem;
  margin-bottom: 1rem;
  animation: fadeUp 0.25s ease;
}

.cancel-confirm-card.active { display: block; }

.cancel-confirm-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}

.cancel-confirm-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.cancel-confirm-row {
  display: flex;
  gap: 10px;
}

.cancel-btn-yes {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn-yes:hover { box-shadow: var(--neo-out); }
.cancel-btn-yes:active { box-shadow: var(--neo-in-sm); }

.cancel-btn-no {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn-no:hover { color: var(--red); }

/* Action row */
.action-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.btn-cancel {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-cancel:active {
  box-shadow: var(--neo-in-sm);
}

/* Check-in / Check-out button */
.checkin-btn {
  flex: 1;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}

.checkin-btn--in {
  background: var(--blue);
  color: #fff;
  box-shadow: 4px 4px 12px rgba(27, 107, 170, 0.35), -2px -2px 8px rgba(255, 255, 255, 0.6);
}

.checkin-btn--in:hover:not(:disabled) {
  background: var(--blue-mid);
}

.checkin-btn--in:active:not(:disabled) {
  box-shadow: var(--neo-in-sm);
}

.checkin-btn--in:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.checkin-btn--out {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  color: var(--red);
  border: 2px solid rgba(217, 79, 106, 0.4);
}

.checkin-btn--out:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── CM Job Sheet Bottom Sheet ── */
.checkout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 58, 92, 0.45);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}

.checkout-overlay.open {
  display: flex;
}

.checkout-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -6px 24px rgba(26, 58, 92, 0.2);
  padding: 1.25rem 1.25rem 2rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.checkout-overlay.open .checkout-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--blue-pale);
  border-radius: 2px;
  margin: 0 auto 1rem;
}

.sheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.25rem;
  text-align: center;
}
.sheet-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 1.25rem;
}

.sheet-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 1.25rem 0 0.6rem;
}

.required-star {
  color: var(--red);
}

/* Resolution & Station Status cards */
.resolution-cards,
.station-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.resolution-card,
.station-card {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.resolution-card:active,
.station-card:active {
  box-shadow: var(--neo-in-sm);
}

.resolution-card.selected,
.station-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
  background: var(--blue-tint);
}

.res-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.res-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Select dropdown */
.input-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237AAABF' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Textarea */
.input-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Parts toggle */
.parts-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.parts-toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  color: var(--text-3);
  transition: all 0.2s;
}

.parts-toggle-btn--active {
  background: var(--blue-tint);
  color: var(--blue);
  box-shadow: var(--neo-in-sm);
}

/* Part rows */
.parts-container {
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 6px;
}

.part-row {
  display: grid;
  grid-template-columns: 1fr 56px 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.part-remove-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.add-part-btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px;
  border: 2px dashed var(--blue-pale);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--blue-mid);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-part-btn:hover {
  background: var(--blue-tint);
  border-color: var(--blue);
}

/* ── KPI BAR ── */
.manager-body { padding: 1.2rem; }
.hr-body { padding: 1.2rem; }
.kpi-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 1.2rem; }
.kpi-card { background: var(--bg); box-shadow: var(--neo-out-sm); border-radius: var(--radius-md); padding: 0.875rem 0.5rem; text-align: center; }
.kpi-card--warn { box-shadow: var(--neo-out-sm), 0 0 0 2px var(--red); }
.kpi-big { font-size: 1.5rem; font-weight: 700; font-family: 'DM Mono', monospace; line-height: 1; color: var(--blue); }
.kpi-big--warn { color: var(--red); }
.kpi-sub { font-size: 0.6rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }
.kpi-meta { font-size: 0.6rem; color: var(--text-3); margin-top: 2px; }

/* ── FIELD SECTION (Live Worker List) ── */
.field-section { margin-top: 0.5rem; }
.field-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 1.2rem; }

.field-group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 1rem 0 0.5rem;
}

.worker-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0.5rem; }

.worker-row {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.worker-row:active { box-shadow: var(--neo-in-sm); }

.worker-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.worker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.worker-avatar-initials {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
}

.worker-info { flex: 1; min-width: 0; }
.worker-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.worker-flag { font-size: 0.8rem; }
.worker-ot {
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}
.worker-task {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 2px;
}

.worker-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.worker-elapsed { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: var(--text-2); }
.worker-status {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}
.worker-status--in { background: var(--blue-tint); color: var(--blue); }
.worker-status--out { background: var(--bg2); color: var(--text-3); }

.worker-empty {
  text-align: center;
  color: var(--text-3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 2rem 1rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
}

/* ── Worker Detail Modal ── */
.worker-modal-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--text-2);
  text-align: center;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

.worker-modal-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
.worker-modal-photo {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.worker-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.worker-modal-photo-placeholder { font-size: 1.75rem; color: var(--text-3); }

.worker-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--bg2);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
}
.worker-detail-row:last-child { border-bottom: none; }
.worker-detail-key { color: var(--text-3); flex-shrink: 0; }
.worker-detail-val { color: var(--text-1); text-align: right; max-width: 60%; word-break: break-word; }
.worker-detail-val.mono { font-family: 'DM Mono', monospace; font-size: 0.75rem; }

.worker-jobsheet-block {
  margin-top: 1rem;
  padding: 0.9rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
}
.worker-jobsheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}
.worker-jobsheet-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0.6rem 0 0.3rem;
}
.worker-modal-after-photo { margin-top: 0.6rem; }
.worker-modal-after-photo img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--neo-in-sm);
}

.worker-jobsheet-pending {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  color: var(--yellow);
  text-align: center;
}

.worker-modal-close {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.worker-modal-close:active { box-shadow: var(--neo-in-sm); }

/* ─────────────────────────────────────── */
/* PM JOB SHEET                           */
/* ─────────────────────────────────────── */

.evcs-capsule-row { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.evcs-capsule {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
  background: var(--bg); box-shadow: var(--neo-out-xs);
  border-radius: 999px;
  color: var(--blue-mid); font-family: 'DM Mono', monospace;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px;
  border: 1px solid rgba(255,255,255,0.8);
}
.evcs-capsule::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-mid); animation: pulse 1.5s infinite;
}

.pm-record-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 0.8rem; flex-wrap: wrap; }
.pm-doc-id-pill {
  padding: 4px 10px;
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-xs);
  color: var(--blue); font-family: 'DM Mono', monospace; font-size: 0.68rem; font-weight: 700;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}

.pm-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1rem; }
.pm-meta-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pm-meta-label { font-size: 0.64rem; color: var(--text-3); letter-spacing: 0.8px; text-transform: uppercase; font-weight: 600; }
.pm-meta-readonly {
  padding: 9px 12px;
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-xs);
  color: var(--text-1); font-family: 'Outfit', sans-serif; font-size: 0.82rem;
  display: flex; align-items: center; gap: 6px;
}
.pm-meta-readonly .auto-tag { margin-left: auto; }
.pm-meta-input {
  padding: 9px 12px;
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border: none; border-radius: var(--radius-xs);
  color: var(--text-1); font-family: 'DM Mono', monospace; font-size: 0.76rem;
  outline: none; width: 100%;
}
.pm-meta-input:focus { box-shadow: var(--neo-in-sm), 0 0 0 2px rgba(27,107,170,0.2); }
.pm-meta-input::placeholder { color: var(--text-3); }
.pm-meta-input option { background: #d6e8f5; color: var(--text-1); }

.auto-tag {
  font-size: 0.6rem; color: var(--blue-mid);
  background: var(--blue-tint); padding: 2px 6px; border-radius: 8px;
  letter-spacing: 0.5px; font-family: 'DM Mono', monospace;
}

.pm-impl-auto {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-xs);
  color: var(--text-1); font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1rem;
}
.impl-icon { font-size: 1rem; }
.impl-name { flex: 1; }
.impl-tag { font-size: 0.6rem; color: var(--blue-mid); background: var(--blue-tint); padding: 2px 6px; border-radius: 10px; letter-spacing: 0.5px; font-family: 'DM Mono', monospace; }

.pm-progress-wrap { margin-bottom: 1.2rem; }
.pm-progress-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-2); margin-bottom: 7px; }
.pm-prog-pct { color: var(--blue); font-weight: 700; font-family: 'DM Mono', monospace; }
.pm-progress-bar { height: 8px; background: var(--bg); box-shadow: var(--neo-in-sm); border-radius: 6px; overflow: hidden; }
.pm-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-pale)); border-radius: 6px; transition: width 0.35s; }

.pm-findings-summary {
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 1rem;
  display: none;
  border-left: 3px solid var(--yellow);
}
.pm-findings-summary.show { display: block; }
.pm-findings-title { font-size: 0.74rem; font-weight: 700; color: var(--yellow); margin-bottom: 4px; }
.pm-findings-list { font-size: 0.74rem; color: var(--text-1); line-height: 1.55; }

.pm-section-group { background: var(--bg); box-shadow: var(--neo-out-sm); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.7); }
.pm-section-head { padding: 0.9rem 1.1rem; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background 0.2s; user-select: none; }
.pm-section-head:hover { background: rgba(27,107,170,0.04); }
.pm-section-icon { width: 32px; height: 32px; border-radius: var(--radius-xs); background: var(--bg); box-shadow: var(--neo-out-xs); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.pm-section-name { font-weight: 600; font-size: 0.85rem; color: var(--text-1); flex: 1; }
.pm-section-count { font-size: 0.7rem; color: var(--text-3); font-family: 'DM Mono', monospace; }
.pm-section-chev { color: var(--text-3); font-size: 0.7rem; transition: transform 0.2s; margin-left: 6px; }
.pm-section-body { display: none; }
.pm-section-body.open { display: block; }
.pm-item { padding: 0.9rem 1.1rem; border-top: 1px solid rgba(189,208,228,0.40); }
.pm-item:last-child { border: none; }
.pm-item-title { font-size: 0.83rem; font-weight: 500; margin-bottom: 4px; color: var(--text-1); }
.pm-item-desc { font-size: 0.72rem; color: var(--text-3); line-height: 1.4; margin-bottom: 8px; }

.pm-result-row { display: flex; gap: 6px; }
.pm-result-btn {
  flex: 1; padding: 8px 4px;
  background: var(--bg); box-shadow: var(--neo-out-xs);
  border: none; border-radius: var(--radius-xs);
  color: var(--text-3); font-family: 'Outfit', sans-serif; font-size: 0.72rem; font-weight: 600;
  transition: all 0.2s; cursor: pointer;
}
.pm-result-btn:hover { box-shadow: var(--neo-out-sm); }
.pm-result-btn.sel-ok   { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--blue);   color: var(--blue); }
.pm-result-btn.sel-na   { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--text-3); color: var(--text-2); }
.pm-result-btn.sel-fail { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--red);    color: var(--red); }

.pm-item-note { width: 100%; margin-top: 6px; padding: 8px 10px; background: var(--bg); box-shadow: var(--neo-in-sm); border: none; border-radius: var(--radius-xs); color: var(--text-1); font-family: 'Outfit', sans-serif; font-size: 0.78rem; outline: none; display: none; }
.pm-item-note.show { display: block; }
.pm-item-note:focus { box-shadow: var(--neo-in-sm), 0 0 0 2px rgba(27,107,170,0.2); }

.pm-section-note-label { font-size: 0.64rem; color: var(--text-3); letter-spacing: 0.8px; text-transform: uppercase; font-weight: 600; margin: 10px 0 5px; }
.pm-section-note { width: 100%; padding: 8px 10px; background: var(--bg); box-shadow: var(--neo-in-sm); border: none; border-radius: var(--radius-xs); color: var(--text-1); font-family: 'Outfit', sans-serif; font-size: 0.78rem; outline: none; resize: none; min-height: 50px; }
.pm-section-note:focus { box-shadow: var(--neo-in-sm), 0 0 0 2px rgba(27,107,170,0.2); }

.pm-voltage-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 6px; margin-bottom: 1.2rem; }
.pm-voltage-cell { padding: 8px; background: var(--bg); box-shadow: var(--neo-in-sm); border-radius: var(--radius-xs); }
.pm-voltage-label { font-size: 0.62rem; color: var(--text-3); margin-bottom: 4px; text-align: center; }
.pm-voltage-input { width: 100%; padding: 5px; background: transparent; border: none; color: var(--text-1); font-family: 'DM Mono', monospace; font-size: 0.78rem; text-align: center; outline: none; }

.pm-photo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 1.2rem; }
.pm-photo-box {
  background: var(--bg); box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm); padding: 0.6rem; text-align: center;
  position: relative; overflow: hidden; min-height: 78px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all 0.2s; cursor: pointer;
}
.pm-photo-box:hover { box-shadow: var(--neo-in-sm), 0 0 0 1.5px rgba(27,107,170,0.3); }
.pm-photo-box.captured { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--blue); }
.pm-photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); opacity: 0.7; }
.pm-photo-icon { font-size: 1.1rem; position: relative; z-index: 1; }
.pm-photo-label { font-size: 0.6rem; color: var(--text-3); margin-top: 3px; position: relative; z-index: 1; line-height: 1.2; }
.pm-photo-badge { position: absolute; bottom: 3px; right: 3px; background: var(--blue); color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 2; }

/* ── ATP Charger Tabs ─────────────────────────────────────────────── */
.atp-charger-tabs-wrap { margin-bottom: 1rem; background: var(--bg); box-shadow: var(--neo-in-sm); border-radius: var(--radius-md); padding: 10px; }
.atp-charger-tabs-label { font-size: 0.62rem; color: var(--text-3); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.atp-charger-count { color: var(--blue-mid); font-family: 'DM Mono', monospace; }
.atp-charger-tabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.atp-charger-tab { flex-shrink: 0; padding: 8px 12px; background: var(--bg); box-shadow: var(--neo-out-xs); border: none; border-radius: var(--radius-xs); color: var(--text-3); font-family: 'Outfit', sans-serif; font-size: 0.78rem; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: all 0.2s; cursor: pointer; }
.atp-charger-tab:hover { box-shadow: var(--neo-out-sm); }
.atp-charger-tab.active { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--blue); color: var(--blue); font-weight: 700; }
.charger-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.atp-charger-tab.complete .charger-status-dot { background: var(--blue); }
.atp-charger-tab.partial .charger-status-dot { background: var(--yellow); }
.atp-charger-tab.fail .charger-status-dot { background: var(--red); }
.atp-charger-add { flex-shrink: 0; padding: 8px 12px; background: transparent; border: 2px dashed rgba(189,208,228,0.7); border-radius: var(--radius-xs); color: var(--text-3); font-family: 'Outfit', sans-serif; font-size: 0.78rem; font-weight: 500; transition: all 0.2s; white-space: nowrap; cursor: pointer; margin-top: 6px; width: 100%; }
.atp-charger-add:hover { border-color: var(--blue); color: var(--blue-mid); }

/* ── ATP Per-Item Attachment Buttons ─────────────────────────────── */
.pm-attach-row { display: flex; gap: 6px; margin-top: 8px; }
.pm-attach-btn { flex: 1; padding: 7px 8px; background: var(--bg); box-shadow: var(--neo-out-xs); border: none; border-radius: var(--radius-xs); color: var(--text-3); font-family: 'Outfit', sans-serif; font-size: 0.7rem; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 5px; transition: all 0.2s; cursor: pointer; }
.pm-attach-btn:hover { box-shadow: var(--neo-out-sm); color: var(--blue-mid); }
.pm-attach-btn.has-files { box-shadow: var(--neo-in-sm), 0 0 0 1.5px var(--blue); color: var(--blue); font-weight: 600; }
.attach-count { font-family: 'DM Mono', monospace; font-size: 0.66rem; background: var(--blue-tint); padding: 1px 5px; border-radius: 8px; color: var(--blue-mid); }

/* ── ATP Conclusion Cards ────────────────────────────────────────── */
.conclusion-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1.2rem; }
.conclusion-card { padding: 16px 10px; background: var(--bg); box-shadow: var(--neo-out-xs); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.6); }
.conclusion-card:hover { box-shadow: var(--neo-out-sm); }
.conclusion-icon { font-size: 1.6rem; margin-bottom: 6px; }
.conclusion-label { font-size: 0.9rem; font-weight: 700; color: var(--text-2); }
.conclusion-card--pass.selected { box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue); }
.conclusion-card--pass.selected .conclusion-label { color: var(--blue); }
.conclusion-card--fail.selected { box-shadow: var(--neo-in-sm), 0 0 0 2px var(--red); }
.conclusion-card--fail.selected .conclusion-label { color: var(--red); }

/* ─────────────────────────────────────── */
/* MANAGER TABS                           */
/* ─────────────────────────────────────── */

.mgr-tabs {
  display: flex;
  gap: 5px;
  background: var(--bg2);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.2rem;
}
.mgr-tab {
  flex: 1;
  padding: 9px 4px;
  border: none;
  background: transparent;
  color: var(--text-3);
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  position: relative;
  transition: all 0.2s;
  display: block;
}
.mgr-tab--active {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--neo-out-xs);
}
.mgr-tab--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.tab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mgr-section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin: 1.2rem 0 0.6rem;
}
.mgr-section-label--acked { opacity: 0.6; }

/* ─────────────────────────────────────── */
/* ESCALATION CARDS (esc-card)            */
/* ─────────────────────────────────────── */

.esc-list { display: flex; flex-direction: column; gap: 10px; }

.esc-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: var(--text-2);
}

.esc-card {
  background: var(--bg);
  border: 1px solid var(--red);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  position: relative;
}
.esc-card--acked {
  border-color: var(--shadow-d);
  opacity: 0.65;
}

/* Header row: dot · name · time */
.esc-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.esc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  animation: esc-pulse 1.5s ease-in-out infinite;
}
.esc-card--acked .esc-dot {
  background: var(--text-3);
  animation: none;
}
@keyframes esc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.esc-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-1);
  flex: 1;
}
.esc-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-3);
  white-space: nowrap;
}

.esc-site {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  color: var(--text-2);
  margin-bottom: 7px;
}
.esc-fault {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-1);
  line-height: 1.45;
  margin-bottom: 10px;
}
.esc-ack-note {
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  color: var(--text-2);
  font-style: italic;
}

/* Action buttons row */
.esc-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.btn-ack {
  flex: 1;
  padding: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ack:active { box-shadow: var(--neo-in-sm); opacity: 0.9; }

.btn-cancel {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--shadow-d);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel:active { color: var(--text-1); }

.btn-redeploy {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-redeploy:active { background: rgba(201, 138, 0, 0.1); }

/* Inline ack note form (hidden until Acknowledge clicked) */
.esc-ack-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}
.esc-ack-form--hidden { display: none; }

.esc-ack-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-1);
  resize: none;
  box-sizing: border-box;
}
.esc-ack-textarea:focus {
  outline: none;
  box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue);
}

.esc-confirm-row {
  display: flex;
  gap: 8px;
}

/* Redeploy modal form fields */
.escalation-form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0.75rem; }
.escalation-form-group label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
}
.escalation-form-select,
.escalation-form-input,
.escalation-form-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-1);
  box-sizing: border-box;
  appearance: none;
  resize: none;
}
.escalation-form-select:focus,
.escalation-form-input:focus,
.escalation-form-textarea:focus {
  outline: none;
  box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue);
}
.escalation-form-textarea { resize: vertical; }
.escalation-form-input--readonly {
  color: var(--text-2);
  box-shadow: none;
  background: var(--bg2);
  cursor: default;
}
.modal-errors {
  background: rgba(217, 79, 106, 0.08);
  color: var(--red);
  border: 1px solid rgba(217, 79, 106, 0.3);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}
.modal-errors p { margin: 2px 0; line-height: 1.5; }

.escalation-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 0.5rem; }
.escalation-btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.escalation-btn--primary {
  background: var(--blue);
  color: #fff;
}
.escalation-btn--primary:active { opacity: 0.88; }
.escalation-btn--ghost {
  background: transparent;
  color: var(--text-3);
}
.escalation-btn--ghost:active { color: var(--text-1); }

/* ─────────────────────────────────────── */
/* TOM SELECT — Arctic Frost theme        */
/* ─────────────────────────────────────── */

.ts-wrapper { min-height: unset; }

.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control {
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 2.2rem 0.6rem 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-1);
  cursor: pointer;
}
.ts-wrapper.single .ts-control:after {
  border-color: var(--text-3) transparent transparent;
  right: 0.75rem;
}
.ts-wrapper.single.dropdown-active .ts-control:after {
  border-color: transparent transparent var(--blue);
}
.ts-wrapper.focus .ts-control,
.ts-wrapper.single.input-active .ts-control {
  box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue);
}
.ts-wrapper.single .ts-control input {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-1);
}

.ts-dropdown,
.ts-dropdown.single {
  background: var(--bg);
  border: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--neo-out-sm);
  margin-top: 2px;
  z-index: 100;
}
.ts-dropdown .option {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-1);
  padding: 8px 12px;
}
.ts-dropdown .option:hover,
.ts-dropdown .active {
  background: var(--blue-tint);
  color: var(--blue);
}
.ts-dropdown .no-results {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-3);
  padding: 10px 12px;
}

/* Search input inside dropdown (dropdown_input plugin) */
.plugin-dropdown_input .dropdown-input {
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-bottom: 1px solid var(--shadow-d);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 8px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-1);
  width: 100%;
  box-sizing: border-box;
}
.plugin-dropdown_input .dropdown-input:focus { outline: none; }
.plugin-dropdown_input.focus.dropdown-active .ts-control {
  box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue);
}

/* Field check-in form — match input-field sizing */
.field-body .ts-wrapper.single .ts-control,
.field-body .ts-wrapper.single.input-active .ts-control {
  box-shadow: var(--neo-in);
  padding: 12px 2.5rem 12px 16px;
  font-size: 0.9rem;
}
.field-body .ts-wrapper.single .ts-control:after { right: 16px; }
.field-body .plugin-dropdown_input.focus.dropdown-active .ts-control {
  box-shadow: var(--neo-in), 0 0 0 2px rgba(27, 107, 170, 0.2);
}

/* ─────────────────────────────────────── */
/* STATION HEALTH BOARD                   */
/* ─────────────────────────────────────── */

.health-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.health-sum-card {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.5rem;
  text-align: center;
  border-top: 3px solid transparent;
}
.hsc-op    { border-top-color: #2a9d5c; }
.hsc-partial { border-top-color: var(--yellow); }
.hsc-down  { border-top-color: var(--red); }

.hsc-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1;
}
.hsc-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  color: var(--text-2);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Map view — frosted dark island */
.map-view {
  background: linear-gradient(135deg, #1a2e45, #0f2030);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.map-canvas {
  width: 100%;
  height: 320px;
  position: relative;
  z-index: 0;
  background: #1a2e45;
}

/* Leaflet station markers (divIcon) */
.stn-marker-wrap { position: relative; }
.stn-marker {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.42rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: rgba(15, 32, 48, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
  z-index: 1;
}
.stn-marker-wrap:hover .stn-marker { transform: scale(1.3); }
.stn-marker--operational { background: #2a9d5c; }
.stn-marker--partial     { background: #c98a00; }
.stn-marker--down        { background: #d94f6a; }

.stn-marker-pulse {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: mapPulse 2s infinite;
  z-index: 0;
}
.stn-marker-wrap:has(.stn-marker--down) .stn-marker-pulse { background: rgba(217, 79, 106, 0.4); }
.stn-marker-wrap:has(.stn-marker--partial) .stn-marker-pulse { background: rgba(201, 138, 0, 0.3); }

@keyframes mapPulse {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Leaflet tooltip — dark frosted theme */
.leaflet-tooltip.leaflet-tooltip-top {
  background: rgba(26, 46, 69, 0.96);
  border: 1px solid rgba(91, 157, 212, 0.25);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-family: 'Outfit', sans-serif;
  color: #dff0fb;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.leaflet-tooltip-top::before { border-top-color: rgba(26, 46, 69, 0.96); }
.map-tip-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}
.map-tip-status--operational { color: #2a9d5c; }
.map-tip-status--partial     { color: #c98a00; }
.map-tip-status--down        { color: #d94f6a; }

.map-legend {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid rgba(91, 157, 212, 0.12);
}
.map-leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-family: 'Outfit', sans-serif;
  color: rgba(168, 204, 232, 0.8);
}
.map-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Station list rows */
.health-board { display: flex; flex-direction: column; gap: 8px; }

.station-row {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stn-row-body { flex: 1; min-width: 0; }

.stn-id {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-3);
}
.stn-row-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stn-row-meta {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 2px;
}

.stn-row-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.stn-row-status--operational { background: #d4f0e2; color: #1a6b42; }
.stn-row-status--partial     { background: #fef3d0; color: #8a5e00; }
.stn-row-status--down        { background: #fde2e8; color: #a3002a; }

/* Station row health badges (repeat fault + SLA breach) */
.station-row.repeat-fault {
  box-shadow: var(--neo-out-xs), inset 3px 0 0 var(--yellow);
}

.repeat-badge,
.sla-breach-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-left: 6px;
  vertical-align: middle;
}

.repeat-badge {
  background: rgba(201, 138, 0, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(201, 138, 0, 0.35);
}

.sla-breach-badge {
  background: rgba(217, 79, 106, 0.15);
  color: var(--red);
  border: 1px solid rgba(217, 79, 106, 0.4);
  animation: slaBreachPulse 1.6s ease-in-out infinite;
}

@keyframes slaBreachPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 79, 106, 0.35); }
  50%      { box-shadow: 0 0 0 4px rgba(217, 79, 106, 0); }
}

/* ─────────────────────────────────────── */
/* TASK ASSIGNMENTS PAGE                  */
/* ─────────────────────────────────────── */

.assign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.assign-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.btn-new-assign {
  background: var(--blue);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--neo-out-xs);
}
.btn-new-assign:active { box-shadow: var(--neo-in-sm); }

.task-assign-list { display: flex; flex-direction: column; gap: 10px; }

.assign-card {
  background: var(--bg);
  border: 1px solid var(--shadow-d);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.assign-card.pending  { border-color: rgba(27, 107, 170, 0.3); }
.assign-card.accepted { border-color: rgba(42, 157, 92, 0.3); }

.assign-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.assign-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--blue);
  flex-shrink: 0;
}

.assign-worker {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
  flex: 1;
}

.assign-status-badge {
  padding: 3px 8px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.asb-pending  { background: rgba(27, 107, 170, 0.12); color: var(--blue); }
.asb-accepted { background: rgba(42, 157, 92, 0.12);  color: #1a6b42; }

.assign-task-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--blue-tint);
  color: var(--blue);
  margin-bottom: 2px;
}

.assign-site-inline {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-left: 6px;
}

.assign-detail {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 2px;
}
.assign-priority--urgent   { color: var(--yellow); }
.assign-priority--critical { color: var(--red); }
.assign-priority--normal   { color: var(--text-3); }

.btn-cancel-assign {
  background: transparent;
  border: 1px solid var(--shadow-d);
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  cursor: pointer;
  align-self: flex-start;
  transition: border-color 0.15s, color 0.15s;
  margin-top: 2px;
}
.btn-cancel-assign:hover {
  border-color: var(--red);
  color: var(--red);
}
.escalation-btn--primary:active { box-shadow: var(--neo-in-sm); }

/* Additional status colours on assignment cards */
.assign-card.in_progress { border-color: rgba(27, 107, 170, 0.45); }
.assign-card.completed   { border-color: rgba(42, 157, 92, 0.30); }
.assign-card.cancelled   { border-color: var(--shadow-d); }

/* Critical priority — red border, takes precedence over status border */
.assign-card.critical {
  border-color: var(--red);
  border-width: 2px;
  padding: calc(1rem - 1px) calc(1.2rem - 1px);
}

/* Status badges for in_progress / completed / cancelled */
.asb-in_progress { background: rgba(27, 107, 170, 0.15); color: var(--blue); }
.asb-completed   { background: rgba(42, 157, 92, 0.15);  color: #1a6b42; }
.asb-cancelled   { background: rgba(122, 138, 158, 0.15); color: var(--text-3); }

/* History section — faded cards */
.assign-card--history { opacity: 0.65; }

/* ─────────────────────────────────────── */
/* Field — Pending Assignments (read-only) */
/* ─────────────────────────────────────── */

.field-assigned-section {
  margin-bottom: 1.2rem;
}

.field-assigned-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 0.6rem;
}

.assign-card--readonly {
  cursor: default;
}

.assign-priority-badge {
  font-family: 'Outfit', sans-serif;
}
.asb-priority-normal   { background: rgba(122, 138, 158, 0.15); color: var(--text-3); }
.asb-priority-urgent   { background: rgba(201, 138, 0, 0.15);   color: var(--yellow); }
.asb-priority-critical { background: rgba(217, 79, 106, 0.15);  color: var(--red); }

.assign-meta {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* Mismatch confirmation modal — body styling */
.mismatch-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0.6rem 0 1rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--neo-in-sm);
}

.mismatch-pending-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mismatch-pending-more {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* ============================================================
   HR Dashboard
   ============================================================ */

/* Settings bar */
.hr-settings-bar {
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: var(--neo-out-sm);
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hr-setting-item { display: flex; align-items: center; gap: 8px; }
.hr-setting-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  white-space: nowrap;
}
.hr-setting-val {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
}
.hr-setting-box {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  padding: 5px 10px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-xs);
  min-width: 60px;
  text-align: center;
  display: inline-block;
}
.hr-setting-divider { width: 1px; height: 20px; background: var(--shadow-d); }
.btn-payroll-csv {
  padding: 7px 14px;
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: none;
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-payroll-csv:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-payroll-csv:not(:disabled):active { box-shadow: var(--neo-in-sm); }

/* Dashboard Tabs (HR + Manager share the same visual style) */
.hr-tabs,
.mgr-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg2);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.2rem;
}
.hr-tab,
.mgr-tab {
  flex: 1;
  padding: 9px 4px;
  border: none;
  background: transparent;
  color: var(--text-3);
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  transition: all 0.2s;
}
.hr-tab--active,
.mgr-tab--active {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  color: var(--blue);
  font-weight: 700;
}
.hr-tab:disabled,
.mgr-tab:disabled { opacity: 0.35; cursor: not-allowed; }

/* Roll summary */
.roll-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
.rs-sum-card { border-radius: var(--radius-sm); padding: 0.7rem; text-align: center; }
.rs-sum-present { background: rgba(27,107,170,0.08);  border: 1px solid rgba(27,107,170,0.2); }
.rs-sum-late    { background: rgba(201,138,0,0.08);   border: 1px solid rgba(201,138,0,0.2); }
.rs-sum-absent  { background: rgba(217,79,106,0.08);  border: 1px solid rgba(217,79,106,0.2); }
.rs-sum-leave   { background: rgba(122,170,191,0.08); border: 1px solid rgba(122,170,191,0.2); }
.rs-sum-num {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
}
.rs-sum-present .rs-sum-num { color: var(--blue); }
.rs-sum-late    .rs-sum-num { color: var(--yellow); }
.rs-sum-absent  .rs-sum-num { color: var(--red); }
.rs-sum-leave   .rs-sum-num { color: var(--text-3); }
.rs-sum-label {
  font-size: 0.6rem;
  color: var(--text-3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Outfit', sans-serif;
}

/* Roll call list */
.roll-call-list { display: flex; flex-direction: column; gap: 8px; }
.roll-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--neo-out-sm);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.roll-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  flex-shrink: 0;
}
.roll-info { flex: 1; min-width: 0; }
.roll-name { font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.roll-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.roll-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}
.rb-present { background: rgba(27,107,170,0.12);  color: var(--blue); }
.rb-late    { background: rgba(201,138,0,0.12);   color: var(--yellow); }
.rb-absent  { background: rgba(217,79,106,0.12);  color: var(--red); }
.rb-on_leave { background: rgba(122,170,191,0.12); color: var(--text-3); }

/* Overtime panel */
.ot-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
.ot-sum-card {
  background: rgba(201,138,0,0.08);
  border: 1px solid rgba(201,138,0,0.2);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  text-align: center;
}
.ot-num {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--yellow);
}
.ot-label {
  font-size: 0.6rem;
  color: var(--text-3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Outfit', sans-serif;
}

.ot-list { display: flex; flex-direction: column; gap: 8px; }
.ot-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--neo-out-sm);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ot-info { flex: 1; min-width: 0; }
.ot-name { font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.ot-detail { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.ot-hours {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(201,138,0,0.12);
  color: var(--yellow);
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Pagy navigation */
.pagy-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pagy-nav a,
.pagy-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-2);
  text-decoration: none;
  box-shadow: var(--neo-out-xs);
  background: var(--bg);
}
.pagy-nav a:hover { color: var(--blue); }
.pagy-nav span.current {
  box-shadow: var(--neo-in-sm);
  color: var(--blue);
  font-weight: 700;
}

/* hr-tab as <a> link */
a.hr-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
a.hr-tab:hover { color: var(--blue); }

/* btn-payroll-csv as <a> link */
a.btn-payroll-csv { text-decoration: none; }
a.btn-payroll-csv:hover { box-shadow: var(--neo-out-sm); color: var(--blue); }

/* Attendance Log page */
.filter-row { display: flex; gap: 8px; margin-bottom: 1.2rem; flex-wrap: wrap; align-items: center; }
.filter-form { display: contents; }
.filter-select {
  flex: 1;
  min-width: 120px;
  padding: 9px 11px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-1);
}
.log-filter-btn {
  padding: 9px 16px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-export {
  padding: 9px 16px;
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}
.btn-export:hover { box-shadow: var(--neo-out-sm); }

/* ── Audit log ── */
.filter-date {
  padding: 9px 11px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-1);
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audit-row {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.audit-rowbtn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 0.8rem 1rem;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.audit-rowbtn:hover { background: var(--blue-tint); }
.audit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.ad-create { background: var(--blue); }
.ad-update { background: var(--yellow); }
.ad-delete { background: var(--red); }
.audit-body { flex: 1; min-width: 0; }
.audit-action {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-1);
}
.audit-meta {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 3px;
  font-family: 'DM Mono', monospace;
}
.audit-chevron {
  color: var(--text-3);
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}
.audit-row.open .audit-chevron { transform: rotate(180deg); }
.audit-detail { display: none; padding: 0 1rem 0.9rem; }
.audit-row.open .audit-detail { display: block; }
.audit-diff {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.audit-diff th {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}
.audit-diff td {
  padding: 6px 10px;
  font-size: 0.74rem;
  color: var(--text-2);
  vertical-align: top;
  word-break: break-word;
}
.audit-diff-field { font-weight: 600; color: var(--text-1); }
.audit-diff .mono { font-family: 'DM Mono', monospace; font-size: 0.72rem; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  text-align: center;
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--blue);
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-3);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Outfit', sans-serif;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bg2);
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
}
.attendance-table { width: 100%; border-collapse: collapse; }
.attendance-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--bg2);
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}
.attendance-table td {
  padding: 10px 12px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--bg2);
  vertical-align: middle;
  white-space: nowrap;
  color: var(--text-1);
  font-family: 'Outfit', sans-serif;
}
.attendance-table tr:last-child td { border-bottom: none; }
.attendance-table tr:hover td { background: rgba(27,107,170,0.04); }
.attendance-table .mono { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--text-2); }
.log-empty {
  text-align: center;
  color: var(--text-3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 2rem 0;
}

/* ── Monthly Summary ─────────────────────────── */
.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.month-btn {
  background: var(--bg);
  border: 1px solid var(--shadow-d);
  color: var(--text-3);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.month-btn:hover { border-color: var(--blue); color: var(--blue); }
.month-btn.disabled { opacity: 0.35; pointer-events: none; }
a.month-btn { line-height: 32px; text-align: center; }
.month-label { font-weight: 600; font-size: 0.9rem; flex: 1; text-align: center; color: var(--text-1); font-family: 'Outfit', sans-serif; }
.monthly-grid { display: flex; flex-direction: column; gap: 8px; }
.monthly-card {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border-radius: 14px;
  padding: 1rem 1.2rem;
}
.monthly-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.monthly-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  flex-shrink: 0;
}
.monthly-name { font-weight: 600; font-size: 0.88rem; color: var(--text-1); font-family: 'Outfit', sans-serif; }
.monthly-dept { font-size: 0.7rem; color: var(--text-3); font-family: 'Outfit', sans-serif; }
.monthly-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ms-cell { text-align: center; padding: 6px 4px; background: var(--bg2); border-radius: var(--radius-xs); }
.ms-val { font-size: 0.95rem; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--blue); }
.ms-val.warn   { color: var(--yellow); }
.ms-val.danger { color: var(--red); }
.ms-key { font-size: 0.6rem; color: var(--text-3); margin-top: 2px; text-transform: uppercase; font-family: 'Outfit', sans-serif; }

/* ============================================================
   Admin — User Account Management
   ============================================================ */

.admin-body { padding: 1.2rem; }

.admin-wrap { }

/* ── Scrollable tab bar ── */
.admin-tabs-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.2rem;
}
.admin-tabs-inner {
  display: flex;
  gap: 6px;
  background: var(--bg2);
  border-radius: 12px;
  padding: 4px;
  min-width: max-content;
}
.admin-tab2 {
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.admin-tab2.active {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--neo-out-xs);
}
.admin-tab2:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.admin-panel { }

/* ── Search + add row ── */
.search-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.search-field {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--neo-in-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  color: var(--text-1);
  outline: none;
  min-width: 0;
}
.search-field:focus {
  box-shadow: var(--neo-in), 0 0 0 2px rgba(27, 107, 170, 0.2);
}
.search-field::placeholder { color: var(--text-3); }

.btn-add {
  padding: 10px 18px;
  background: var(--blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: var(--neo-out-xs);
  white-space: nowrap;
  transition: box-shadow 0.15s;
}
.btn-add:hover { box-shadow: var(--neo-out-sm); color: #fff; }
.btn-add:active { box-shadow: var(--neo-in-sm); }

/* ── User cards ── */
.user-list { display: flex; flex-direction: column; gap: 8px; }

.user-card {
  background: var(--bg);
  border: 1px solid var(--shadow-d);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--neo-out-xs);
  transition: border-color 0.2s;
}
.user-card:hover { border-color: var(--blue-pale); }
.user-card--inactive { opacity: 0.5; }

.uc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.user-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 3px;
}

.role-chip {
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rc-field   { background: rgba(27, 107, 170, 0.1);  color: var(--blue); }
.rc-manager { background: rgba(201, 138, 0, 0.12);  color: var(--yellow); }
.rc-hr      { background: rgba(91, 157, 212, 0.15); color: var(--blue-mid); }
.rc-admin   { background: rgba(217, 79, 106, 0.12); color: var(--red); }
.rc-reset   { background: rgba(201, 138, 0, 0.12);  color: var(--yellow); }

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

.status-toggle {
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  border: none;
  cursor: default;
}
.st-active   { background: rgba(42, 157, 92, 0.12); color: #1a6b42; }
.st-inactive { background: rgba(217, 79, 106, 0.1); color: var(--red); }

/* Region admin card list */
.region-list { display: flex; flex-direction: column; gap: 10px; }
.region-card { background: var(--bg); box-shadow: var(--neo-out-sm); border-radius: var(--radius-md); overflow: hidden; }
.region-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 1rem 1.2rem;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.region-row:hover { background: var(--blue-tint); }
.region-icon { font-size: 1.3rem; flex-shrink: 0; }
.region-info { flex: 1; min-width: 0; }
.region-name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.region-meta { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: var(--text-3); margin-top: 3px; }
.region-chevron { color: var(--text-3); font-size: 0.7rem; transition: transform 0.2s; flex-shrink: 0; }
.region-card.open .region-chevron { transform: rotate(180deg); }
.region-body { display: none; padding: 0.4rem 1.2rem 1rem; border-top: 1px solid rgba(189, 208, 228, 0.4); }
.region-card.open .region-body { display: block; }
.region-body-label { font-family: 'Outfit', sans-serif; font-size: 0.65rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin: 0.6rem 0 0.4rem; }
.region-sub { display: flex; flex-wrap: wrap; gap: 6px; }
.region-tag {
  padding: 4px 10px;
  background: var(--blue-tint);
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-2);
}

/* Site admin card list */
.site-list { display: flex; flex-direction: column; gap: 10px; }
.site-card { background: var(--bg); box-shadow: var(--neo-out-sm); border-radius: var(--radius-md); padding: 1rem 1.2rem; }
.site-row { display: flex; align-items: center; gap: 10px; }
.site-icon { font-size: 1.2rem; flex-shrink: 0; }
.site-info { flex: 1; min-width: 0; }
.site-name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.88rem; color: var(--text-1); }
.site-loc { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Site status badges */
.site-status-badge { padding: 3px 10px; border-radius: 20px; font-family: 'Outfit', sans-serif; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.site-status--live               { background: rgba(42, 157, 92, 0.12);  color: #1a6b42; }
.site-status--under_construction { background: rgba(201, 138, 0, 0.12);  color: var(--yellow); }
.site-status--planned            { background: rgba(27, 107, 170, 0.1);   color: var(--blue); }
.site-status--inactive           { background: rgba(122, 170, 191, 0.12); color: var(--text-3); }

/* Charger status badges */
.charger-status--active         { background: rgba(42, 157, 92, 0.12);  color: #1a6b42; }
.charger-status--inactive       { background: rgba(122, 170, 191, 0.12); color: var(--text-3); }
.charger-status--decommissioned { background: rgba(217, 79, 106, 0.12); color: var(--red); }

/* Site detail page */
.site-name-link { color: inherit; text-decoration: none; }
.site-name-link:hover { color: var(--blue); }
.site-detail-back {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 1rem;
}
.site-detail-back:hover { color: var(--blue); }
.site-detail-header {
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: var(--neo-out-sm);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 1rem 1.1rem;
  margin-bottom: 1.4rem;
}
.site-detail-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1rem; color: var(--text-1); }
.site-detail-meta { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--text-3); margin: 4px 0 10px; }
.site-detail-section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 0.8rem;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--shadow-d);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
}
.btn-icon:hover { border-color: var(--blue-pale); background: var(--blue-tint); }
.btn-icon--del:hover { border-color: var(--red); background: rgba(217,79,106,0.06); }

.users-empty-state {
  text-align: center;
  color: var(--text-3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  padding: 2rem 0;
}

/* ── Admin form sheet (2-col row helper) ── */
.esc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Stream flash notice ── */
.flash-notice-stream:not(:empty) {
  display: block;
  margin: 0 0 0.8rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  background: rgba(27, 107, 170, 0.08);
  color: var(--blue);
  border: 1px solid rgba(27, 107, 170, 0.3);
}

/* ── Admin floating modal ── */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 58, 92, 0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.admin-modal-overlay.open { display: flex; }

.admin-modal-card {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.90);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(26, 58, 92, 0.22);
  animation: fadeUp 0.25s ease;
}

.admin-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}
.admin-modal-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 0.84rem;
  color: var(--text-2);
  margin: 0 0 1.4rem;
}

.admin-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.2rem;
}

/* admin-tab2 used as <a> link */
a.admin-tab2 { text-decoration: none; }

/* ============================================================
   Admin — Department Cards
   ============================================================ */

.dept-list { display: flex; flex-direction: column; gap: 10px; }

.dept-card {
  background: var(--bg);
  border: 1px solid var(--shadow-d);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--neo-out-xs);
  transition: border-color 0.2s;
}
.dept-card:hover { border-color: var(--blue-pale); }
.dept-card--inactive { opacity: 0.5; }

.dept-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Department color variants — icon box & employee badge */
.ic-green  { background: rgba(42,  157,  92, 0.12); color: #1a6b42; }
.ic-yellow { background: rgba(201, 138,   0, 0.12); color: var(--yellow); }
.ic-blue   { background: rgba(27,  107, 170, 0.10); color: var(--blue); }
.ic-red    { background: rgba(217,  79, 106, 0.12); color: var(--red); }

.dept-info { flex: 1; }

.dept-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-1);
}

.dept-count {
  font-family: 'Outfit', sans-serif;
  font-size: 0.73rem;
  color: var(--text-3);
  margin-top: 2px;
}

.dept-actions { display: flex; gap: 6px; }

/* ============================================================
   Admin — Employee Cards
   ============================================================ */

.emp-list { display: flex; flex-direction: column; gap: 8px; }

.emp-card {
  background: var(--bg);
  border: 1px solid var(--shadow-d);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--neo-out-xs);
  transition: border-color 0.2s;
}
.emp-card:hover { border-color: var(--blue-pale); }
.emp-card--inactive { opacity: 0.5; }

/* Department badge shown on employee cards — reuses .ic-* color classes */
.dept-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── System Config ── */
.config-section {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.config-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}
.config-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 32px;
}
.config-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--text-1);
}
.config-tag-del {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.config-tag-del:hover { color: var(--red); }
.config-add-row {
  display: flex;
  gap: 8px;
}
.config-add-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-1);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  outline: none;
}
.config-add-input:focus {
  box-shadow: var(--neo-in), 0 0 0 2px rgba(27,107,170,0.2);
}
.config-add-input::placeholder { color: var(--text-3); }
.btn-config-add {
  padding: 8px 14px;
  background: var(--blue);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--neo-out-xs);
}
.btn-config-add:hover { background: var(--blue-mid); }

/* ─────────────────────────── Parts Inventory ─────────────────────────── */
.parts-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}
.parts-stat {
  background: var(--bg);
  box-shadow: var(--neo-out-xs);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.5rem;
  text-align: center;
}
.parts-stat-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}
.parts-stat-num--warn { color: var(--yellow); }
.parts-stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 1.4px;
  color: var(--text-3);
  margin-top: 4px;
  text-transform: uppercase;
}

.parts-list { display: flex; flex-direction: column; gap: 8px; }

.part-inv-card {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.part-inv-card--low { box-shadow: var(--neo-out-sm), 0 0 0 2px var(--yellow); }
.part-inv-card--out { box-shadow: var(--neo-out-sm), 0 0 0 2px var(--red); }

.part-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--blue-tint);
  box-shadow: var(--neo-out-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.part-info { flex: 1; min-width: 0; }
.part-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
}
.part-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part-stock { text-align: right; flex-shrink: 0; }
.part-qty {
  font-family: 'DM Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}
.part-qty--low { color: var(--yellow); }
.part-qty--out { color: var(--red); }
.part-unit {
  font-family: 'Outfit', sans-serif;
  font-size: 0.66rem;
  color: var(--text-3);
  margin-top: 2px;
}
.part-unit--out { color: var(--red); font-weight: 700; letter-spacing: 0.04em; }

.part-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Contractor badge — shown next to name on contractor cards */
.contractor-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(122, 158, 148, 0.12);
  color: var(--text-3);
  border: 1px solid rgba(122, 158, 148, 0.2);
  margin-left: 6px;
}

/* Contract expiry warning — applied to dates within 30 days */
.expiry-warning {
  color: var(--yellow);
  font-weight: 600;
}

/* ── SLA configuration panel ── */
.sla-banner {
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.45;
}
.sla-banner strong { color: var(--text-1); font-weight: 600; }

.sla-list { display: flex; flex-direction: column; gap: 10px; }

.sla-card-frame { display: block; }

.sla-card {
  background: var(--bg);
  box-shadow: var(--neo-out-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.sla-card--breach { box-shadow: var(--neo-out-sm), 0 0 0 1px rgba(217, 79, 106, 0.35); }

.sla-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sla-ok     { background: var(--blue-light); box-shadow: 0 0 0 3px rgba(91, 157, 212, 0.18); }
.sla-breach { background: var(--red);        box-shadow: 0 0 0 3px rgba(217, 79, 106, 0.22); animation: sla-pulse 1.4s infinite; }

@keyframes sla-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(217, 79, 106, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(217, 79, 106, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(217, 79, 106, 0);    }
}

.sla-info { flex: 1; min-width: 0; }
.sla-station {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-1);
  letter-spacing: 0.4px;
}
.sla-type {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sla-breach-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(217, 79, 106, 0.12);
  color: var(--red);
  font-family: 'Outfit', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.sla-down-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(201, 138, 0, 0.10);
  color: var(--yellow);
  font-family: 'Outfit', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sla-threshold {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sla-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(91, 157, 212, 0.25);
  border-top-color: var(--blue);
  opacity: 0;
  transition: opacity 0.12s;
  animation: sla-spin 0.7s linear infinite;
}
.sla-spinner[data-loading] { opacity: 1; }

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

.sla-input {
  width: 64px;
  padding: 6px 8px;
  background: var(--bg);
  box-shadow: var(--neo-in-sm);
  border: none;
  border-radius: var(--radius-xs);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-1);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.sla-input::-webkit-outer-spin-button,
.sla-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sla-input:focus { box-shadow: var(--neo-in-sm), 0 0 0 2px var(--blue); }

.sla-unit {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────── */
/* HR Leave Tracker                        */
/* ─────────────────────────────────────── */

/* Green token (introduced for leave tracker — Arctic-Frost-compatible cool green) */
:root {
  --green:      #2A9D5C;
  --green-deep: #1A6B42;
}

.leave-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.leave-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.btn-add-leave {
  background: var(--blue);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--neo-out-xs);
}
.btn-add-leave:active { box-shadow: var(--neo-in-sm); }

.leave-list { display: flex; flex-direction: column; gap: 8px; }

.leave-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  box-shadow: var(--neo-out-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.leave-info { flex: 1; min-width: 0; }
.leave-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
}
.leave-detail {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 3px;
  word-break: break-word;
}

.leave-type {
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  white-space: nowrap;
}
.lt-annual   { background: rgba(42, 157, 92, 0.12);  color: var(--green-deep); }
.lt-sick     { background: rgba(217, 79, 106, 0.12); color: var(--red); }
.lt-personal { background: rgba(27, 107, 170, 0.12); color: var(--blue); }
.lt-unpaid   { background: rgba(122, 170, 191, 0.12); color: var(--text-3); }

.leave-days {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-3);
  flex-shrink: 0;
}

.btn-leave-edit,
.btn-leave-del {
  background: var(--bg);
  border: none;
  box-shadow: var(--neo-out-xs);
  border-radius: var(--radius-xs);
  padding: 6px 9px;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 0.15s;
}
.btn-leave-edit:active,
.btn-leave-del:active { box-shadow: var(--neo-in-sm); }

/* button_to wraps the delete button in an inline form — strip wrapper margin */
.leave-card form { margin: 0; display: inline-flex; flex-shrink: 0; }

/* Delete-confirm bottom-sheet */
.checkout-sheet--confirm { padding-bottom: 1.5rem; }
.checkout-sheet--confirm form.button_to { margin: 0; }
.leave-del-warn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--text-2);
  text-align: center;
  margin: 0.5rem 0 1.25rem;
  line-height: 1.45;
}
.escalation-btn--danger {
  width: 100%;
  background: var(--red);
  color: #fff;
}
.escalation-btn--danger:active { opacity: 0.88; }

/* Side-by-side date inputs in the leave modal */
.leave-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.leave-date-row .escalation-form-group { margin-bottom: 0.75rem; }

/* ── Success Overlay (check-in/out confirmation) ── */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.success-overlay.visible { opacity: 1; }

.success-overlay__icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--bg);
  box-shadow: var(--neo-out);
  border: 2px solid rgba(27, 107, 170, 0.25);
  animation: successPop 0.5s ease 0.1s both;
}

.success-overlay__label {
  margin-top: 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-1);
  animation: fadeUp 0.6s ease 0.25s both;
}

@keyframes successPop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

