:root {
  --bg-main: #F6F1E8;
  --bg-card: #FFFDF9;
  --bg-hover: #F0E8DC;
  --bg-sidebar: #2B2B2B;
  --text-main: #1E1E1E;
  --text-muted: #6F6A63;
  --accent-gold: #C6A969;
  --accent-gold-dark: #B3954F;
  --border-soft: #D9D1C7;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.06);

  /* Not in the build guide's token list — added for form feedback states. */
  --color-error: #B3261E;
  --color-success: #2E7D32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", Arial, sans-serif;
  font-size: 16px;
  color: var(--text-main);
  background: var(--bg-main);
}

a {
  color: var(--accent-gold-dark);
}

/* ---------- Auth pages (login / register) ---------- */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 36px 32px;
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-card .auth-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.25);
}

.btn-primary {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-main);
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-gold-dark);
}

a.btn-primary {
  display: inline-block;
  width: auto;
  text-decoration: none;
}

.auth-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.step2-sent-to {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.code-input {
  letter-spacing: 6px;
  font-size: 24px;
  text-align: center;
  font-weight: 600;
}

.alert {
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-error {
  color: var(--color-error);
  background: #FBEAE8;
  border-color: #F0C9C4;
}

.alert-success {
  color: var(--color-success);
  background: #E8F3E9;
  border-color: #C8E0CA;
}

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

/* ---------- App shell (dashboards) ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  color: #FFFFFF;
  padding: 24px 0;
}

.sidebar-brand {
  padding: 0 24px 24px;
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
}

.sidebar-brand-logo {
  display: block;
  height: 38px;
  width: auto;
  border-radius: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-nav a {
  padding: 12px 24px;
  color: #D9D1C7;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.sidebar-nav a.active {
  background: rgba(198, 169, 105, 0.15);
  border-left-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: var(--bg-sidebar);
  color: #FFFFFF;
  padding: 16px 32px;
}

.topbar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-icon {
  color: #D9D1C7;
  text-decoration: none;
  font-size: 18px;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.topbar-profile-name {
  color: #FFFFFF;
  text-decoration: none;
}

.topbar-profile-name:hover {
  text-decoration: underline;
}

.topbar-logout {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
}

.app-content {
  flex: 1;
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 0;
}

.app-footer-note {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.page-heading {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
}

/* ---------- Dashboard cards ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.dashboard-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.dashboard-card-summary {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.dashboard-card-count {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
}

.dashboard-card-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-decoration: none;
}

/* ---------- Empty state ---------- */

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}

/* ---------- Table toolbar ---------- */

.table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.stage-text {
  color: var(--accent-gold);
  font-weight: 500;
}

/* ---------- Tables ---------- */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-hover);
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

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

/* ---------- Status badges ---------- */

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #E8F3E9;
  color: var(--color-success);
}

.badge-error {
  background: #FBEAE8;
  color: var(--color-error);
}

.badge-pending {
  background: rgba(198, 169, 105, 0.15);
  color: var(--accent-gold-dark);
}

.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

/* ---------- Profile page ---------- */

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  max-width: 600px;
}

.profile-section-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

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

/* ---------- Mobile nav toggle ---------- */

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---------- Form sections (new-application, multi-section forms) ---------- */

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  margin-bottom: 24px;
}

.form-section-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='none' stroke='%236F6A63' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.25);
}

/* File Upload Drop Zone */

.upload-drop-zone {
  position: relative;
  border: 2px dashed rgba(198, 169, 105, 0.5);
  border-radius: 14px;
  padding: 40px 20px;
  background: rgba(198, 169, 105, 0.06);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-drop-zone:hover {
  border-style: solid;
  border-color: var(--accent-gold);
  background: rgba(198, 169, 105, 0.12);
}

.upload-drop-zone.drag-over {
  border-style: solid;
  border-color: var(--accent-gold);
  background: rgba(198, 169, 105, 0.18);
}

.upload-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.upload-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.upload-icon {
  width: 40px;
  height: 40px;
  color: var(--accent-gold);
}

.upload-drop-label {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.upload-browse-btn {
  padding: 7px 22px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: 999px;
  cursor: pointer;
}

.upload-counter {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.upload-file-list {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.upload-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.upload-file-item:last-child {
  border-bottom: none;
}

.upload-file-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.upload-file-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-size {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.upload-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-gold-dark);
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.upload-remove-btn:hover {
  background: rgba(198, 169, 105, 0.15);
}

.file-note {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.form-actions .btn-primary {
  width: 100%;
}

.btn-cancel-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.btn-cancel-link:hover {
  color: var(--text-main);
}

/* Tracking Timeline */

/* ── Selector ───────────────────────────────────────── */

.tl-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tl-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tl-selector-static {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 500;
}

.tl-selector-select {
  flex: 1;
  min-width: 240px;
  max-width: 600px;
  padding: 10px 36px 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='none' stroke='%236F6A63' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.tl-selector-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.2);
}

/* ── Dossier header ─────────────────────────────────── */

.dossier-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 28px 32px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.dossier-left {
  flex: 1;
  min-width: 200px;
}

.dossier-app-number {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.dossier-product-name {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.dossier-meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.dossier-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.dossier-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dossier-stage-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--accent-gold);
  color: var(--text-main);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.dossier-submitted {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.delay-banner {
  border-left: 4px solid #F59E0B;
  background: rgba(255, 193, 7, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 14px;
  color: #92400E;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 24px;
}

/* ── Vertical timeline ──────────────────────────────── */

.timeline {
  margin-top: 32px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.tl-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 18px;
}

.timeline-node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-completed {
  background: #4CAF50;
  border: 2px solid #4CAF50;
}

.node-current {
  background: var(--accent-gold);
  border: 2px solid var(--accent-gold);
  animation: timeline-pulse 2s infinite;
}

.node-upcoming {
  background: transparent;
  border: 2px solid rgba(111, 106, 99, 0.35);
}

.node-warning {
  background: #F59E0B;
  border: 2px solid #F59E0B;
}

.node-error {
  background: var(--color-error);
  border: 2px solid var(--color-error);
}

@keyframes timeline-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(198, 169, 105, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(198, 169, 105, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(198, 169, 105, 0);   }
}

.tl-spine {
  width: 3px;
  flex: 1;
  min-height: 28px;
}

.tl-spine.spine-completed {
  background: #4CAF50;
}

.tl-spine.spine-current {
  border-left: 2px dashed var(--accent-gold);
  width: 0;
  margin-left: 1px;
}

.tl-spine.spine-upcoming {
  border-left: 2px dashed rgba(0, 0, 0, 0.12);
  width: 0;
  margin-left: 1px;
}

.timeline-stage {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
}

.timeline-stage.completed {
  background: rgba(76, 175, 80, 0.04);
  border: 1px solid var(--border-soft);
  border-left: 3px solid rgba(76, 175, 80, 0.3);
}

.timeline-stage.current {
  background: rgba(198, 169, 105, 0.06);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent-gold);
  box-shadow: 0 2px 12px rgba(198, 169, 105, 0.15);
}

.timeline-stage.upcoming {
  background: transparent;
  border: none;
  padding-top: 0;
}

.tl-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.tl-stage-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-stage.current .tl-stage-name {
  color: var(--accent-gold);
  font-size: 1.05rem;
}

.timeline-stage.upcoming .tl-stage-name {
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.6;
}

.tl-in-progress {
  display: block;
  font-size: 13px;
  font-style: italic;
  color: var(--accent-gold);
  margin-top: 2px;
  margin-bottom: 10px;
}

.tl-stage-time {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.tl-history-chip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.tl-chip-action {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.tl-chip-comment {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.tl-chip-actor {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

.delay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.4);
  color: #B8860B;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Officer communications thread ──────────────────── */

.feedback-thread {
  margin-top: 32px;
}

.feedback-thread-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.feedback-bubble {
  margin-bottom: 14px;
  padding: 16px 18px;
  background: rgba(198, 169, 105, 0.05);
  border: 1px solid var(--border-soft);
  border-left: 3px solid rgba(198, 169, 105, 0.4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.feedback-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.feedback-officer {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.feedback-time {
  font-size: 13px;
  color: var(--text-muted);
}

.feedback-body {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
}

/* ── Stage stories ──────────────────────────────────── */

.stage-story {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 8px 0 14px;
  font-style: italic;
}

.timeline-stage.current .stage-story {
  color: var(--text-main);
  font-style: normal;
}

/* ── Determination substages ────────────────────────── */

.substage-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(198, 169, 105, 0.20);
}

.substage-block-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  font-weight: 700;
  margin: 0 0 12px;
}

.substage-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
}

.substage-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.substage-node.complete {
  background: #4CAF50;
}

.substage-node.in-progress {
  background: var(--accent-gold);
  animation: timeline-pulse 2s infinite;
}

.substage-node.pending {
  background: transparent;
  border: 2px solid rgba(111, 106, 99, 0.30);
}

.substage-connector {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.08);
  margin-left: 5px;
}

.substage-content {
  flex: 1;
  min-width: 0;
}

.substage-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.substage-name.in-progress {
  color: var(--accent-gold);
  font-weight: 700;
}

.substage-name.pending {
  color: var(--text-muted);
  opacity: 0.5;
  font-weight: 400;
}

.substage-notes {
  font-size: 0.80rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0 0;
}

.substage-right {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Surveillance schedule ──────────────────────────── */

.surveillance-schedule {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(198, 169, 105, 0.20);
}

.surveillance-schedule-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  font-weight: 700;
  margin: 0 0 12px;
}

.surveillance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.surveillance-row:last-child {
  border-bottom: none;
}

.surveillance-cycle {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 90px;
}

/* ── Customer communication panel ───────────────────── */

.comm-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}

.comm-section-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.comm-section-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
}

.communication-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comm-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comm-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.comm-panel-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.comm-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.comm-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.2);
}

.btn-comm-info {
  align-self: flex-start;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-comm-info:hover {
  background: rgba(198, 169, 105, 0.1);
}

.btn-comm-advance {
  align-self: flex-start;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-main);
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-comm-advance:hover {
  background: var(--accent-gold-dark);
}

.comm-log {
  margin-top: 28px;
}

.comm-log-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.comm-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.comm-entry:last-child {
  border-bottom: none;
}

.comm-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.comm-entry-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.comm-entry-body {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.badge-info-request {
  background: #EFF6FF;
  color: #1D4ED8;
}

.badge-advancement {
  background: rgba(198, 169, 105, 0.15);
  color: var(--accent-gold-dark);
}

.badge-acknowledged {
  background: #E0F2FE;
  color: #0369A1;
}

.badge-resolved {
  background: #E8F3E9;
  color: var(--color-success);
}

/* Application Details */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent-gold-dark);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--border-soft);
}

.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.detail-section-title {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.detail-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-overview-left {
  flex: 1;
  min-width: 200px;
}

.detail-app-number {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.detail-product-name {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.detail-product-meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.detail-product-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

.detail-overview-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-submitted {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-journey-link {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-journey-link:hover {
  background: rgba(198, 169, 105, 0.1);
}

.badge-uploaded {
  background: #F1F0EE;
  color: #6F6A63;
}

.document-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.document-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.document-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.document-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 3px;
  word-break: break-all;
}

.document-date {
  font-size: 12px;
  color: var(--text-muted);
}

.document-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.doc-reviewer-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #B8860B;
  font-style: italic;
}

.doc-download-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-decoration: none;
}

.doc-download-link:hover {
  text-decoration: underline;
}

.payment-record {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.payment-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.payment-value {
  font-weight: 500;
  color: var(--text-main);
}

.payment-value.mono {
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.03em;
}

.decision-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.decision-outcome-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.decision-outcome-badge {
  font-size: 15px;
  padding: 8px 22px;
}

.decision-officer {
  font-size: 14px;
  color: var(--text-muted);
}

.decision-time {
  font-size: 13px;
  color: var(--text-muted);
}

.decision-reasoning {
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  background: var(--bg-main);
}

.certificate-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.cert-meta {
  font-size: 14px;
  color: var(--text-muted);
}

.cert-expiry-warning {
  font-size: 13px;
  color: #B8860B;
  font-weight: 600;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 8px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-decoration: none;
}

.page-nav a:hover {
  text-decoration: underline;
}

/* ── Threshold panel ────────────────────────────────── */

.threshold-panel {
  background: rgba(198, 169, 105, 0.06);
  border: 1px solid rgba(198, 169, 105, 0.25);
  border-radius: 14px;
  padding: 24px 28px;
}

.threshold-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.threshold-body {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.8;
}

.threshold-body.muted {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 18px;
}

.threshold-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(198, 169, 105, 0.15);
  overflow: hidden;
  margin-bottom: 8px;
}

.threshold-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(to right, rgba(198, 169, 105, 0.5), var(--accent-gold));
  transition: width 0.6s ease;
}

.threshold-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.threshold-breached-notice {
  font-size: 0.82rem;
  color: #4CAF50;
  margin-bottom: 10px;
}

/* Documents Page */

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tab {
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold-dark);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-tab:hover {
  background: rgba(198, 169, 105, 0.1);
}

.filter-tab.active {
  background: var(--accent-gold);
  color: var(--text-main);
}

/* Notifications Page */

.notification-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.notification-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notification-row.unread {
  border-left: 4px solid var(--accent-gold);
  background: rgba(198, 169, 105, 0.06);
  padding-left: 10px;
  border-radius: 4px;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
}

.notif-app-link {
  font-size: 12px;
  color: var(--accent-gold-dark);
  text-decoration: none;
}

.notif-app-link:hover {
  text-decoration: underline;
}

.notif-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.notif-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.notification-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--accent-gold);
  color: var(--text-main);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topbar-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-bell-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  background: var(--accent-gold);
  color: var(--text-main);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* Payments Page */

.payment-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.payment-summary-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.payment-summary-amount {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.payment-summary-amount.green { color: var(--color-success); }
.payment-summary-amount.gold  { color: var(--accent-gold-dark); }
.payment-summary-amount.red   { color: var(--color-error); }
.payment-summary-amount.muted { color: var(--text-muted); }

.payment-summary-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Officer Auth */

.suspension-advisory {
  flex: 0 0 100%;
  background: rgba(245, 158, 11, 0.10);
  border-top: 1px solid rgba(245, 158, 11, 0.30);
  padding: 10px 24px;
  font-size: 0.85rem;
  color: #92400E;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.advisory-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: #92400E;
  font-size: 1rem;
  padding: 0 4px;
  line-height: 1;
}

/* Password Toggle */

.password-field-wrap {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

.hidden {
  display: none;
}

/* Step Indicators */

.officer-auth-outer {
  width: 100%;
  max-width: 440px;
}

.officer-auth-logo {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

/* Dark rounded logo tile for cream-coloured pages (auth cards, portal) —
   the master PNG already IS a filled dark square, so object-fit: cover
   just center-crops it into a clean tile without stretching. */
.brand-logo-tile {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin: 0 auto 20px;
}

.brand-logo-tile.lg {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  margin-bottom: 16px;
}

.step-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(111, 106, 99, 0.4);
  background: transparent;
  transition: all 0.2s ease;
}

.step-dot.completed {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.step-dot.current {
  border-color: var(--accent-gold);
  background: transparent;
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.25);
  animation: timeline-pulse 2s infinite;
}

/* Officer Lobby */

.lobby-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.lobby-topbar-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
}

.lobby-topbar-logo-img {
  display: block;
  height: 34px;
  width: auto;
  border-radius: 7px;
}

.lobby-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.lobby-topbar-right a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lobby-topbar-right a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.lobby-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.lobby-greeting {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px;
}

.lobby-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.lobby-advisory-amber {
  border-left: 4px solid #F59E0B;
  background: rgba(245, 158, 11, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 14px;
  color: #92400E;
  line-height: 1.6;
  margin-bottom: 12px;
}

.lobby-advisory-red {
  border-left: 4px solid var(--color-error);
  background: rgba(220, 38, 38, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--color-error);
  line-height: 1.6;
  margin-bottom: 12px;
}

.karibu-card {
  background: #FFFFFF;
  border: 1px solid rgba(198, 169, 105, 0.30);
  border-radius: 18px;
  padding: 40px;
  max-width: 480px;
  margin: 32px auto;
  box-shadow: 0 4px 24px rgba(198, 169, 105, 0.12);
  text-align: center;
}

.karibu-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px 0 8px;
}

.karibu-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.karibu-card .key-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 20px;
  border: 2px solid rgba(198, 169, 105, 0.40);
  border-radius: 12px;
  width: 100%;
  background: rgba(198, 169, 105, 0.04);
  color: var(--text-main);
  font-family: 'Courier New', Courier, monospace;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.karibu-card .key-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.20);
  outline: none;
}

.karibu-card .key-input::placeholder {
  color: rgba(111, 106, 99, 0.5);
  letter-spacing: 0.1em;
}

.karibu-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.lobby-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.news-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.news-card-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 6px 0;
}

.news-card-body {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.news-read-more {
  font-size: 0.85rem;
  color: var(--accent-gold-dark);
  text-decoration: none;
  font-weight: 600;
}

.news-read-more:hover {
  text-decoration: underline;
}

.news-card-author {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Downloads Page */

.downloads-summary-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.downloads-summary-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.downloads-summary-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 300px;
  text-align: right;
}

.licence-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

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

.licence-card-eyebrow-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.licence-product-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}

.licence-product-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.licence-meta-cols {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.licence-meta-col {
  min-width: 140px;
}

.licence-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.licence-meta-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 0;
}

.licence-expiry-warning {
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.licence-docs-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  font-weight: 700;
  margin: 20px 0 12px;
}

.doc-dl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.doc-dl-row:last-child {
  border-bottom: none;
}

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

.doc-dl-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-download-doc {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-main);
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.btn-download-doc:hover {
  background: var(--accent-gold-dark);
}

.licence-card-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
}

.licence-card-footer a {
  color: var(--accent-gold-dark);
  text-decoration: none;
}

.licence-card-footer a:hover {
  text-decoration: underline;
}

/* Story Mode */

.story-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.story-modal-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.story-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 12px;
}

.story-modal-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 24px;
}

/* Admin Panel */

.admin-welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.admin-quick-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-quick-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.admin-quick-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-quick-link {
  font-size: 0.85rem;
  color: var(--accent-gold-dark);
  text-decoration: none;
  margin-top: auto;
}

.admin-quick-link:hover {
  text-decoration: underline;
}

.key-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.key-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.key-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.key-code-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
}

.key-reveal-btn {
  font-size: 0.78rem;
  color: var(--accent-gold-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 0 0 8px;
}

.key-dept-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.key-dept-pill {
  background: rgba(198, 169, 105, 0.12);
  border: 1px solid rgba(198, 169, 105, 0.30);
  color: var(--accent-gold-dark);
  font-size: 0.75rem;
  border-radius: 20px;
  padding: 3px 10px;
}

.key-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.key-held-by {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.key-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.btn-suspend-courtesy {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold-dark);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-suspend-courtesy:hover {
  background: rgba(198, 169, 105, 0.1);
}

.btn-suspend-immediate {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-error);
  background: transparent;
  border: 1.5px solid var(--color-error);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-suspend-immediate:hover {
  background: rgba(179, 38, 30, 0.06);
}

.btn-reinstate {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-success);
  background: transparent;
  border: 1.5px solid var(--color-success);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-reinstate:hover {
  background: rgba(46, 125, 50, 0.06);
}

.btn-regenerate {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-regenerate:hover {
  background: var(--bg-hover);
}

.inline-suspension-form {
  display: none;
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.20);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
}

.btn-rename-key {
  background: none;
  border: none;
  padding: 2px 4px;
  margin-left: 6px;
  color: var(--text-muted);
  cursor: pointer;
  vertical-align: middle;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.btn-rename-key:hover {
  color: var(--accent-gold-dark);
  background: rgba(198, 169, 105, 0.1);
}

.inline-rename-form {
  display: none;
  background: rgba(198, 169, 105, 0.05);
  border: 1px solid rgba(198, 169, 105, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 12px;
}

.key-issued-page {
  max-width: 540px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

.issued-key-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.3em;
  padding: 24px;
  background: rgba(198, 169, 105, 0.08);
  border: 2px dashed rgba(198, 169, 105, 0.40);
  border-radius: 14px;
  margin: 24px 0;
  word-break: break-all;
}

.issued-key-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #F59E0B;
  border-radius: 0 10px 10px 0;
  padding: 14px 20px;
  text-align: left;
  color: #92400E;
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.issued-dept-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

/* ---------- Officer Domain ---------- */

.sidebar-domain-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-domain-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin: 0 0 6px;
}

.sidebar-domain-dept {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
}

.domain-header {
  margin-bottom: 28px;
}

.domain-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin: 0 0 6px;
}

.domain-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}

.domain-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.domain-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.domain-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px 24px;
  border-left-width: 4px;
  border-left-style: solid;
}

.domain-kpi-card.urgent {
  background: rgba(245, 158, 11, 0.05);
}

.domain-kpi-card.attention {
  background: rgba(59, 130, 246, 0.05);
}

.domain-kpi-figure {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}

.domain-kpi-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.domain-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin-bottom: 28px;
}

.domain-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 18px;
}

.domain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.domain-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}

.domain-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

.domain-table-row.delayed {
  border-left: 3px solid #F59E0B;
  background: rgba(245, 158, 11, 0.02);
}

.domain-table-row.correction {
  border-left: 3px solid #F59E0B;
}

.days-figure {
  font-weight: 700;
}

.days-figure.delayed {
  color: #DC2626;
}

.days-figure.approaching {
  color: #F59E0B;
}

.delayed-chip {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #B45309;
  font-size: 0.72rem;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 6px;
}

.badge-neutral {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
}

.btn-domain-action {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-gold);
  color: #1E1E1E;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-domain-action:hover {
  background: var(--accent-gold-dark);
  color: #FFFFFF;
}

.pending-comm-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pending-comm-row:last-child {
  border-bottom: none;
}

.comm-type-badge {
  font-size: 0.75rem;
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.comm-badge-info {
  background: rgba(59, 130, 246, 0.10);
  color: #1D4ED8;
}

.comm-badge-advancement {
  background: rgba(198, 169, 105, 0.12);
  color: var(--accent-gold-dark);
}

.comm-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 3px 0 0;
}

.activity-feed {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  gap: 10px;
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-content {
  flex: 1;
}

.activity-action {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  font-weight: 600;
  margin: 0;
}

.activity-app {
  font-size: 0.88rem;
  color: var(--text-main);
  margin: 1px 0 0;
}

.activity-comment {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0 0;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 2px 0 0;
}

/* ---------- Officer Review ---------- */

.review-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.review-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.review-breadcrumb a:hover {
  color: var(--accent-gold-dark);
  text-decoration: underline;
}

.review-bc-sep {
  color: var(--border-soft);
}

.review-overview-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.review-overview-left {
  flex: 1;
  min-width: 0;
}

.review-overview-right {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.review-app-ref {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.review-product-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
  line-height: 1.2;
}

.review-product-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.review-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 14px;
  line-height: 1.6;
}

.review-customer-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.review-customer-meta p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

.review-meta-label {
  font-weight: 600;
  color: var(--text-main);
}

.review-delay-banner {
  margin-top: 12px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  color: #B45309;
  font-size: 0.82rem;
  font-weight: 600;
}

.review-doc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}

.review-doc-row:last-of-type {
  border-bottom: none;
}

.review-doc-left {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 200px;
}

.review-doc-centre {
  min-width: 160px;
}

.review-doc-right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-start;
}

.btn-verify {
  font-size: 0.82rem;
  padding: 6px 14px;
  border: 1px solid #4CAF50;
  color: #2E7D32;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.btn-verify:hover {
  background: rgba(76, 175, 80, 0.08);
}

.btn-reject {
  font-size: 0.82rem;
  padding: 6px 14px;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.btn-reject:hover {
  background: rgba(220, 38, 38, 0.06);
}

.inline-rejection-form {
  display: none;
  width: 100%;
  flex-basis: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.20);
  border-radius: 10px;
}

.decision-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.decision-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px;
}

.decision-panel.advance {
  border-top: 3px solid #4CAF50;
}

.decision-panel.correction {
  border-top: 3px solid var(--color-error);
}

.decision-panel-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.decision-panel.advance .decision-panel-title {
  color: #2E7D32;
}

.decision-panel.correction .decision-panel-title {
  color: var(--color-error);
}

.decision-panel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.fee-input-group {
  margin-bottom: 14px;
}

.fee-input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.history-feed {
  display: flex;
  flex-direction: column;
}

.history-entry {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.history-entry:last-child {
  border-bottom: none;
}

.history-action {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  font-weight: 600;
  margin: 0;
}

.history-comment {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0 0;
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.feedback-bubble {
  background: rgba(198, 169, 105, 0.08);
  border: 1px solid rgba(198, 169, 105, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.feedback-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.feedback-sender {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold-dark);
}

.feedback-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feedback-text {
  font-size: 0.88rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.6;
}

.btn-send-feedback {
  display: inline-block;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold-dark);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-send-feedback:hover {
  background: rgba(198, 169, 105, 0.10);
  color: var(--accent-gold);
}

/* ---------- Officer Invoice Panel (Stage 3) ---------- */

.invoice-cn-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.18em;
  text-align: center;
  padding: 22px;
  background: rgba(198, 169, 105, 0.08);
  border: 2px dashed rgba(198, 169, 105, 0.35);
  border-radius: 14px;
  margin: 16px 0;
}

/* ---------- Customer: Payments page ---------- */

.control-number-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(198, 169, 105, 0.06);
  border: 1px dashed rgba(198, 169, 105, 0.35);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 8px 0;
}

.control-number-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  letter-spacing: 0.10em;
  flex: 1;
}

.btn-copy-control {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-gold);
  color: #1E1E1E;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-copy-control:hover { opacity: 0.82; }

.btn-confirm-dummy {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  color: #1E1E1E;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 10px;
}

.btn-confirm-dummy:hover {
  background: var(--accent-gold-dark);
  border-color: var(--accent-gold-dark);
}

/* Payment Evidence Block (State D — officer verify panel) */
.payment-evidence-block {
  background: rgba(76,175,80,0.05);
  border: 1px solid rgba(76,175,80,0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-evidence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.payment-evidence-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.btn-verify-advance {
  background: #4CAF50;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-verify-advance:hover:not(:disabled) { background: #3D8B40; }

.btn-verify-advance:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.how-to-pay-toggle {
  background: none;
  border: none;
  color: var(--accent-gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  margin-top: 8px;
}

.how-to-pay-panel {
  display: none;
  background: var(--bg-main);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.75;
}

/* ---------- Customer: Notification control-number chip ---------- */

.notif-control-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  font-weight: 700;
  color: var(--accent-gold-dark);
  background: rgba(198, 169, 105, 0.10);
  border: 1px solid rgba(198, 169, 105, 0.30);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.btn-copy-inline {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 600;
  background: var(--accent-gold);
  color: #1E1E1E;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-copy-inline:hover { opacity: 0.82; }

@media (max-width: 1199px) {
  .app-content {
    width: 92%;
  }

  .app-footer-note {
    width: 92%;
  }

  .domain-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .app-content {
    width: 100%;
    padding: 24px 16px;
  }

  .app-footer-note {
    width: 100%;
    padding: 0 16px 20px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

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

  .dossier-header {
    flex-direction: column;
    padding: 22px 20px;
  }

  .dossier-right {
    align-items: flex-start;
  }

  .communication-panels {
    grid-template-columns: 1fr;
  }

  .comm-entry-time {
    margin-left: 0;
    width: 100%;
  }

  .payment-summary-strip {
    grid-template-columns: 1fr;
  }

  .admin-quick-grid {
    grid-template-columns: 1fr;
  }

  .domain-kpi-grid {
    grid-template-columns: 1fr;
  }

  .domain-table {
    font-size: 0.82rem;
  }

  .review-overview-card {
    flex-direction: column;
  }

  .review-overview-right {
    align-items: flex-start;
    min-width: unset;
    width: 100%;
  }

  .decision-panels {
    grid-template-columns: 1fr;
  }
}

/* ── Landing Portal ─────────────────────────────────────────────────────── */

.portal-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  padding: 40px 20px 60px;
}

.portal-brand {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  margin: 0 0 8px;
  line-height: 1;
}

.portal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px;
  text-align: center;
}

.portal-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 36px;
  text-align: center;
}

.portal-prompt {
  font-size: 0.8rem;
  font-variant: small-caps;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  margin: 0 0 20px;
  text-align: center;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  width: 100%;
}

.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 24px 22px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-soft);
}

.portal-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
}

.portal-card-icon {
  color: var(--accent-gold);
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.portal-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.portal-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.portal-card-sublink {
  font-size: 0.8rem;
  color: var(--accent-gold-dark, #B3954F);
  display: block;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portal-footer {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 40px;
  text-align: center;
}

@media (max-width: 767px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-brand { font-size: 2.4rem; }
  .portal-title { font-size: 1.3rem; }
}

/* Admin Specialties */

.colour-swatch-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.colour-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.colour-swatch.selected {
  border: 2px solid var(--accent-gold);
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(198, 169, 105, 0.25);
}

.specialty-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.specialty-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.specialty-colour-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.specialty-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.specialty-officer-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.specialty-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 8px 0;
  line-height: 1.6;
}

.specialty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.btn-specialty-edit {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold-dark);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-specialty-edit:hover {
  background: rgba(198, 169, 105, 0.1);
}

.btn-retire {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #92400E;
  background: transparent;
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-retire:hover {
  background: rgba(245, 158, 11, 0.08);
}

.btn-delete-sp {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-error);
  background: transparent;
  border: 1.5px solid var(--color-error);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete-sp:hover:not(:disabled) {
  background: rgba(179, 38, 30, 0.06);
}

.btn-delete-sp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inline-specialty-form {
  display: none;
  background: rgba(198, 169, 105, 0.04);
  border: 1px solid rgba(198, 169, 105, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
}

.inline-specialty-advisory {
  display: none;
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
}

/* Technical Assignment Theatre */

.specialty-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.specialty-chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(var(--sp-rgb), 0.45);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.specialty-chip.selected {
  border-color: rgb(var(--sp-rgb));
  background: rgba(var(--sp-rgb), 0.10);
  box-shadow: 0 0 0 2px rgba(var(--sp-rgb), 0.20);
}

#roster-container {
  margin-top: 16px;
}

.roster-candidate-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.roster-candidate-row.at-capacity {
  cursor: pointer;
}

.roster-candidate-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  flex: 1;
  min-width: 140px;
}

.roster-workload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.workload-bar-track {
  width: 120px;
  height: 8px;
  border-radius: 4px;
  background: rgba(198, 169, 105, 0.12);
  overflow: hidden;
  display: inline-block;
}

.workload-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.roster-task-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.roster-candidate-action {
  flex-shrink: 0;
}

.btn-view-assign {
  padding: 7px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-gold-dark);
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-view-assign:hover {
  background: rgba(198, 169, 105, 0.1);
}

.roster-at-capacity-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
}

.capacity-advisory {
  display: none;
  flex-basis: 100%;
  background: rgba(220, 38, 38, 0.05);
  border-left: 4px solid var(--color-error);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #7F1D1D;
}

.candidate-inspection-panel {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--bg-main);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.candidate-task-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.substage-progress-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.substage-segment {
  flex: 1;
  height: 10px;
  border-radius: 3px;
}

.substage-segment.complete {
  background: #4CAF50;
}

.substage-segment.in-progress {
  background: var(--accent-gold);
  animation: timeline-pulse 2s infinite;
}

.substage-segment.pending {
  background: rgba(111, 106, 99, 0.15);
}

.assignment-confirm-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* Field Task Workspace */

.task-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 14px;
}

.task-tab {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.task-tab:hover {
  background: var(--bg-hover);
}

.task-tab.active {
  color: var(--text-main);
  border-color: var(--accent-gold);
  background: rgba(198, 169, 105, 0.12);
}

.task-tab-panel {
  display: none;
}

.task-tab-panel.active {
  display: block;
}

.btn-form-soon {
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: not-allowed;
  opacity: 0.7;
}
