:root {
  --bg: #09111f;
  --bg-soft: rgba(9, 17, 31, 0.82);
  --panel: rgba(12, 23, 42, 0.86);
  --panel-strong: rgba(18, 31, 53, 0.92);
  --line: rgba(148, 163, 184, 0.14);
  --text: #eef4ff;
  --muted: #96a6c3;
  --accent: #7df9c6;
  --accent-strong: #1dbb8b;
  --danger: #ff7d7d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-main: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(33, 171, 137, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(72, 98, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #050a14 0%, #0a1423 42%, #08111e 100%);
}

button,
input,
textarea {
  font: inherit;
}

.auth-body,
.app-body {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-left {
  top: -70px;
  left: -100px;
  background: rgba(46, 210, 166, 0.26);
}

.ambient-right {
  right: -120px;
  bottom: -80px;
  background: rgba(76, 101, 255, 0.22);
}

.login-shell,
.app-shell {
  position: relative;
  z-index: 1;
  padding: 32px 20px 48px;
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card,
.panel,
.hero-panel {
  background: linear-gradient(180deg, rgba(16, 28, 49, 0.94), rgba(10, 19, 34, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.login-card {
  width: min(100%, 460px);
  padding: 36px;
  border-radius: var(--radius-xl);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(125, 249, 198, 0.11);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.02;
}

h2 {
  font-size: 1.2rem;
}

.subtle {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.stack-form label {
  display: grid;
  gap: 9px;
}

.stack-form span {
  color: #d7e4fb;
  font-size: 0.92rem;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(150, 166, 195, 0.18);
  border-radius: 14px;
  background: rgba(6, 12, 23, 0.74);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(125, 249, 198, 0.55);
  box-shadow: 0 0 0 4px rgba(125, 249, 198, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.primary-button,
.ghost-button,
.mini-button {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

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

.primary-button {
  background: linear-gradient(135deg, var(--accent), #a2ffd8);
  color: #06121d;
  font-weight: 800;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(150, 166, 195, 0.16);
}

.mini-button {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.danger-button {
  color: #ffd0d0;
  background: rgba(255, 125, 125, 0.08);
}

.error-text,
.status-text {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.error-text {
  color: #ffd7d7;
  background: rgba(255, 125, 125, 0.12);
}

.status-text[data-tone="success"] {
  color: #d8ffef;
  background: rgba(42, 188, 138, 0.14);
}

.status-text[data-tone="error"] {
  color: #ffd7d7;
  background: rgba(255, 125, 125, 0.12);
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 30px;
  border-radius: 30px;
}

.hero-actions {
  display: grid;
  justify-items: end;
  gap: 14px;
}

.chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.grid-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.panel {
  border-radius: 28px;
  padding: 26px;
}

.panel-heading {
  display: grid;
  gap: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag-shortcuts,
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-button {
  border: 1px solid rgba(150, 166, 195, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag-button:hover {
  transform: translateY(-1px);
}

.tag-button.is-active {
  background: rgba(125, 249, 198, 0.14);
  border-color: rgba(125, 249, 198, 0.4);
  color: #d8ffef;
}

.tag-shortcuts .tag-button {
  padding: 6px 10px;
  font-size: 0.72rem;
}

.filter-toolbar .tag-button {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.cards-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(19, 34, 58, 0.98), rgba(11, 21, 38, 0.96));
  border: 1px solid rgba(150, 166, 195, 0.12);
  cursor: default;
}

.card.dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

.card-top,
.card-meta,
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

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

.card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(125, 249, 198, 0.11);
  color: #c7ffeb;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge.safe {
  background: rgba(125, 249, 198, 0.11);
  color: #b8ffe5;
}

.badge.warn {
  background: rgba(255, 209, 102, 0.12);
  color: #ffdf93;
}

.badge.danger {
  background: rgba(255, 125, 125, 0.12);
  color: #ffd7d7;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
}

.comment-text {
  color: #dce9ff;
  line-height: 1.6;
  white-space: pre-wrap;
}

.item-link {
  color: #b7fff0;
  word-break: break-all;
}

.empty-state {
  margin-top: 22px;
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed rgba(150, 166, 195, 0.22);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .hero-panel,
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-actions {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .login-card,
  .panel,
  .hero-panel {
    border-radius: 22px;
  }

  .login-card,
  .panel {
    padding: 20px;
  }

  .hero-panel {
    padding: 20px;
  }

  .app-shell {
    padding-inline: 14px;
  }
}
