﻿:root {
  color-scheme: light;
  --pine: #0f3d2e;
  --forest: #1d5c44;
  --berry: #b91d3a;
  --cranberry: #e24462;
  --cream: #fff3e4;
  --snow: #fffaf5;
  --ink: #1b1b1f;
  --mist: #f2f0ec;
  --shadow: rgba(16, 12, 8, 0.15);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "DM Serif Display", "Georgia", serif;
  --font-body: "Work Sans", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #fffaf0 0%, #f7efe3 40%, #f4e6d7 100%);
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  padding: 48px 6vw 64px;
  position: relative;
  overflow-x: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 340px;
  background: radial-gradient(circle at 20% 40%, rgba(185, 29, 58, 0.15), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(15, 61, 46, 0.18), transparent 60%);
  filter: blur(0px);
  z-index: 0;
}

.hero,
.content {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

.hero__copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 12px 0 16px;
  letter-spacing: 0.5px;
}

.hero__copy .subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 520px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--berry);
  margin: 0;
}

.hero__card {
  background: var(--snow);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 55px var(--shadow);
  padding: 28px;
  border: 1px solid rgba(15, 61, 46, 0.08);
}

.hero__card h2 {
  margin-top: 0;
  font-family: var(--font-display);
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--pine);
}

input,
select {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(27, 27, 31, 0.1);
  font-size: 0.98rem;
  font-family: var(--font-body);
  background: white;
  width: 100%;
}

input:focus {
  outline: 2px solid rgba(185, 29, 58, 0.3);
  border-color: rgba(185, 29, 58, 0.4);
}

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 61, 46, 0.18);
}

.btn--primary {
  background: linear-gradient(120deg, var(--berry), var(--cranberry));
  color: white;
}

.btn--secondary {
  background: linear-gradient(120deg, var(--forest), var(--pine));
  color: white;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(15, 61, 46, 0.2);
  color: var(--pine);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
}

.panel {
  background: rgba(255, 250, 245, 0.9);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(15, 61, 46, 0.08);
  box-shadow: 0 20px 45px rgba(15, 61, 46, 0.12);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.muted {
  color: rgba(27, 27, 31, 0.6);
  margin: 4px 0 0;
}

.add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 20px 0 12px;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.btn--icon {
  padding: 10px 14px;
}

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

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid rgba(15, 61, 46, 0.08);
  box-shadow: 0 8px 20px rgba(27, 27, 31, 0.08);
  animation: floatIn 0.4s ease;
}

.list-item__meta {
  display: grid;
  gap: 4px;
}

.list-item__input {
  width: 100%;
}

.list-item__meta span {
  font-weight: 600;
}

.list-item__meta small {
  color: rgba(27, 27, 31, 0.5);
}

.actions {
  display: flex;
  gap: 8px;
}

.status {
  min-height: 20px;
  font-size: 0.9rem;
  color: var(--berry);
}

.tips ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.gate {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 61, 46, 0.9), rgba(15, 61, 46, 0.98));
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10;
}

.gate__panel {
  background: var(--snow);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 55px var(--shadow);
}

.gate__panel h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(15, 61, 46, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.loading__panel {
  background: var(--snow);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 55px var(--shadow);
}

.loading__status {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(185, 29, 58, 0.2);
  border-top-color: var(--berry);
  animation: spin 0.9s linear infinite;
}

.loading.hidden {
  display: none;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

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

  .add-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .app-shell {
    padding: 32px 6vw 48px;
  }

  .list-item {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .actions {
    justify-content: flex-start;
  }
}
