:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-border: #1e293b;
  --gold-accent: #f59e0b;
  --gold-dark: #d97706;
  --border-color: #cbd5e1;
  --border-subtle: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-light: #dbeafe;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --purple: #6d28d9;
  --purple-bg: #ede9fe;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.45;
}

/* ========================================================================== */
/* APP LAYOUT & SIDEBAR (Navy Sidebar + Clean White Workspace)               */
/* ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-page);
}

.app-sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--sidebar-bg);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 100;
}

.sidebar-overlay {
  display: none;
}

.sidebar-close-btn {
  display: none;
}

.sidebar-brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #090d16;
  border-bottom: 2px solid var(--gold-accent);
}

.logo-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.brand-logo-img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  background: transparent;
}

.brand-meta {
  min-width: 0;
}

.brand-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 11px;
  color: var(--gold-accent);
  margin-top: 3px;
  font-weight: 500;
}

.sidebar-divider {
  height: 1px;
  background: #1e293b;
}

.sidebar-nav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.nav-item.active {
  background: #1e3a8a;
  color: #ffffff;
  border-left: 4px solid var(--gold-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
}

.nav-counter {
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #1e293b;
  background: #090d16;
  font-size: 11px;
}

.agency-badge {
  color: #e2e8f0;
  font-weight: 600;
}

.agency-sub {
  color: #94a3b8;
  margin-top: 2px;
  font-family: monospace;
}

/* ========================================================================== */
/* MAIN CONTENT WORKSPACE & HEADER                                           */
/* ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #f8fafc;
}

.main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
  min-width: 0;
  max-width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
}

.header-titles {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.current-screen-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.header-date-badge {
  font-size: 12px;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
}

/* Live Dual Clocks (Sri Lanka & Japan Time) */
.live-clocks-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-clock-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 12px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.04);
}

.live-clock-card#clock-colombo {
  border-left: 3px solid #1e3a8a; /* Navy accent */
}

.live-clock-card#clock-tokyo {
  border-left: 3px solid var(--gold-dark); /* Gold accent */
}

.clock-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.clock-display {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.clock-time {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.clock-date {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

/* Staff Account Dropdown */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-menu-wrapper {
  position: relative;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.account-menu-trigger:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e3a8a;
  color: var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.role-badge {
  background: #38bdf8;
  color: #0f172a;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

.role-badge.badge-gold {
  background: var(--gold-accent);
  color: #0f172a;
}

.dropdown-arrow {
  font-size: 10px;
  color: #64748b;
}

.account-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  min-width: 190px;
  z-index: 1000;
  padding: 6px 0;
}

.dropdown-header {
  padding: 8px 14px;
}

.dropdown-user {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.dropdown-role {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background: #fef2f2;
}

.dropdown-item-icon {
  font-size: 14px;
  width: 16px;
  display: inline-block;
}

/* ========================================================================== */
/* MAIN CONTENT & SCREEN PANELS                                               */
/* ========================================================================== */
.main-content {
  padding: 24px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.screen-panel {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.screen-panel.active {
  display: block;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.date-picker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-picker-bar label {
  font-size: 13px;
  color: var(--text-main);
}

.screen-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.text-muted {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.text-xs {
  font-size: 12px;
}

/* ========================================================================== */
/* DASHBOARD ACTION CARDS & KPIS                                             */
/* ========================================================================== */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
  min-width: 0;
  max-width: 100%;
}

.action-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid #1e3a8a;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-top-color: var(--gold-accent);
}

.action-card.card-overdue {
  border-top-color: var(--danger);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-card-icon {
  font-size: 20px;
}

.action-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  text-transform: uppercase;
}

.action-card-val {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 8px 0 4px;
  line-height: 1;
}

.action-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.action-card-foot {
  font-size: 11.5px;
  color: #2563eb;
  margin-top: 10px;
  font-weight: 500;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  min-width: 0;
  max-width: 100%;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  min-width: 0;
}

.kpi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================================================== */
/* MANAGEMENT PROGRESS DASHBOARD (OWNER / EXECUTIVE SUMMARY)                  */
/* ========================================================================== */
.mgmt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
  min-width: 0;
  max-width: 100%;
}

.mgmt-summary-card {
  min-width: 0;
  margin-bottom: 0;
}

.mgmt-card-body {
  padding: 16px 18px;
}

.mgmt-headline-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.mgmt-big-val {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.mgmt-big-val-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.mgmt-sub-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mgmt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
}

.mgmt-pill-verified {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.mgmt-pill-self {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.pill-dot {
  font-weight: 800;
}

.pill-label {
  color: #334155;
}

.mgmt-metrics-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.mgmt-metric-col {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}

.mgmt-metric-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.mgmt-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-top: 4px;
  white-space: normal;
  word-break: break-word;
}

.text-primary {
  color: #1e3a8a;
}

.text-success {
  color: #15803d;
}

.text-warning {
  color: #b45309;
}

.text-danger {
  color: #b91c1c;
}

/* ========================================================================== */
/* CARDS & TABLES (Sticky headers, responsive)                                */
/* ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  max-height: 580px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

table.data-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

table.data-table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--border-color);
}

table.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

table.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.num-col {
  text-align: right;
}

th.num-col, td.num-col {
  text-align: right;
}

/* ========================================================================== */
/* BADGES & STATUS LABELS                                                     */
/* ========================================================================== */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.badge-info {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-verified {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #86efac;
}

.badge-self {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.badge-partial {
  background: #fed7aa;
  color: #9a3412;
}

.badge-unmatched {
  background: #f1f5f9;
  color: #64748b;
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fca5a5;
}

.badge-purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.badge-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.badge-awaiting {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 600;
}

.badge-pill {
  background: #1e3a8a;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.btn-copy-phone {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 12px;
  color: #64748b;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-left: 4px;
  vertical-align: middle;
}

.btn-copy-phone:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ========================================================================== */
/* FORMS & INPUTS                                                            */
/* ========================================================================== */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.req {
  color: var(--danger);
}

.form-input {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-main);
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.form-input-sm {
  padding: 5px 9px;
  font-size: 12px;
}

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

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

.phone-input-wrapper {
  position: relative;
}

.phone-input {
  padding-right: 100px;
}

.normalized-pill {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  color: #0f172a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 600;
}

.form-check-group {
  margin: 12px 0 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Collapsible Details in Inquiry Quick Add */
.inq-collapsible-details {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin: 14px 0;
  background: #f8fafc;
}

.details-summary {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.details-summary::-webkit-details-marker {
  display: none;
}

.summary-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 11px;
}

details[open] .summary-arrow {
  transform: rotate(90deg);
}

.details-body {
  padding: 14px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.sub-fieldset {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}

.sub-fieldset-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.existing-profile-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 12.5px;
}

/* ========================================================================== */
/* BUTTONS                                                                    */
/* ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #1e3a8a;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-accent {
  background: #0f766e;
  color: #ffffff;
}

.btn-accent:hover {
  background: #115e59;
}

.btn-danger {
  background: #b91c1c;
  color: #ffffff;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-warning {
  background: #d97706;
  color: #ffffff;
}

.btn-warning:hover {
  background: #b45309;
}

.staff-action-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.staff-action-group .btn {
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-xs {
  padding: 3px 7px;
  font-size: 11px;
}

.kbd-hint {
  font-size: 11.5px;
  color: #64748b;
}

kbd {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10.5px;
  font-family: monospace;
}

/* ========================================================================== */
/* RECEPTION TABS & FOLLOW-UP SUB-FILTERS                                     */
/* ========================================================================== */
.reception-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.reception-tab {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reception-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.reception-tab.active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.reception-tab .tab-count {
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 4px;
}

.reception-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.followup-subfilters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.subfilter-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.subfilter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}

.subfilter-btn:hover {
  background: #f8fafc;
}

.subfilter-btn.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.text-danger-bold {
  color: #b91c1c;
  font-weight: 700;
}

/* ========================================================================== */
/* QUICK FILTERS & SAVED FILTERS (Qualified Applicants)                      */
/* ========================================================================== */
.quick-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.qf-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.qf-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qf-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qf-pill:hover {
  background: #e2e8f0;
}

.qf-pill.active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.qf-pill-clear {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
}

.saved-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  margin-bottom: 14px;
}

.saved-filters-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.saved-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.saved-pills-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-grid-card {
  padding: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 16px;
}

.inbox-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

/* ========================================================================== */
/* MODALS & TOASTS                                                           */
/* ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 12px;
  box-sizing: border-box;
}

.modal-box {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  border-left: 4px solid #38bdf8;
}

.toast.toast-success {
  border-left-color: #22c55e;
}

.toast.toast-error {
  border-left-color: #ef4444;
  background: #7f1d1d;
}

/* ========================================================================== */
/* A4 PORTRAIT PRINT PREVIEW & MULTI-PAGE BROWSER PRINT                      */
/* ========================================================================== */
.print-preview-overlay {
  position: fixed;
  inset: 0;
  background: #334155;
  z-index: 1500;
  overflow-y: auto;
  padding-bottom: 48px;
}

.print-toolbar {
  position: sticky;
  top: 0;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #475569;
  z-index: 20;
}

.print-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.print-toolbar-title {
  font-size: 14px;
}

.print-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.print-ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.print-select {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
}

.print-n-input {
  width: 64px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
}

.print-summary-pill {
  background: #0f766e;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.print-toolbar-actions {
  display: flex;
  gap: 10px;
}

.a4-sheets-wrapper {
  padding: 24px 0 60px;
}

.a4-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto;
  background: #ffffff;
  color: #000000;
  padding: 14mm 15mm;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  position: relative;
  page-break-after: always;
  break-after: page;
}

.a4-sheet:last-child {
  page-break-after: avoid;
  break-after: avoid;
}

.print-agency-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.print-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.print-org-name {
  margin: 0;
  font-size: 18pt;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0f172a;
}

.print-org-sub {
  font-size: 9pt;
  color: #334155;
  margin-top: 2px;
}

.print-page-badge {
  border: 1.5px solid #0f172a;
  padding: 3px 8px;
  font-size: 9pt;
  font-weight: 700;
}

.print-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 9pt;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  border-radius: 4px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
  margin-top: 10px;
}

.print-table thead {
  display: table-header-group;
}

.print-table tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.print-table th,
.print-table td {
  border: 1px solid #334155;
  padding: 6px 8px;
  text-align: left;
}

.print-table th {
  background: #e2e8f0 !important;
  color: #0f172a;
  font-weight: 700;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-pending-cell {
  color: #64748b;
  font-style: italic;
}

.print-footer {
  margin-top: 14px;
  padding-top: 6px;
  border-top: 1px solid #94a3b8;
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  color: #475569;
}

.hidden {
  display: none !important;
}

/* ========================================================================== */
/* RESPONSIVE & PRINT MEDIA QUERIES                                           */
/* ========================================================================== */
@media (max-width: 900px) {
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 80vw);
    min-width: 0;
    transform: translateX(-100%);
    z-index: 1200;
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: auto;
    border-radius: 4px;
    transition: all 0.15s ease;
  }

  .sidebar-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
  }

  .sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    font-size: 18px;
  }

  .action-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .grid-2col {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .inbox-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .live-clocks-wrapper {
    display: none;
  }

  .print-preview-overlay {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .print-toolbar {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .print-controls-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .print-ctrl-group {
    width: 100%;
    justify-content: space-between;
  }

  .print-summary-pill {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .print-toolbar-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .print-toolbar-actions .btn {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 12px;
  }

  .main-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .header-left {
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .header-titles {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .current-screen-title {
    font-size: 15px;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-date-badge {
    display: none;
  }

  .role-switcher-group {
    display: none !important;
  }

  .header-right {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-outline-todo {
    padding: 3px 6px;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
  }

  @media (max-width: 400px) {
    .todo-btn-text {
      display: none;
    }
    .current-screen-title {
      max-width: 95px !important;
    }
    .account-menu-trigger {
      max-width: 110px !important;
      padding: 3px 4px !important;
    }
    .user-name {
      max-width: 45px !important;
    }
  }

  .account-menu-trigger {
    padding: 4px 6px;
    gap: 4px;
    max-width: 140px;
  }

  .user-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .user-name {
    max-width: 60px;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .role-badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  .account-dropdown-menu {
    right: 0;
    max-width: calc(100vw - 16px);
    width: 190px;
  }

  /* 1. Dashboard layout: Stack cards cleanly on narrow screens */
  .action-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .mgmt-kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mgmt-metrics-row {
    flex-direction: column;
    gap: 8px;
  }

  .mgmt-sub-pills {
    flex-direction: column;
    gap: 6px;
  }

  .mgmt-pill {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .action-card {
    padding: 14px;
  }

  .action-card-val {
    font-size: 26px;
    margin: 6px 0 2px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .date-picker-bar {
    width: 100%;
    gap: 6px;
  }

  .date-picker-bar label {
    width: 100%;
    font-size: 12px;
    margin-bottom: 2px;
  }

  .date-picker-bar input[type="date"] {
    flex: 1 1 130px;
    min-width: 0;
  }

  .date-picker-bar .btn {
    flex: 1 1 auto;
    padding: 6px 10px;
  }

  .screen-header {
    margin-bottom: 14px;
    gap: 10px;
  }

  .screen-header h2 {
    font-size: 17px;
  }

  /* 2. Form rows & Quick Add on Mobile */
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 40px;
  }

  .phone-input {
    padding-right: 85px;
  }

  .normalized-pill {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* 3. Filter bars */
  .filter-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .filter-inline .form-input,
  .filter-inline select,
  .filter-inline button {
    width: 100%;
  }

  /* 4. Reception Tabs: Swipeable horizontal bar */
  .reception-tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }

  .reception-tab {
    flex-shrink: 0;
    padding: 7px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .followup-subfilters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
  }

  .subfilter-label {
    width: 100%;
  }

  .subfilter-btn {
    width: 100%;
    text-align: center;
    padding: 6px 10px;
  }

  /* 5. Qualified Applicants Quick Filters & Saved Filters */
  .quick-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .qf-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .qf-pill {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .saved-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .saved-filters-right {
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .saved-filters-right .btn {
    flex: 1 1 50%;
  }

  .filter-grid-card {
    padding: 12px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #btn-open-print-list {
    width: 100%;
    justify-content: center;
  }

  /* 6. Prevent iOS/mobile auto-zooming on input focus (minimum 16px font-size) */
  .form-input,
  .form-input-sm,
  select,
  input[type="text"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="password"],
  input[type="number"],
  textarea {
    font-size: 16px !important;
  }

  /* 7. Modal boxes on mobile */
  .modal-backdrop {
    padding: 10px;
  }

  .modal-box {
    max-width: calc(100vw - 20px);
    width: 100%;
    max-height: calc(100vh - 20px);
    margin: auto;
  }

  .modal-header {
    padding: 12px 14px;
  }

  .modal-body {
    padding: 14px;
  }
}

@page {
  size: A4 portrait;
  margin: 10mm 12mm;
}

@media print {
  body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  .print-preview-overlay {
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
    padding: 0 !important;
    display: block !important;
  }

  .a4-sheets-wrapper {
    padding: 0 !important;
  }

  .a4-sheet {
    width: 100% !important;
    min-height: 0 !important;
    max-height: 275mm !important;
    margin: 0 !important;
    padding: 6mm 10mm !important;
    box-shadow: none !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .a4-sheet:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .print-table thead {
    display: table-header-group !important;
  }

  .print-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ========================================================================== */
/* APPLICANT DESK SIGN-IN MODAL (Centered Brand Header & Mobile Optimized)    */
/* ========================================================================== */
.modal-box.modal-signin-card {
  max-width: 410px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
}

.signin-modal-container {
  padding: 26px 24px 20px;
  position: relative;
  box-sizing: border-box;
}

.signin-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.signin-close-btn:hover {
  color: #1e293b;
  background-color: #f1f5f9;
}

.signin-brand-header {
  text-align: center;
  margin-bottom: 18px;
}

.signin-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.signin-logo-img {
  max-height: 72px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.signin-heading {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-align: center;
}

.signin-subheading {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 400;
  text-align: center;
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 4px;
}

.signin-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.signin-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.signin-form-group input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.signin-form-group input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.signin-btn-primary {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  background-color: #1e3a8a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}

.signin-btn-primary:hover:not(:disabled) {
  background-color: #172554;
}

.signin-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.signin-cancel-wrap {
  text-align: center;
  margin-top: 2px;
}

.signin-btn-cancel {
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}

.signin-btn-cancel:hover {
  color: #0f172a;
}

@media (max-width: 600px) {
  .modal-box.modal-signin-card {
    max-width: calc(100vw - 20px);
    border-radius: 10px;
  }
  .signin-modal-container {
    padding: 18px 16px 14px;
  }
  .signin-brand-header {
    margin-bottom: 14px;
  }
  .signin-logo-wrap {
    margin-bottom: 8px;
  }
  .signin-logo-img {
    max-height: 56px;
  }
  .signin-heading {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .signin-subheading {
    font-size: 13px;
  }
  .signin-form {
    gap: 10px;
  }
  .signin-form-group input {
    height: 38px;
    font-size: 16px;
  }
  .signin-btn-primary {
    height: 40px;
    font-size: 14px;
  }
}

@media (max-height: 540px) {
  .modal-backdrop {
    align-items: flex-start !important;
    padding: 6px !important;
    overflow-y: auto !important;
  }
  .modal-box.modal-signin-card {
    max-height: calc(100vh - 12px) !important;
    margin: 4px auto !important;
  }
  .signin-modal-container {
    padding: 12px 14px 10px !important;
  }
  .signin-brand-header {
    margin-bottom: 8px !important;
  }
  .signin-logo-wrap {
    margin-bottom: 4px !important;
  }
  .signin-logo-img {
    max-height: 40px !important;
  }
  .signin-heading {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }
  .signin-subheading {
    font-size: 12px !important;
  }
  .signin-form {
    gap: 8px !important;
  }
  .signin-form-group input {
    height: 34px !important;
  }
  .signin-btn-primary {
    height: 36px !important;
  }
}

/* ========================================================================== */
/* FEATURE 1, 2, 3: TO-DO REMINDER, MATCH RESOLUTION & DOCUMENT TRACKING     */
/* ========================================================================== */

.btn-outline-todo {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e3a8a;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-todo:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.todo-counter {
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.match-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.match-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.match-card.selected {
  border-color: #1d4ed8;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}

.match-card-body {
  font-size: 12.5px;
  color: #334155;
  margin-bottom: 8px;
}

.match-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.possible-match-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.alert-conflict-warning {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 6px;
  font-size: 12px;
}

.resolution-confirmed-box {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
}

.todo-modal-container {
  max-width: 820px;
  width: 100%;
}

.todo-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.todo-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #334155;
}

.todo-pill strong {
  color: #0f172a;
}

.todo-pill.urgent {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.todo-section {
  margin-bottom: 16px;
}

.todo-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.todo-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}

.todo-item-card.overdue {
  border-left: 4px solid #ef4444;
  background: #fff5f5;
}

.todo-item-info {
  flex: 1;
}

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

.doc-tracking-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.doc-tracking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.doc-tracking-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.doc-tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.doc-badge-uploaded {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.doc-badge-pending-upload {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.doc-badge-promised {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.doc-badge-requested {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.doc-badge-missing {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

/* Staff Pending Work Summary (Manager Overview) */
.staff-pending-card {
  margin-top: 16px;
  margin-bottom: 24px;
  border-left: 4px solid #1e40af;
}

.staff-pending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

/* ========================================================================== */
/* COMPACT QUALIFICATIONS & RED MISSING DOCUMENTS BADGE                       */
/* ========================================================================== */
.badge-missing-docs {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #b91c1c;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.badge-pending-docs {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.compact-quals-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.compact-quals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.qual-workflow-block {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.qual-workflow-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}

.qual-workflow-fields {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

/* Date-Time Picker Modal & Trigger */
.datetime-trigger-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

.datetime-trigger-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.datetime-trigger-btn:hover {
  background: #e2e8f0;
}

.dt-picker-preview-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0 16px 0;
  font-size: 13px;
  color: #1e293b;
}

/* User Permissions Granular Access Checkboxes Grid */
.permissions-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 6px;
}

.permission-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
}

.permission-check-item input[type="checkbox"] {
  margin-top: 2px;
}

/* ============================================================================
   SRI LANKA LOCATION SEARCHABLE COMBOBOX
   ============================================================================ */
.loc-combobox-wrapper {
  position: relative;
  width: 100%;
}

.loc-combobox-input {
  width: 100%;
  padding-right: 32px !important;
}

.loc-combobox-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #64748b;
  font-size: 13px;
  user-select: none;
  z-index: 2;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  padding: 4px;
}

.loc-combobox-toggle:hover {
  color: #0284c7;
}

.loc-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.loc-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13.5px;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.loc-dropdown-item:hover,
.loc-dropdown-item.active {
  background: #f1f5f9;
  color: #0284c7;
}

.loc-item-name {
  font-weight: 500;
  color: #0f172a;
}

.loc-dropdown-item:hover .loc-item-name,
.loc-dropdown-item.active .loc-item-name {
  color: #0369a1;
}

.loc-item-district {
  font-size: 12px;
  color: #64748b;
  margin-left: 8px;
  white-space: nowrap;
  font-weight: 400;
}

.loc-dropdown-item:hover .loc-item-district,
.loc-dropdown-item.active .loc-item-district {
  color: #0284c7;
}

.loc-item-other {
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
  margin-top: 4px;
  padding: 9px 12px;
  color: #334155;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.loc-item-other:hover,
.loc-item-other.active {
  background: #f0fdf4;
  color: #15803d;
}

.loc-item-other:hover .loc-item-other-text strong,
.loc-item-other.active .loc-item-other-text strong {
  color: #166534;
}

.loc-dropdown-empty {
  padding: 10px 12px;
  font-size: 12.5px;
  color: #94a3b8;
  font-style: italic;
}

@media (max-width: 480px) {
  .loc-dropdown-menu {
    max-height: 200px;
  }
  .loc-dropdown-item {
    padding: 10px 12px;
    font-size: 13.5px;
  }
}

/* ========================================================================== */
/* COMBINED DOCUMENT & PER-TYPE VERIFICATION STYLES                          */
/* ========================================================================== */
.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.doc-included-types-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 480px) {
  .doc-tracking-grid {
    grid-template-columns: 1fr !important;
  }
  .doc-included-types-list > div {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px;
  }
}




