* {
  box-sizing: border-box;
}

:root {
  --bg-0: #eef1f7;
  --bg-1: #f6f8fc;
  --bg-2: #dde3ed;
  --surface-0: rgba(255, 255, 255, 0.88);
  --surface-1: rgba(248, 250, 255, 0.94);
  --surface-2: rgba(235, 240, 250, 0.95);
  --line-0: rgba(42, 37, 96, 0.12);
  --line-1: rgba(42, 37, 96, 0.22);
  --text-0: #0d0c1e;
  --text-1: #1a1940;
  --text-2: #5a6080;
  --brand-0: #00BCD8;
  --brand-1: #3D3587;
  --brand-2: #E85A20;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #f43f5e;
  --fireside-cyan: #00BCD8;
  --fireside-purple: #3D3587;
  --fireside-navy: #2A2560;
  --fireside-light-cyan: #7DD3F0;
  --fireside-lavender: #7B6CC4;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text-1);
  font-family: "Manrope", "Space Grotesk", "Inter", sans-serif;
  background:
    radial-gradient(900px 480px at 4% -6%, rgba(0, 188, 216, 0.10), transparent 56%),
    radial-gradient(800px 420px at 98% 2%, rgba(61, 53, 135, 0.10), transparent 54%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 52%, #e4e8f2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 53, 135, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 53, 135, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
  opacity: 0.28;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background-image: url("/static/fireside-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.25s ease;
}

.sidebar {
  background:
    radial-gradient(circle at top left, rgba(0, 188, 216, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(26, 21, 64, 0.99) 0%, rgba(42, 37, 96, 0.98) 50%, rgba(29, 25, 72, 0.99) 100%);
  border-right: 1px solid rgba(0, 188, 216, 0.12);
  backdrop-filter: blur(18px);
  color: var(--text-1);
  padding: 18px 14px;
  min-width: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
  box-shadow: 22px 0 48px rgba(10, 8, 30, 0.22);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(0, 188, 216, 0.95), rgba(61, 53, 135, 0.95));
  color: #ffffff;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 30px rgba(0, 188, 216, 0.32);
}

.brand {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  margin-bottom: 4px;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(125, 211, 240, 0.75);
  font-weight: 800;
  margin-left: 1px;
}

.sidebar-close-btn {
  display: none;
  border: 1px solid var(--line-1);
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-1);
  border-radius: 10px;
  width: 30px;
  height: 30px;
  font-size: 14px;
  padding: 0;
}

.side-group {
  margin-bottom: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.side-group h4 {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9eb0aa;
  font-weight: 800;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(210, 220, 240, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.22s ease;
}

.side-link i {
  width: 16px;
  height: 16px;
  color: rgba(125, 211, 240, 0.7);
  flex-shrink: 0;
}

.side-link:hover {
  transform: translateX(2px);
  background: rgba(0, 188, 216, 0.10);
  border-color: rgba(0, 188, 216, 0.20);
}

.side-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 188, 216, 0.72), rgba(61, 53, 135, 0.74));
  border-color: rgba(125, 211, 240, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 188, 216, 0.20), 0 12px 28px rgba(0, 0, 30, 0.28);
}

.side-link.active i {
  color: #ffffff;
}

.side-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.layout.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.layout.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.content {
  padding: 24px 24px 40px;
  min-width: 0;
}

.sidebar-toggle-btn {
  appearance: none;
  border: 1px solid rgba(0, 188, 216, 0.22);
  background: linear-gradient(120deg, rgba(240, 248, 255, 0.88), rgba(225, 240, 248, 0.84));
  color: #1a5f7a;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(0, 20, 50, 0.1);
}

.sidebar-backdrop {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(42, 37, 96, 0.12);
  background:
    radial-gradient(circle at top right, rgba(0, 188, 216, 0.10), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 242, 250, 0.94));
  box-shadow: 0 18px 36px rgba(10, 8, 40, 0.08);
  animation: rise-in 0.45s ease both;
}

.topbar h2 {
  margin: 0;
  color: #0d0c1e;
  font-size: 40px;
  letter-spacing: -0.025em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 188, 216, 0.28);
  background: rgba(0, 188, 216, 0.10);
  color: #0277a0;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(42, 37, 96, 0.12);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%),
    linear-gradient(180deg, var(--surface-0), var(--surface-1));
  backdrop-filter: blur(10px);
  padding: 14px 16px;
  box-shadow: 0 16px 32px rgba(10, 8, 40, 0.09);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: rise-in 0.5s ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 188, 216, 0.22), transparent 44%, rgba(61, 53, 135, 0.10));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(36, 27, 16, 0.14);
}

.card .k {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5a6080;
}

.card .k i {
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  color: #00BCD8;
}

.card .v {
  margin-top: 5px;
  color: #221d17;
  font-size: 31px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.section {
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid rgba(42, 37, 96, 0.12);
  background:
    radial-gradient(circle at top right, rgba(0, 188, 216, 0.07), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 246, 252, 0.96));
  backdrop-filter: blur(10px);
  padding: 18px;
  box-shadow: 0 18px 34px rgba(10, 8, 40, 0.08);
  animation: rise-in 0.52s ease both;
}

.section h3 {
  margin: 2px 0 12px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0d0c1e;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.section p {
  color: var(--text-2);
  font-size: 13px;
}

.overview-control-bar {
  padding: 10px 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.overview-kpi {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 32px rgba(36, 27, 16, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.overview-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.45), transparent 40%);
  pointer-events: none;
}

.overview-kpi-sky { background: linear-gradient(135deg, #e8f9fd, #b3e8f5); }
.overview-kpi-blue { background: linear-gradient(135deg, #ece9f8, #c5bdf0); }
.overview-kpi-amber { background: linear-gradient(135deg, #fff4e5, #fdd6a0); }
.overview-kpi-violet { background: linear-gradient(135deg, #edeaff, #c4bef5); }
.overview-kpi-emerald { background: linear-gradient(135deg, #e2f5e8, #9ed8b2); }
.overview-kpi-rose { background: linear-gradient(135deg, #fff0f0, #f7b5b5); }
.overview-kpi-slate { background: linear-gradient(135deg, #eef1f5, #c6ccd6); }

.overview-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(36, 27, 16, 0.13);
}

.overview-kpi-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.overview-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
}

.overview-kpi-icon i {
  width: 18px;
  height: 18px;
}

.overview-kpi-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
}

.overview-kpi-value {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.overview-kpi-value-small {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.overview-kpi-subtext {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.muted {
  color: #756858 !important;
}

.cc-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.cc-step-card {
  border: 1px solid rgba(42, 37, 96, 0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #eceffa);
  padding: 14px;
}

.cc-step-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #475569;
}

.cc-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}

.cc-step-title i {
  width: 16px;
  height: 16px;
  color: #00BCD8;
}

.cc-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.cc-status-card {
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 252, 0.94));
  padding: 14px;
}

.cc-status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cc-status-head h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.cc-status-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 4px 0;
}

.cc-status-line .k {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cc-status-line .v {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.cc-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.cc-editor-stack {
  display: grid;
  gap: 18px;
}

.cc-config-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(241,245,249,0.7));
}

.cc-config-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cc-config-group-head h4 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.cc-config-group-head p {
  margin: 0;
  max-width: 720px;
  color: #64748b;
  font-size: 12px;
}

.cc-editor-grid-wide {
  grid-template-columns: minmax(0, 1fr);
}

.cc-editor-grid-paired {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.cc-editor-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.cc-editor-card {
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f0f3fb);
  box-shadow: 0 14px 28px rgba(36, 27, 16, 0.08);
}

.cc-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.cc-editor-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.pill-soft {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 188, 216, 0.08);
  color: #0277a0;
  border: 1px solid rgba(0, 188, 216, 0.22);
}

.cc-editor-card textarea {
  min-height: 170px;
}

.ftth-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  margin-top: 12px;
  padding: 22px;
  border: 2px dashed rgba(0, 188, 216, 0.5);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 188, 216, 0.08), rgba(61, 53, 135, 0.06));
  color: #3D3587;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ftth-upload-dropzone:hover,
.ftth-upload-dropzone.drag-over {
  border-color: #00BCD8;
  box-shadow: 0 16px 34px rgba(0, 188, 216, 0.14);
  transform: translateY(-1px);
}

.ftth-upload-dropzone input[type="file"] {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.ftth-upload-title {
  font-weight: 900;
  font-size: 16px;
}

.guided-table-wrap {
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 14px;
  overflow: auto;
  background: rgba(255, 252, 247, 0.92);
  max-height: 520px;
}

.guided-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.guided-table th {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3D3587;
  background: #ecebf8;
  position: sticky;
  top: 0;
  z-index: 1;
}

.guided-table td {
  padding: 8px;
  vertical-align: middle;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.guided-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.72);
}

.guided-table tbody tr:hover td {
  background: rgba(0, 188, 216, 0.08);
}

.guided-table input[type="text"] {
  width: 100%;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 13px;
}

.guided-table .btn-danger {
  padding: 6px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.guided-advanced {
  margin-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  padding-top: 8px;
}

.guided-advanced summary {
  cursor: pointer;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  user-select: none;
}

.guided-advanced textarea {
  margin-top: 8px;
  min-height: 140px;
}

.cc-save-bar {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 12px;
}

.cc-period-pill {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 188, 216, 0.08);
  border: 1px solid rgba(0, 188, 216, 0.22);
  color: #0277a0;
  font-size: 12px;
  font-weight: 800;
}

.cc-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.cc-candidate-card {
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f0f3fb);
  padding: 10px;
}

.cc-candidate-head {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 900;
  color: #1e293b;
}

.cc-candidate-card .table-wrap {
  max-height: 360px !important;
}

.cc-candidate-card table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4ff;
}

.premiour-split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.premiour-chart-scroll {
  min-height: 260px;
}

.premiour-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

.premiour-input-section {
  padding: 12px;
}

.premiour-input-section h4 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 16px;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.admin-action-card,
.admin-flow-card {
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f0f3fb);
  padding: 14px;
}

.admin-action-card h4,
.admin-flow-card h4 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-action-card h4 i {
  width: 16px;
  height: 16px;
  color: #00BCD8;
}

.admin-action-card p {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 12px;
}

.admin-flow-grid,
.admin-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.admin-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-mini {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(238, 241, 252, 0.9);
  border: 1px solid rgba(42, 37, 96, 0.10);
}

.admin-mini span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.admin-mini b {
  color: #0f172a;
  font-size: 12px;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.approval-form {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.approval-input-wrap {
  min-width: 280px;
}

.login-premium {
  max-width: 560px;
}

.login-head h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.login-head p {
  margin: 0 0 10px;
  color: #64748b;
  font-weight: 600;
}

.login-role-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.login-form-grid {
  display: grid;
  gap: 10px;
}

.login-btn-full {
  width: 100%;
  margin-top: 2px;
  justify-content: center;
}

.notice,
.error {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid;
  font-weight: 600;
}

.notice {
  background: #fff4df;
  border-color: #edc07e;
  color: #8a4f10;
}

.error {
  background: #fff1ec;
  border-color: #f8c7b0;
  color: #b43e16;
}

.chart-scroll {
  position: relative;
  width: 100%;
  min-height: 240px;
  max-height: 690px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 252, 0.96));
}

.chart-scroll canvas {
  width: 100% !important;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(42, 37, 96, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.metrics-table-wrap {
  position: relative;
  box-shadow: inset -28px 0 24px -26px rgba(15, 23, 42, 0.16);
}

.metrics-table-wrap::after {
  content: "Scroll for backlog and total metrics";
  position: sticky;
  right: 10px;
  bottom: 8px;
  float: right;
  margin: 0 8px 8px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.table-wrap table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3D3587;
  border-bottom: 1px solid rgba(42, 37, 96, 0.14);
  padding: 10px 8px;
  background: rgba(236, 233, 248, 0.96);
}

td {
  border-bottom: 1px solid rgba(42, 37, 96, 0.08);
  padding: 8px;
  font-size: 13px;
  color: #1a1940;
}

tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

tbody tr:nth-child(even) {
  background: rgba(238, 241, 250, 0.5);
}

tbody tr:hover {
  background: rgba(0, 188, 216, 0.07);
}

.scoreboard-table-metrics th,
.scoreboard-table-metrics td {
  padding-left: 10px;
  padding-right: 10px;
}

.scoreboard-table-metrics th:nth-child(2),
.scoreboard-table-metrics td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.scoreboard-table-metrics th:nth-child(2) {
  background: rgba(236, 233, 248, 0.98);
}

.scoreboard-table-metrics td:nth-child(2) {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 10px 0 14px -14px rgba(15, 23, 42, 0.18);
}

.scoreboard-table-metrics tbody tr:nth-child(even) td:nth-child(2) {
  background: rgba(238, 241, 250, 0.92);
}

.scoreboard-table-metrics tbody tr:hover td:nth-child(2) {
  background: rgba(220, 242, 250, 0.96);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.region-badge {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-width: 62px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1px solid transparent;
}

.metric-ring {
  --p: 0;
  --ring: #64748b;
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background:
    conic-gradient(var(--ring) calc((min(max(var(--p), 0), 100)) * 1%), rgba(148, 163, 184, 0.2) 0%);
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.metric-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.metric-ring > span {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.metric-chip.mc-good {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.metric-chip.mc-ok {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.metric-chip.mc-warn {
  background: #ffedd5;
  border-color: #fdba74;
  color: #7c2d12;
}

.metric-chip.mc-bad {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #881337;
}

.metric-chip.mc-na {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.metric-ring.mc-good { --ring: #22c55e; }
.metric-ring.mc-ok { --ring: #f59e0b; }
.metric-ring.mc-warn { --ring: #fb923c; }
.metric-ring.mc-bad { --ring: #f43f5e; }
.metric-ring.mc-na { --ring: #64748b; }

.daily-panel {
  display: none;
}

.daily-panel.is-active {
  display: block;
}

.daily-panel-trigger.active {
  background: linear-gradient(120deg, #00BCD8, #3D3587);
  color: #ffffff;
}

.ftth-command-dashboard {
  background:
    radial-gradient(circle at top right, rgba(0, 188, 216, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 249, 253, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  color: #0f172a;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(36, 27, 16, 0.08);
}

.ftth-command-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 188, 216, 0.20);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(207, 239, 251, 0.86));
  padding: 22px;
}

.ftth-command-header h3 {
  margin: 0 0 4px;
  color: #0f1025;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.ftth-command-header p {
  margin: 0;
  color: #586179;
  font-size: 13px;
  font-weight: 700;
}

.ftth-command-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 82px;
  gap: 10px;
  align-items: end;
}

.ftth-command-controls label,
.ftth-command-refresh-time {
  display: grid;
  gap: 5px;
}

.ftth-command-controls span,
.ftth-command-refresh-time span {
  color: #5e513f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ftth-command-controls input,
.ftth-command-controls select {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(111, 94, 69, 0.18);
  border-radius: 14px;
  background: rgba(255, 251, 244, 0.96);
  color: #221d17;
  padding: 8px 9px;
  font: inherit;
  font-size: 13px;
}

.ftth-command-refresh {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(225, 225, 232, 0.88);
  color: #0f1025;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.ftth-command-refresh-time strong {
  color: #28c76f;
  font-size: 13px;
  line-height: 38px;
}

.ftth-command-kpis {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 14px;
}

.ftth-command-kpi {
  min-height: 118px;
}

.ftth-command-table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
  width: 100%;
  max-width: none;
}

.ftth-command-table-title {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #1e293b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ftth-command-table {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
  margin-top: 0;
  background: #ffffff !important;
  color: #16213a !important;
}

.ftth-command-table-wrap > .ftth-command-table,
.ftth-command-table-wrap > table.ftth-command-table.scoreboard-table-metrics {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
}

.ftth-command-col-region { width: 15%; }
.ftth-command-col-total,
.ftth-command-col-closed,
.ftth-command-col-difference,
.ftth-command-col-recurred { width: 6%; }
.ftth-command-col-age { width: calc(34% / var(--age-column-count, 1)); }
.ftth-command-col-last24 { width: 7%; }
.ftth-command-col-resolved { width: 7%; }
.ftth-command-col-net { width: 6%; }
.ftth-command-col-status { width: 7%; }

.ftth-command-table th,
.ftth-command-table td {
  border-color: #d9e2ee !important;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ftth-command-table.scoreboard-table-metrics th:nth-child(2),
.ftth-command-table.scoreboard-table-metrics td:nth-child(2) {
  position: static;
  background: inherit;
  box-shadow: none;
}

.ftth-command-table th {
  background: #eef4fb !important;
  color: #24324a !important;
  font-size: 11px;
}

.ftth-command-table tbody tr,
.ftth-command-table tbody tr:nth-child(even),
.ftth-command-table tbody tr:hover {
  background: #f8fafc !important;
}

.ftth-command-table tbody tr:nth-child(even) {
  background: #eef4fb !important;
}

.ftth-command-table tbody tr:hover {
  background: #e8f7fb !important;
}

.ftth-command-table tbody td {
  background: #f8fafc !important;
  color: #16213a !important;
}

.ftth-command-table tbody tr:nth-child(even) td {
  background: #eef4fb !important;
}

.ftth-command-table tbody tr:hover td {
  background: #e8f7fb !important;
}

.ftth-command-table .region-group-row td {
  background: #d7f3fb !important;
  color: #04738a !important;
  font-weight: 900;
  text-transform: uppercase;
}

.ftth-command-table td.num {
  color: #1e293b !important;
  font-weight: 800;
}

.ftth-command-table td.num:not(:empty) {
  background: #e1e7f0 !important;
}

.ftth-command-table .region-group-row td.num {
  background: #c2edf8 !important;
  color: #0097b2 !important;
}

.ftth-command-table .ftth-command-cluster-row td:first-child {
  color: #24324a !important;
  font-weight: 700;
}

.ftth-command-cluster-row td:first-child {
  padding-left: 30px;
}


@media (max-width: 1280px) {
  .ftth-command-dashboard {
    padding: 14px;
  }

  .ftth-command-header {
    grid-template-columns: 1fr;
  }

  .ftth-command-controls {
    grid-template-columns: minmax(130px, 170px) minmax(180px, 1fr) 82px;
  }

  .ftth-command-table th,
  .ftth-command-table td {
    padding: 5px 7px;
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .ftth-command-table {
    min-width: 900px;
  }
}

.ftth-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.ftth-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.ftth-status-on_track {
  color: #16803a;
}

.ftth-status-watch {
  color: #a16207;
}

.ftth-status-at_risk {
  color: #dc2626;
}

.ftth-command-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #343a40;
  border-radius: 5px;
  padding: 10px 12px;
  color: #aeb8c4;
  font-size: 12px;
}

.ftth-command-legend > span:first-child {
  color: #f8fafc;
  font-weight: 900;
  text-transform: uppercase;
}

.b-excellent {
  background: #ddf7ec;
  border-color: #8ad2b8;
  color: #0f5138;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2), 0 0 12px rgba(34, 197, 94, 0.16);
}

.b-good {
  background: #dff3f0;
  border-color: #9fd1ca;
  color: #115e59;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.16), 0 0 12px rgba(15, 118, 110, 0.12);
}

.b-average {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2), 0 0 12px rgba(245, 158, 11, 0.15);
}

.b-needs {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #881337;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.2), 0 0 12px rgba(244, 63, 94, 0.16);
}

.b-unrated {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.b-type-inhouse {
  background: #f3ead9;
  border-color: #e3c89f;
  color: #9a3412;
}

.b-type-subcon {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.b-type-reliever {
  background: linear-gradient(135deg, #ddf7ec, #dff3f0);
  border-color: #7dd3c7;
  color: #0f766e;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.2), 0 0 14px rgba(45, 212, 191, 0.18);
}

.b-unrated {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.text-muted {
  color: #6b7280;
}

.b-nairobi {
  background: #dbeafe;
  border-color: #0284c7;
  color: #001f3f;
}

.b-coast {
  background: #fed7aa;
  border-color: #f97316;
  color: #001f3f;
}

.b-western {
  background: #e9d5ff;
  border-color: #c084fc;
  color: #001f3f;
}

.b-region-default {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #001f3f;
}

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

label {
  display: block;
  margin: 0 0 6px;
  color: #5e513f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

textarea,
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(111, 94, 69, 0.18);
  background: rgba(255, 251, 244, 0.96);
  color: #221d17;
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
  font-family: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
select {
  font-family: "Manrope", "Inter", sans-serif;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.44);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button,
.btn-primary,
.btn-warning,
.btn-success,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
.btn-primary:hover,
.btn-warning:hover,
.btn-success:hover,
.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-primary {
  background: linear-gradient(120deg, #00BCD8, #3D3587);
  border-color: rgba(0, 188, 216, 0.30);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 188, 216, 0.22);
}

.btn-warning {
  background: linear-gradient(120deg, #f59e0b, #c2410c);
  border-color: rgba(251, 191, 36, 0.34);
  color: #fff7ed;
}

.btn-success {
  background: linear-gradient(120deg, #2f855a, #0f766e);
  border-color: rgba(74, 222, 128, 0.28);
  color: #ecfdf5;
}

.btn-danger {
  background: linear-gradient(120deg, #dc2626, #9a3412);
  border-color: rgba(251, 113, 133, 0.28);
  color: #fff7f3;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

pre {
  color: #1e293b;
  max-width: 760px;
  overflow: auto;
}

.login-wrap {
  position: relative;
  overflow: hidden;
  max-width: 470px;
  margin: 7vh auto;
  border: 1px solid rgba(42, 37, 96, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(0, 188, 216, 0.10), transparent 30%),
    radial-gradient(circle at bottom left, rgba(61, 53, 135, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(238, 242, 252, 0.98));
  backdrop-filter: blur(18px);
  padding: 28px;
  box-shadow: 0 24px 54px rgba(10, 8, 40, 0.16);
  animation: rise-in 0.55s ease both;
}

.login-wrap h2 {
  margin: 0 0 6px;
  color: #0d0c1e;
  font-size: 34px;
  letter-spacing: -0.02em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.44), transparent 40%);
}

@media (max-width: 1080px) {
  .topbar h2 {
    font-size: 32px;
  }

  .ftth-command-header {
    grid-template-columns: 1fr;
  }

  .ftth-command-controls {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .ftth-command-notes {
    grid-column: 1 / -1;
  }
}

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

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 244px;
    z-index: 30;
    transform: translateX(-100%);
    opacity: 1;
    overflow-y: auto;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.6);
  }

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

  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: none;
    background: rgba(2, 6, 23, 0.58);
    display: none;
  }

  .layout.sidebar-open + .sidebar-backdrop {
    display: block;
  }

  .content {
    padding: 12px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar h2 {
    font-size: 30px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .guided-table input[type="text"] {
    min-width: 120px;
  }

  .cc-config-group {
    padding: 12px;
  }

  .cc-editor-grid-paired,
  .cc-editor-grid-compact {
    grid-template-columns: 1fr;
  }

  .premiour-split-grid {
    grid-template-columns: 1fr;
  }

  .premiour-input-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .approval-input-wrap {
    min-width: 100%;
  }

  td,
  th {
    font-size: 11px;
  }

  .metrics-table-wrap::after {
    content: "Swipe table";
    font-size: 9px;
    right: 6px;
    bottom: 6px;
  }

  .scoreboard-table-metrics th,
  .scoreboard-table-metrics td {
    padding-left: 8px;
    padding-right: 8px;
  }

  .metric-ring {
    width: 42px;
    height: 42px;
  }

  .metric-ring::after {
    inset: 5px;
  }

  .metric-ring > span {
    font-size: 8px;
  }

  .ftth-command-dashboard {
    padding: 10px;
  }

  .ftth-command-controls {
    grid-template-columns: 1fr;
  }

  .ftth-command-kpis {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .ftth-command-table {
    min-width: 980px;
  }
}

/* ---- Upload progress popup (command-center manual uploads) ---- */
.upload-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(13, 12, 30, 0.45);
  backdrop-filter: blur(3px);
}
.upload-modal-backdrop.open { display: flex; }
.upload-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(42, 37, 96, 0.28);
  overflow: hidden;
  animation: upload-modal-in 180ms ease-out;
}
@keyframes upload-modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .upload-modal { animation: none; } .upload-bar span { transition: none; } }
.upload-modal-head {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, var(--fireside-navy), var(--fireside-purple));
  color: #fff;
}
.upload-modal-head h4 { margin: 0; font-size: 18px; letter-spacing: 0.01em; }
.upload-modal-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; opacity: 0.92; }
.upload-modal-summary strong { font-variant-numeric: tabular-nums; }
.upload-modal-eta { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 6px; }
.upload-overall { margin-top: 12px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.upload-overall span { display: block; height: 100%; width: 0; background: var(--fireside-light-cyan); transition: width 200ms linear; }
.upload-modal-list { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; }
.upload-file { padding: 14px 0; border-bottom: 1px solid var(--line-0); }
.upload-file:last-child { border-bottom: 0; }
.upload-file-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.upload-file-name { font-weight: 600; color: var(--text-1); word-break: break-all; }
.upload-file-size { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.upload-file-detail { margin-top: 6px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.upload-bar { margin-top: 8px; height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--brand-0); transition: width 200ms linear; }
.upload-file[data-phase="processing"] .upload-bar span { background: var(--brand-1); }
.upload-file[data-phase="done"] .upload-bar span { background: var(--ok); width: 100% !important; }
.upload-file[data-phase="failed"] .upload-bar span { background: var(--bad); width: 100% !important; }
.upload-state {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--bg-2); color: var(--text-2);
}
.upload-file[data-phase="uploading"] .upload-state { background: rgba(0, 188, 216, 0.14); color: #007a8c; }
.upload-file[data-phase="processing"] .upload-state { background: rgba(61, 53, 135, 0.12); color: var(--fireside-purple); }
.upload-file[data-phase="done"] .upload-state { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.upload-file[data-phase="failed"] .upload-state { background: rgba(244, 63, 94, 0.14); color: #be123c; }
.upload-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; border-top: 1px solid var(--line-0); background: var(--surface-0);
}
.upload-modal-foot .muted { font-size: 12.5px; }
.upload-modal-foot button { min-width: 150px; white-space: nowrap; flex-shrink: 0; }
.upload-modal-foot button:focus-visible { outline: 3px solid var(--brand-0); outline-offset: 2px; }
