:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #1a56db;
  --primary-hover: #1444ae;
  --error-bg: #fef2f2;
  --error: #b91c1c;
  --ok: #059669;
  --warn: #d97706;
  --shadow: 0 12px 40px rgba(17, 24, 39, 0.08);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(165deg, #eef2ff 0%, var(--bg) 42%, #f8fafc 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-header {
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand img {
  height: 32px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.header-nav a {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  background: #f9fafb;
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  width: min(1080px, calc(100% - 2rem));
  margin: 2.5rem auto 3rem;
  align-items: start;
}

.auth-intro h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  margin: 0.35rem 0 0.75rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.auth-features {
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
  color: #374151;
}

.auth-card,
.aside-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.link-sm {
  font-size: 0.8125rem;
  font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}

input:focus {
  outline: 2px solid rgba(26, 86, 219, 0.25);
  border-color: var(--primary);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

.checkbox input {
  margin-top: 0.2rem;
}

.alert {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}

.hidden {
  display: none !important;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.form-footer,
.form-meta {
  font-size: 0.875rem;
  margin: 1rem 0 0;
}

.aside-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }

.aside-updated {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-inner nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-content {
  width: min(800px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
}

.page-content h1 {
  margin-top: 0;
}

.content-card p,
.content-card li {
  color: #374151;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
}

.price-card h3 {
  margin: 0 0 0.25rem;
}

.price {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

table.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.files-table th,
.files-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 0.65rem 0.35rem;
}

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

  .auth-aside {
    order: -1;
  }

  .header-nav a:not(.btn) {
    display: none;
  }
}