@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Sora:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --sea-deep: #0b3d4a;
  --sea-mid: #136f7a;
  --sea-bright: #1fa3a8;
  --sea-foam: #d8f3f0;
  --sea-sand: #f3efe6;
  --ink: #14242b;
  --muted: #5b6b73;
  --line: #c9d6d9;
  --danger: #c44b3c;
  --ok: #2f8f6b;
  --warn: #c48a1a;
  --card: rgba(255, 255, 255, 0.82);
  --shadow: 0 18px 50px rgba(11, 61, 74, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 163, 168, 0.28), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(19, 111, 122, 0.22), transparent 55%),
    linear-gradient(180deg, #e8f4f2 0%, var(--sea-sand) 48%, #e7eef0 100%);
  background-attachment: fixed;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.font-display {
  font-family: "Fraunces", Georgia, serif;
}

.font-mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 214, 217, 0.85);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn:hover {
  border-color: var(--sea-bright);
  color: var(--sea-deep);
  background: #f3fbfb;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--sea-mid), var(--sea-deep));
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sea-bright), var(--sea-mid));
  color: #fff;
}

.btn-danger {
  background: #fff5f3;
  border-color: #f0c2bb;
  color: var(--danger);
}

.btn-small {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  outline: none;
}

.textarea {
  min-height: 140px;
  resize: vertical;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--sea-bright);
  box-shadow: 0 0 0 3px rgba(31, 163, 168, 0.18);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-ok {
  background: #e8f7f0;
  color: var(--ok);
  border-color: #b9e4cf;
}

.badge-warn {
  background: #fff7e8;
  color: var(--warn);
  border-color: #f0d59a;
}

.badge-run {
  background: #e8f6f7;
  color: var(--sea-mid);
  border-color: #b6e0e3;
}

.badge-err {
  background: #fff1ef;
  color: var(--danger);
  border-color: #f0c2bb;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e4ecee;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sea-bright), var(--sea-mid));
  transition: width 0.3s ease;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table-wrap th,
.table-wrap td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #eef2f3;
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}

.table-wrap th {
  background: #f4faf9;
  position: sticky;
  top: 0;
  font-weight: 600;
  z-index: 1;
}

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

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.anim-rise {
  animation: rise 0.55s ease both;
}

.anim-float {
  animation: floaty 4.5s ease-in-out infinite;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(201, 214, 217, 0.7);
  background: rgba(243, 239, 230, 0.78);
  backdrop-filter: blur(12px);
}

.header-inner,
.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--sea-deep);
  color: var(--sea-foam);
  font-size: 0.82rem;
  font-weight: 700;
}

.brand-title {
  display: block;
  color: var(--sea-deep);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  border-radius: 0.5rem;
  padding: 0.42rem 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: 0.18s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--sea-deep);
}

.nav-link.active {
  background: var(--sea-deep);
  color: #fff;
}

.main {
  padding: 1.5rem 0 4rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack-lg {
  display: grid;
  gap: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2,
.grid-3,
.grid-5 {
  grid-template-columns: 1fr;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

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

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 1.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.muted {
  color: var(--muted);
}

.sea {
  color: var(--sea-deep);
}

.danger {
  color: var(--danger);
}

.link {
  color: var(--sea-mid);
  cursor: pointer;
}

.link:hover {
  color: var(--sea-deep);
  text-decoration: underline;
}

.w-full {
  width: 100%;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-xs {
  max-width: 20rem;
}

.mx-auto {
  margin-inline: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.dropzone {
  display: flex;
  min-height: 10rem;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--sea-mid);
  border-radius: 1rem;
  background: rgba(216, 243, 240, 0.45);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: rgba(216, 243, 240, 0.72);
}

.soft-card {
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.62);
}

.phone-layout .panel {
  border-radius: 16px;
}

.phone-hero-head {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(201, 214, 217, 0.7);
}

.phone-config-stack {
  gap: 0.75rem;
}

.phone-action-row .btn {
  min-width: 8.5rem;
}

.phone-area {
  background: #fff;
  font-size: 0.88rem;
}

.phone-transfer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  border-style: dashed;
}

.phone-transfer-item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  color: var(--muted);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(120deg, rgba(11, 61, 74, 0.08), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(31, 163, 168, 0.25), transparent 35%);
  opacity: 0.7;
}

.hero > * {
  position: relative;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.cols-2 {
  grid-template-columns: 1fr;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1rem;
}

.digit-input {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .span-2 {
    grid-column: span 2;
  }

  .span-3 {
    grid-column: span 3;
  }

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

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
}
