:root {
  --fd-bg-dark: #060b10;
  --fd-bg-light: #f5f6fa;
  --fd-primary: #ff7a00;
  --fd-primary-soft: rgba(255, 122, 0, 0.1);
  --fd-card-dark: #111827;
  --fd-card-light: #ffffff;
  --fd-text-dark: #e5e7eb;
  --fd-text-light: #111827;
  --fd-radius-lg: 14px;
  --fd-radius-md: 10px;
  --fd-radius-pill: 999px;
  --fd-shadow-soft: 0 22px 45px rgba(0,0,0,0.35);
  --fd-border-subtle: rgba(148, 163, 184, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
}

body.fd-dark {
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000000 100%);
  color: var(--fd-text-dark);
}

body.fd-light {
  background: radial-gradient(circle at top, #ffffff 0, #f3f4f6 45%, #e5e7eb 100%);
  color: var(--fd-text-light);
}

.fd-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 24px;
}

.fd-card {
  width: 100%;
  max-width: 980px;
  border-radius: 24px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr);
  gap: 32px;
  box-shadow: var(--fd-shadow-soft);
}

body.fd-dark .fd-card {
  background: radial-gradient(circle at top left, #1f2937 0, #020617 42%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.55);
}

body.fd-light .fd-card {
  background: linear-gradient(135deg, #ffffff 0, #f9fafb 45%, #e5e7eb 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.fd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.fd-logo-badge {
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 14px;
  background: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 17px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}

.fd-logo-flex {
  color: #ffffff;
}

.fd-logo-id {
  color: #ff7a00;
}

.fd-brand-text-title {
  font-size: 20px;
  font-weight: 700;
}

.fd-brand-text-sub {
  font-size: 13px;
  opacity: .65;
}

.fd-heading {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.fd-highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

body.fd-dark .fd-highlight-chip {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(248, 250, 252, 0.08);
  color: #e5e7eb;
}

body.fd-light .fd-highlight-chip {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #0f172a;
}

.fd-highlight-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.fd-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0 8px;
}

.fd-metric {
  min-width: 120px;
}

.fd-metric-label {
  font-size: 11px;
  opacity: .65;
  margin-bottom: 6px;
}

.fd-metric-value {
  font-size: 20px;
  font-weight: 700;
}

.fd-metric-sub {
  font-size: 11px;
  opacity: .6;
}

.fd-toggle-theme {
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.fd-toggle-theme button {
  background: transparent;
  border: none;
  color: inherit;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.fd-toggle-theme button.fd-active {
  background: var(--fd-primary-soft);
  color: #f97316;
}

.fd-form-card {
  border-radius: var(--fd-radius-lg);
  padding: 22px 22px 20px;
}

body.fd-dark .fd-form-card {
  background: radial-gradient(circle at top left, #020617 0, #020617 35%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

body.fd-light .fd-form-card {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.fd-tabs {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

body.fd-light .fd-tabs {
  background: rgba(241, 245, 249, 0.95);
}

.fd-tab {
  border: none;
  background: transparent;
  color: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fd-tab.fd-active {
  background: var(--fd-primary);
  color: white;
}

.fd-input-group {
  margin-bottom: 12px;
}

.fd-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.fd-label span:last-child {
  opacity: .6;
}

.fd-input, .fd-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: inherit;
  font-size: 13px;
}

body.fd-dark .fd-input, body.fd-dark .fd-select {
  background: rgba(15, 23, 42, 0.85);
}

.fd-input:focus, .fd-select:focus {
  outline: none;
  border-color: var(--fd-primary);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3);
}

.fd-btn-primary {
  width: 100%;
  border-radius: var(--fd-radius-pill);
  border: none;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f97316 0, #ea580c 50%, #c2410c 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(248, 113, 22, 0.45);
}

.fd-btn-primary:disabled {
  opacity: .6;
  cursor: default;
  box-shadow: none;
}

.fd-btn-secondary-link {
  border: none;
  background: none;
  padding: 0;
  color: #fb923c;
  font-size: 12px;
  cursor: pointer;
}

.fd-flash {
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

.fd-flash-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.fd-flash-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.55);
}

.fd-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}

body.fd-dark .fd-topbar {
  background: radial-gradient(circle at top, #020617 0, rgba(15,23,42,0.98) 60%, rgba(15,23,42,0.98) 100%);
  border-bottom: 1px solid rgba(148,163,184,0.5);
}

body.fd-light .fd-topbar {
  background: linear-gradient(135deg, #ffffff 0, #f3f4f6 50%, #e5e7eb 100%);
  border-bottom: 1px solid rgba(148,163,184,0.3);
}

.fd-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fd-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.fd-topbar-title {
  font-size: 16px;
  font-weight: 600;
}

.fd-topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fd-topbar-menu-toggle {
  display: none;
}

.fd-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(148,163,184,0.45);
  background: rgba(15,23,42,0.4);
}

body.fd-light .fd-topbar-link {
  background: rgba(248,250,252,0.9);
}

.fd-topbar-link:hover {
  border-color: var(--fd-primary);
}

.fd-topbar-link-danger {
  border-color: rgba(239,68,68,0.7);
}

@media (max-width: 860px) {
  .fd-topbar-inner {
    padding: 8px 12px;
    gap: 10px;
  }

  .fd-topbar-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    background: transparent;
    color: inherit;
    cursor: pointer;
    margin-left: auto;
  }

  .fd-topbar-nav {
    position: absolute;
    top: 52px;
    right: 12px;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
    border-radius: 16px;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(148,163,184,0.6);
    gap: 6px;
    display: none;
  }

  body.fd-light .fd-topbar-nav {
    background: rgba(248,250,252,0.98);
  }

  .fd-topbar-nav.fd-open {
    display: flex;
  }

  .fd-topbar-theme {
    align-self: stretch;
    margin-top: 4px;
  }
}

@media (max-width: 860px) {
  .fd-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 18px;
  }
}
