:root {
  --bg-primary: #081725;
  --bg-secondary: #10293f;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #0f1a27;
  --text-soft: #475467;
  --primary: #006d77;
  --primary-strong: #0a9396;
  --accent: #ee9b00;
  --danger: #ae2012;
  --line: #d7e0ea;
  --shadow: 0 20px 40px rgba(7, 35, 66, 0.2);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #1a466b, var(--bg-primary) 40%),
    linear-gradient(130deg, var(--bg-primary), var(--bg-secondary));
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
strong {
  font-family: "Space Grotesk", Outfit, sans-serif;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.55;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.topbar {
  padding: 24px 0 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
}

.brand-wrap {
  color: #f7fbff;
  grid-column: 1;
  grid-row: 1;
}

.brand-wrap h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: 0.4px;
}

.brand-badge {
  display: inline-block;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e9f7ff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(6px);
}

.primary-btn,
.ghost-btn,
.danger-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-family: Outfit, sans-serif;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease, opacity 160ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  color: #f6fdff;
}

.ghost-btn {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn {
  background: linear-gradient(120deg, #bb3e03, var(--danger));
  color: #fff8f6;
}

.primary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.small {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px;
  font-family: Outfit, sans-serif;
  font-size: 0.95rem;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #9adce0;
  border-color: #7fc7cc;
}

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

.full-row {
  grid-column: 1 / -1;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e9f8f8;
  color: #0b5e67;
  border: 1px solid #bfe8eb;
  font-size: 0.82rem;
  font-weight: 700;
}

.inline-msg {
  margin-top: 12px;
  min-height: 24px;
  font-size: 0.94rem;
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(8, 23, 37, 0.2);
  padding: 10px 12px;
  animation: toast-in 180ms ease-out;
}

.toast p {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.toast-close {
  border: 0;
  background: transparent;
  color: #5d7285;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px;
}

.toast-info {
  border-left-color: #006d77;
}

.toast-success {
  border-left-color: #2f9e44;
}

.toast-warning {
  border-left-color: #d17d00;
}

.toast-error {
  border-left-color: #ae2012;
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(6, 20, 35, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-dialog {
  width: min(460px, 96vw);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(7, 35, 66, 0.32);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.confirm-dialog h3 {
  font-size: 1.15rem;
  color: #11364d;
}

.confirm-dialog p {
  color: var(--text-soft);
}

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.orb-a {
  width: 280px;
  height: 280px;
  background: rgba(238, 155, 0, 0.25);
  top: -70px;
  right: -70px;
}

.orb-b {
  width: 220px;
  height: 220px;
  background: rgba(10, 147, 150, 0.25);
  bottom: -60px;
  left: -60px;
}

.orb-c {
  width: 320px;
  height: 320px;
  background: rgba(174, 32, 18, 0.24);
  top: -80px;
  right: -100px;
}

.orb-d {
  width: 240px;
  height: 240px;
  background: rgba(0, 109, 119, 0.24);
  bottom: -70px;
  left: -80px;
}

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast-container {
    right: 10px;
    left: 10px;
    width: auto;
  }
}
