:root {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111b33;
  --surface-alt: #172447;
  --text: #eef2ff;
  --muted: #94a3b8;
  --accent: #5d5cff;
  --accent-strong: #9a8dff;
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(93, 92, 255, 0.16), transparent 25%),
              radial-gradient(circle at bottom right, rgba(17, 140, 219, 0.14), transparent 20%),
              var(--bg);
  color: var(--text);
}

body {
  padding: 24px;
}

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

.app-header,
.app-footer {
  background: rgba(14, 18, 39, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 3rem);
}

.subtitle {
  margin: 12px 0 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.65;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.hero-card {
  grid-column: span 12;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.dashboard-logo {
  flex: 0 0 auto;
  width: 118px;
  height: 118px;
  padding: 12px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.tool-card,
.tool-form-card,
.tool-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.tool-card {
  grid-column: span 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(93, 92, 255, 0.5);
  background: rgba(17, 25, 60, 0.96);
}

.tool-card h3,
.tool-card p {
  margin: 0;
}

.card-action {
  color: var(--accent);
  font-weight: 700;
}

.add-card {
  opacity: 0.9;
}

.tool-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.tool-form {
  display: grid;
  gap: 18px;
}

.tool-form label {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.tool-form input,
.tool-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(12, 16, 31, 0.98);
  color: var(--text);
  padding: 14px 16px;
  font-size: 1rem;
}

.tool-form textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button.secondary {
  background: rgba(93, 92, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(93, 92, 255, 0.28);
}

.tool-result-card h2 {
  margin-top: 0;
}

.result-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.result-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.result-list dt {
  color: var(--muted);
  font-size: 0.95rem;
}

.result-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.qr-preview {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 20px;
}

.qr-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.app-footer {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .tool-card,
  .content-grid {
    grid-column: span 12;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    padding: 16px;
  }
  .app-header,
  .app-footer {
    padding: 24px;
  }

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

  .brand-logo-link {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

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

  .dashboard-logo {
    width: 92px;
    height: 92px;
  }
}
