/* static/css/styles.css */
:root {
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", "Times New Roman", serif;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;

  --surface: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.82);
  --stroke: rgba(148, 163, 184, 0.32);

  --brand-700: #0f766e;
  --brand-600: #0f8c7c;
  --brand-500: #14b8a6;
  --accent-500: #0ea5e9;
  --accent-400: #38bdf8;

  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.18);

  --btn-bdr: rgba(15, 23, 42, 0.15);
  --btn-fg: var(--ink-900);
  --btn-bg: rgba(255, 255, 255, 0.85);
  --btn-fg-hover: var(--ink-900);
  --btn-bg-hover: rgba(15, 118, 110, 0.08);
}

* {
  outline: none;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-900);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(45, 212, 191, 0.24), transparent 60%),
    radial-gradient(1000px 600px at 88% -20%, rgba(56, 189, 248, 0.22), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ecfeff 42%, #f0f9ff 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(transparent 0, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    radial-gradient(transparent 0, rgba(14, 116, 144, 0.08) 1px, transparent 1px);
  background-size: 28px 28px, 56px 56px;
  background-position: 0 0, 14px 14px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

p {
  line-height: 1.55;
}

main {
  animation: pageIn 0.55s ease-out both;
}

header nav {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

footer {
  color: var(--ink-500);
}

.btn-ghost,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-ghost {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--btn-bdr);
  color: var(--btn-fg);
  background: var(--btn-bg);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.btn-primary {
  padding: 0.55rem 1rem;
  border: 1px solid rgba(14, 116, 144, 0.25);
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  box-shadow: 0 16px 30px rgba(14, 116, 144, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(14, 116, 144, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(14, 116, 144, 0.22);
}

.details-summary {
  list-style: none;
  cursor: pointer;
}

.details-summary::-webkit-details-marker {
  display: none;
}

.btn-ghost:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid rgba(14, 165, 233, 0.45);
  outline-offset: 2px;
}

.btn-ghost[disabled],
.btn-primary[disabled],
.btn-ghost:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.link {
  color: var(--brand-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

.link:hover {
  color: var(--accent-500);
  text-decoration: underline;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  border: 1px solid var(--stroke);
  border-radius: 1.25rem;
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 116, 144, 0.2);
    box-shadow: var(--shadow-lg);
  }
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.input,
.form-input {
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.6rem 0.85rem;
  color: var(--ink-900);
  transition: border-color 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
  min-width: 0;
}

.input::placeholder,
.form-input::placeholder {
  color: rgba(100, 116, 139, 0.7);
}

.input:focus,
.form-input:focus {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
  background: #ffffff;
}

.input:hover,
.form-input:hover {
  border-color: rgba(148, 163, 184, 0.8);
}

select.input,
select.form-input {
  cursor: pointer;
}

.select-inline {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  width: auto;
  min-width: 0;
  cursor: default;
}

.select-inline:focus {
  outline: none;
  box-shadow: none;
}

.select-inline::-ms-expand {
  display: none;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.flash-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #065f46;
}

.flash-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.flash-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.flash-info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0c4a6e;
}

/* decorative blobs */
.organic-blob {
  position: absolute;
  filter: blur(70px);
  opacity: 0.45;
  mix-blend-mode: multiply;
  animation: blobFloat 18s ease-in-out infinite;
}

.blob-1 {
  top: -10rem;
  left: -6rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(closest-side, rgba(45, 212, 191, 0.85), transparent 70%);
}

.blob-2 {
  bottom: -12rem;
  right: -8rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.7), transparent 70%);
  animation-delay: 2s;
}

.blob-3 {
  top: 35%;
  left: -12rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.6), transparent 70%);
  animation-delay: 4s;
}

/* dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.9rem;
  padding: 0.6rem;
  min-width: 14rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 1100;
  pointer-events: auto;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: var(--ink-900);
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(14, 165, 233, 0.08);
  color: var(--brand-700);
}

/* dropdown backdrop */
.dropdown-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
  background: transparent;
}

.dropdown-backdrop.show {
  display: block;
}

/* tables */
table tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

table tbody tr:hover {
  background: rgba(255, 255, 255, 0.7);
}

code {
  font-family: "SFMono-Regular", "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 0.35rem;
  padding: 0 0.25rem;
}

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

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

@media (max-width: 768px) {
  header nav {
    border-radius: 1.5rem;
  }

  .btn-ghost,
  .btn-primary {
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  main,
  .organic-blob,
  .btn-primary,
  .btn-ghost,
  .card {
    animation: none;
    transition: none;
  }
}
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

pre,
code {
  overflow-wrap: anywhere;
}
