@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #030712;
  --ink: #f3f4f6;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.06);
  --panel: rgba(17, 24, 39, 0.65);
  --panel-soft: rgba(255, 255, 255, 0.02);
  --charcoal: #030712;
  --charcoal-2: #0b0f19;
  --green: #00f2fe;
  --green-2: #4facfe;
  --blue: #1e293b;
  --mint: rgba(0, 242, 254, 0.08);
  --gold: #02c39a;
  --gold-soft: rgba(2, 195, 154, 0.12);
  --red: #ef4444;
  --platinum: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 242, 254, 0.04);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 242, 254, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(79, 172, 254, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(2, 195, 154, 0.03) 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: 'Inter', Aptos, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #030712;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(201, 164, 77, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8f8cc;
  box-shadow: 0 0 0 4px rgba(216, 248, 204, 0.14);
  animation: statusPulse 2.4s ease-in-out infinite;
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 38px);
}

.page-head,
.executive-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.executive-hero {
  position: relative;
  align-items: center;
  min-height: 220px;
  padding: 34px;
  border: 1px solid rgba(201, 164, 77, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(16, 18, 15, 0.99) 0%, rgba(34, 38, 31, 0.99) 55%, rgba(0, 108, 93, 0.68) 140%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px),
    var(--charcoal);
  color: #fff;
  box-shadow: 0 36px 90px rgba(17, 19, 15, 0.28);
  overflow: hidden;
  isolation: isolate;
  animation: premiumReveal 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.executive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.12) 42%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.7;
  transform: translateX(-38%);
  animation: heroSweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.executive-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, #0b4c43, #c9a44d, #fff3c6, #0b4c43);
  background-size: 220% 100%;
  animation: accentFlow 7s ease-in-out infinite;
}

.page-head h1,
.executive-hero h1 {
  margin: 0;
  font-family: "Aptos Display", Aptos, "Segoe UI Variable", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.98;
  font-weight: 850;
}

.executive-hero p {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.45;
}

.executive-hero .eyebrow {
  color: var(--gold);
}

.hero-ledger {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-ledger span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(201, 164, 77, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 22px;
}

.sidebar-stack {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 14px;
  min-width: 0;
  z-index: 1;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}


.upload-panel {
  padding: 24px;
  overflow: hidden;
}

.upload-panel::before {
  content: "";
  display: block;
  height: 4px;
  margin: -24px -24px 22px;
  background: linear-gradient(90deg, var(--green), var(--green-2), var(--gold));
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-actions form {
  margin: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--green-2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 1.18rem;
  line-height: 1.15;
}

.upload-form,
.quote-form,
.login-card {
  display: grid;
  gap: 16px;
}

.quote-panel {
  margin-bottom: 20px;
  padding: 20px;
  overflow: hidden;
}

.quote-panel::before {
  content: "";
  display: block;
  height: 4px;
  margin: -20px -20px 18px;
  background: linear-gradient(90deg, var(--charcoal), var(--gold), var(--green));
}

.quote-panel.wide {
  background: var(--panel);
}

.quote-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-form.wide {
  grid-template-columns: minmax(170px, 0.8fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(145px, 0.9fr) minmax(110px, 0.6fr) auto;
  align-items: end;
}

.exchange-form.wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exchange-button {
  min-height: 48px;
  min-width: 140px;
}

.quote-button {
  width: 100%;
  min-width: 140px;
}

.quote-sync-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.quote-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.quote-list.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quote-row:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.quote-row strong,
.quote-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dropzone {
  display: grid;
  min-height: 220px;
  place-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--green);
  background-color: var(--mint);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.15);
  transform: translateY(-2px);
}


.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.dropzone svg {
  width: 46px;
  height: 46px;
  color: var(--green);
}

.dropzone strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.dropzone span {
  max-width: 280px;
  line-height: 1.45;
}

.dropzone .file-selected {
  min-height: 20px;
  max-width: 280px;
  color: var(--green-2);
  font-size: 0.84rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(0, 242, 254, 0.15);
  border-radius: var(--radius);
  background: rgba(0, 242, 254, 0.03);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--green-2);
  font-size: 0.84rem;
  font-weight: 900;
}

.upload-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 108, 93, 0.13);
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 160ms ease;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: #4f5d56;
  font-size: 0.84rem;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.field textarea,
.field input,
.field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  padding: 13px;
}

.field input,
.field select {
  height: 48px;
  padding: 0 13px;
}

.field textarea:focus,
.field input:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.15);
}

.field.is-disabled {
  opacity: 0.55;
}

.field.is-disabled input {
  cursor: not-allowed;
}

.check-field {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.check-field span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-check {
  align-self: end;
}

.primary-button,
.secondary-button,
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-position 280ms ease,
    filter 180ms ease,
    color 180ms ease;
  will-change: transform;
}

.primary-button,
.secondary-button,
.kpi-action a {
  overflow: hidden;
}

.primary-button::after,
.secondary-button::after,
.kpi-action a::after {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -70%;
  width: 42%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.44), transparent);
  transform: skewX(-18deg);
  transition: left 520ms ease;
  pointer-events: none;
}

.primary-button:hover::after,
.secondary-button:hover::after,
.kpi-action a:hover::after {
  left: 125%;
}

.primary-button {
  gap: 9px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #030712;
  font-weight: 800;
  letter-spacing: -0.015em;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.primary-button:hover {
  box-shadow: 0 6px 24px rgba(0, 242, 254, 0.4);
  filter: brightness(1.15);
  transform: translateY(-2px);
}


.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: translateY(0) scale(0.985);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.command-button {
  min-width: 184px;
}

.secondary-button {
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.secondary-button:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.danger-button {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.05);
  color: var(--red);
}

.danger-button:hover {
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(239, 68, 68, 0.1);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.icon-button.danger {
  color: var(--red);
}

.topbar-action {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.content-area {
  min-width: 0;
  isolation: isolate;
  overflow: hidden;
}

.processing-alert {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  background: rgba(239, 68, 68, 0.05);
  box-shadow: var(--shadow-sm);
}

.processing-alert strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.processing-alert span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.stats-grid,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  display: grid;
  gap: 8px;
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.stat span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.stat strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.05;
}

.stat-action {
  padding: 0;
  overflow: hidden;
}

.stat-action a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 100%;
  min-height: 98px;
  background: linear-gradient(135deg, var(--charcoal-2), rgba(0, 242, 254, 0.08));
  color: #fff;
  font-weight: 900;
}

.kpi-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--green), var(--green-2));
}

.kpi-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kpi-card strong {
  overflow-wrap: normal;
  white-space: nowrap;
  font-size: clamp(1.15rem, 1.25vw, 1.45rem);
  line-height: 1;
  font-weight: 800;
}

.kpi-card small {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.kpi-profit {
  background: rgba(2, 195, 154, 0.08);
}

.kpi-profit.negative {
  background: rgba(239, 68, 68, 0.08);
}


.kpi-action {
  padding: 0;
}

.kpi-action:not(:has(a)) {
  padding: 18px;
}

.kpi-action a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 118px;
  padding: 18px;
  background:
    linear-gradient(135deg, var(--charcoal-2), rgba(0, 242, 254, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 22px);
  color: #fff;
  font-weight: 950;
  transition: transform 180ms ease, filter 180ms ease, background-position 280ms ease;
}

.kpi-action a:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.kpi-action a svg {
  color: var(--gold);
}

.capability-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px;
  border-color: var(--line);
  background:
    linear-gradient(135deg, var(--charcoal-2) 0%, #030712 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 28px);
  color: #fff;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.capability-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.capability-copy h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.capability-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.45;
}

.eyebrow.inverted {
  color: var(--gold);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capability-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.capability-item:hover {
  border-color: rgba(201, 164, 77, 0.34);
  background: rgba(255, 255, 255, 0.086);
  transform: translateY(-1px);
}

.check-badge {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #030712;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.check-badge svg {
  width: 19px;
  height: 19px;
  stroke-width: 3;
}

.capability-item strong,
.capability-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-item strong {
  font-size: 0.93rem;
  line-height: 1.15;
}

.capability-item small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 760;
}

.intelligence-panel {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.mini-metrics {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.reconciliation-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.reconciliation-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(190px, 0.7fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.reconciliation-row:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.reconciliation-row > * {
  min-width: 0;
}

.reconciliation-row strong,
.reconciliation-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reconciliation-row small {
  margin-top: 4px;
  color: var(--muted);
}

.money-stack {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.money-stack span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 126px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(2, 195, 154, 0.08);
  color: var(--gold);
  font-weight: 950;
}

.result-pill strong,
.result-pill small {
  display: block;
  line-height: 1.05;
}

.result-pill small {
  margin-top: 3px;
  font-size: 0.72rem;
  color: currentColor;
  opacity: 0.7;
}

.result-pill.negative {
  background: rgba(239, 68, 68, 0.08);
  color: var(--red);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 1.1fr);
  gap: 22px;
}

.list-panel,
.preview-panel {
  min-width: 0;
  padding: 20px;
}

.file-list {
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.file-row:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.file-row.active {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green), 0 10px 22px rgba(0, 242, 254, 0.08);
}

.file-row > a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-type {
  display: grid;
  width: 48px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--mint);
  color: var(--green-2);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.file-info {
  min-width: 0;
}

.file-info strong,
.file-info small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info strong {
  font-size: 0.96rem;
}

.file-info small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.bank-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #735915;
  font-size: 0.74rem;
  font-weight: 900;
}

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

.file-row p {
  grid-column: 1 / -1;
  margin: -2px 0 0 60px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.selected-file {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(17, 23, 20, 0.06);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.selected-file strong {
  overflow-wrap: anywhere;
}

.selected-file span {
  color: var(--muted);
}

.preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(17, 24, 39, 0.4);
  font-size: 0.9rem;
}

td {
  max-width: 260px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td:last-child {
  border-right: 0;
}

.text-preview,
.message-preview {
  min-height: 220px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(17, 23, 20, 0.12);
  border-radius: var(--radius);
  background: #101714;
  color: #edf6f1;
  overflow: auto;
}

.message-preview {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.5;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  border: 1px dashed #b9c3bc;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 260px;
}

.empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--green);
}

.empty-state strong {
  color: var(--ink);
}

.toast-stack {
  position: fixed;
  top: 92px;
  right: 20px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.95);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.toast.error {
  border-left-color: var(--red);
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 76px);
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px);
}

.register-card {
  width: min(640px, 100%);
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-card h1 {
  margin-bottom: 4px;
  font-size: 2rem;
}

.login-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.owner-panel {
  margin-bottom: 20px;
  padding: 22px;
}

.owner-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.7fr) minmax(150px, 0.75fr) auto;
  gap: 12px;
  align-items: end;
}

.subscriber-list {
  display: grid;
  gap: 12px;
}

.subscriber-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(230px, 0.8fr) auto minmax(220px, 0.75fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow-sm);
}

.subscriber-row.inactive {
  opacity: 0.72;
}

.subscriber-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.subscriber-main strong,
.subscriber-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriber-main small {
  color: var(--muted);
  font-weight: 800;
}

.status-pill {
  width: max-content;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
}

.status-pill.active {
  background: var(--mint);
  color: var(--green-2);
}

.status-pill.inactive {
  background: #fff2e0;
  color: #735915;
}

.status-pill.pending {
  background: #eaf1ff;
  color: #234b88;
}

.subscriber-controls,
.subscriber-toggle,
.subscriber-password {
  display: grid;
  gap: 8px;
  align-items: end;
}

.subscriber-controls,
.subscriber-password {
  grid-template-columns: minmax(130px, 1fr) auto;
}

.subscriber-controls {
  grid-template-columns: minmax(130px, 1fr) minmax(92px, auto) auto;
}

.compact-field {
  gap: 5px;
}

.compact-field input {
  height: 42px;
}

.compact-check {
  min-height: 42px;
  padding: 0 10px;
}

@keyframes premiumReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes heroSweep {
  0%,
  42%,
  100% {
    transform: translateX(-42%);
  }

  70% {
    transform: translateX(42%);
  }
}

@keyframes accentFlow {
  0%,
  100% {
    background-position: 0 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(216, 248, 204, 0.14);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(216, 248, 204, 0.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1380px) {
  .workspace,
  .main-grid,
  .capability-panel,
  .quote-form.wide,
  .exchange-form.wide,
  .owner-create-form,
  .subscriber-row {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    position: static;
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar-status {
    display: none;
  }

  .page-head,
  .executive-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .command-button {
    width: 100%;
  }

  .hero-actions,
  .hero-actions .secondary-button {
    width: 100%;
  }

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

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

  .quote-list.wide {
    grid-template-columns: 1fr;
  }

  .reconciliation-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 12px 14px;
  }

  .shell {
    padding: 14px;
  }

  .page-head h1,
  .executive-hero h1 {
    font-size: 2rem;
  }

  .executive-hero {
    padding: 20px;
  }

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

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

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

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

  .panel-actions,
  .panel-actions form {
    width: 100%;
  }

  .secondary-button,
  .primary-button {
    width: 100%;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-end;
  }

  .file-row p {
    margin-left: 0;
  }
}

/* --- TAB SYSTEM STYLES --- */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  overflow-x: auto;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
}

.tab-button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.22s ease;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
}

.tab-button.active {
  background: var(--panel);
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--green);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.tab-button.active svg {
  transform: scale(1.08);
  color: var(--green);
}


.tab-panel.tab-hidden {
  display: none !important;
}

/* --- CHARTS STYLES --- */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.chart-panel {
  padding: 24px;
}

.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}

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

/* --- PROGRESS BARS AND BADGES --- */
.progress-fill {
  background: var(--green);
  border-radius: var(--radius);
}

.progress-fill.warning {
  background: var(--gold);
}

.progress-fill.critical {
  background: var(--red);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.risk-low {
  background: #e4f3ed;
  color: #034b43;
  border-color: rgba(3, 75, 67, 0.22);
}

.risk-medium {
  background: #fff4cf;
  color: #7a5c1d;
  border-color: rgba(201, 164, 77, 0.32);
}

.risk-high {
  background: #fff5f5;
  color: var(--red);
  border-color: rgba(189, 43, 34, 0.22);
}

.contra-warnings-list {
  margin: 0;
  padding-left: 14px;
}

.contra-warnings-list li {
  margin-bottom: 2px;
}

/* --- CONFIGURATION STYLES --- */
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

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

.config-card {
  padding: 24px;
}

.subscription-details .details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.config-form {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

/* --- HELP TEXT FOR LOGIN --- */
.login-help {
  display: grid;
  gap: 6px;
  text-align: center;
  margin-top: 12px;
  color: var(--muted);
}
.login-help a {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}
.login-help small {
  font-size: 0.8rem;
  font-weight: 700;
}

/* --- COMPACT TABLE STYLE FOR P2P --- */
.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem !important;
}
.compact-table th {
  padding: 6px 8px !important;
  font-size: 0.78rem !important;
  background: var(--panel-soft) !important;
  font-weight: 800 !important;
  border-bottom: 2px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
  text-align: left;
}
.compact-table td {
  padding: 4px 8px !important;
  font-size: 0.78rem !important;
  height: 28px !important;
  border-bottom: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
}
.compact-table tr:hover {
  background: var(--panel-soft) !important;
}

/* --- PREMIUM EXPORT OPTIONS MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 15, 0.65);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 220ms ease-out;
}

.modal-card {
  width: min(640px, 100%);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(9, 13, 22, 0.98));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(24px);
  animation: modalScaleUp 280ms cubic-bezier(0.18, 0.89, 0.32, 1.15) both;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-close-button {
  background: transparent;
  border: 0;
  padding: 6px;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 180ms ease, color 180ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-button:hover {
  background: rgba(17, 19, 15, 0.05);
  color: var(--ink);
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  gap: 20px;
}

.options-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.options-group legend {
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--green-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.custom-option-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  align-items: flex-start;
}

.custom-option-card:hover {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.custom-option-card input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  margin: 2px 0 0 0;
  flex: 0 0 auto;
  cursor: pointer;
}

.custom-option-card.selected {
  border-color: var(--green);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.1), inset 0 0 0 1px rgba(0, 242, 254, 0.2);
}

.option-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-card-content strong {
  font-size: 0.98rem;
  font-weight: 850;
  color: var(--ink);
}

.option-card-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.option-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.badge-green {
  background: var(--mint);
  color: var(--green-2);
  border: 1px solid rgba(0, 108, 93, 0.15);
}

.badge-blue {
  background: #eef4fc;
  color: #1a56db;
  border: 1px solid rgba(26, 86, 219, 0.15);
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================================
   PROFILES
   ============================================================ */

/* Tab badge (small count pill in nav) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  margin-left: 5px;
  vertical-align: middle;
}

/* Profile select in sidebar */
.profile-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b64' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.profile-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,125,108,0.12);
}

/* Create-profile form row */
.profile-create-form {
  margin-top: 16px;
}
.profile-create-fields {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-create-btn {
  white-space: nowrap;
  min-height: 44px;
  font-size: 0.875rem;
}

/* Profile card */
.profile-card {
  padding: 22px 24px;
}
.profile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.profile-card-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,125,108,0.25);
}
.profile-name {
  display: block;
  font-size: 1rem;
  font-weight: 750;
  color: var(--ink);
}
.profile-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.profile-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-save-btn {
  font-size: 0.8rem;
  padding: 8px 14px;
  min-height: 36px;
  gap: 6px;
}
.profile-save-btn svg {
  width: 14px;
  height: 14px;
}
.profile-del-hist-btn,
.profile-del-btn {
  font-size: 0.8rem;
  padding: 8px 14px;
  min-height: 36px;
  gap: 6px;
}
.profile-del-hist-btn svg,
.profile-del-btn svg {
  width: 14px;
  height: 14px;
}

/* Danger button */
.danger-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1.5px solid rgba(201,62,50,0.28);
  background: rgba(201,62,50,0.07);
  color: var(--red);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.danger-button:hover {
  background: rgba(201,62,50,0.14);
  border-color: rgba(201,62,50,0.45);
  box-shadow: 0 4px 14px rgba(201,62,50,0.14);
}
.danger-button svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  width: 14px;
  height: 14px;
}

/* Live stats chips row */
.profile-live-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.profile-stat-chip {
  background: var(--panel-soft);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-stat-chip span {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-stat-chip strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.profile-stat-chip .stat-in { color: var(--green); }
.profile-stat-chip .stat-out { color: var(--red); }
.profile-stat-chip.stat-profit-pos strong { color: var(--green); }
.profile-stat-chip.stat-profit-neg strong { color: var(--red); }

/* History section */
.profile-history {
  margin-top: 4px;
}
.profile-history-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px 0;
}
.profile-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.profile-stats-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.profile-stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.profile-stats-table .totals-row td {
  background: var(--panel-soft);
  border-top: 2px solid var(--line);
  border-bottom: none;
}
.period-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-2);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(0,125,108,0.18);
}
.amount-in  { color: var(--green); font-weight: 700; }
.amount-out { color: var(--red);   font-weight: 700; }
.amount-profit { color: var(--green); font-weight: 700; }
.amount-loss   { color: var(--red);   font-weight: 700; }

/* Empty history message */
.profile-no-history {
  margin: 0;
  padding: 16px 0 4px;
  color: var(--muted);
  font-size: 0.87rem;
  font-style: italic;
}


@media (max-width: 700px) {
  .profile-live-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-card-header { flex-direction: column; }
  .profile-create-fields { flex-direction: column; }
}

/* ============================================================
   ACTIVE PROFILE BANNER (sidebar indicator)
   ============================================================ */
.active-profile-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 242, 254, 0.35);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.09) 0%, rgba(0, 242, 254, 0.04) 100%);
  margin-top: 6px;
  animation: bannerSlideIn 0.28s cubic-bezier(.22,.68,0,1.2);
}
.active-profile-banner.visible {
  display: flex;
}
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.active-profile-banner .apb-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #030712;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 242, 254, 0.28);
}
.active-profile-banner .apb-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.active-profile-banner .apb-caption {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-2);
  white-space: nowrap;
}
.active-profile-banner .apb-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Pulsing green dot on the sidebar upload button when profile is active */
.profile-active-dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.25);
  animation: dotPulse 1.8s ease-in-out infinite;
}
.profile-active-dot.visible { display: inline-block; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.25); }
  50%       { box-shadow: 0 0 0 5px rgba(0, 242, 254, 0.08); }
}

/* ============================================================
   PROFILES TAB HERO
   ============================================================ */
.profiles-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--charcoal-2) 0%, rgba(3, 7, 18, 0.95) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}
.profiles-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0, 242, 254, 0.15) 0%, transparent 65%);
  pointer-events: none;
}
.profiles-hero-text .eyebrow {
  color: rgba(212,171,67,0.85);
}
.profiles-hero-text h2 {
  color: #fff;
  margin: 4px 0 6px;
  font-size: 1.35rem;
}
.profiles-hero-text p {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
}
.profiles-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 22px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.profiles-hero-stat strong {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.profiles-hero-stat span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

/* Auto-computed note chip */
.auto-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  border: 1px solid rgba(0,125,108,0.2);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-2);
  margin-top: 12px;
}
.auto-note svg {
  width: 13px;
  height: 13px;
  stroke: var(--green-2);
  fill: none;
  stroke-width: 2.5;
}
