:root {
  --bg: #f4efe6;
  --bg-accent: #eadfce;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffaf2;
  --border: rgba(65, 48, 28, 0.12);
  --text: #2a2116;
  --muted: #6f6356;
  --shadow: 0 24px 60px rgba(84, 59, 27, 0.12);
  --accent: #ca5f2d;
  --accent-soft: #f4d3b9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(202, 95, 45, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(114, 142, 110, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #f8f4ec 100%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  padding: 28px 8px 32px;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.96;
}

.subtitle {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 170px;
  padding: 18px;
  background: linear-gradient(180deg, var(--surface-strong) 0%, rgba(255, 248, 238, 0.82) 100%);
  border: 1px solid rgba(65, 48, 28, 0.08);
  border-radius: 24px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(84, 59, 27, 0.12);
  border-color: rgba(202, 95, 45, 0.28);
}

.card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.icon {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #ffd6bf, var(--accent) 70%);
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.25);
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.title {
  font-size: 1.05rem;
}

.url {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.75);
  border: 1px dashed rgba(65, 48, 28, 0.16);
  color: var(--muted);
}

.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.secondary-button {
  padding: 11px 16px;
  background: var(--text);
  color: #fffaf2;
}

.secondary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ghost-button {
  padding: 8px 14px;
  background: rgba(65, 48, 28, 0.08);
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 24, 16, 0.4);
  backdrop-filter: blur(8px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: #fffaf2;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.credential-body {
  display: grid;
  gap: 12px;
}

.credential-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(244, 211, 185, 0.28);
}

.credential-row span {
  color: var(--muted);
}

.credential-row strong {
  text-align: right;
  word-break: break-word;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 24px;
  }

  .panel {
    padding: 20px;
    border-radius: 24px;
  }

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