/* ── Agrafe (splash-web) app styles ──────────────────────────────────
   dolfin-suite.css loads first: Catppuccin palette, base reset,
   shared utilities (.btn-primary, .muted, .error, .badge-*, .dn-bar,
   .problem-card, .version-banner).
   Only Agrafe-specific styles live here.
   ──────────────────────────────────────────────────────────────────── */

/* ── Site layout ────────────────────────────────────────────────────── */
.site-logo { height: 28px; width: 28px; }

.site-main { padding: 1.5rem 1rem; }

/* ── Projects list ──────────────────────────────────────────────────── */
.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.projects-header h2 { margin: 0; font-size: 1.125rem; }

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.project-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background-color: var(--ctp-mantle);
  border: 1px solid var(--ctp-surface0);
}
.project-row:hover { border-color: var(--ctp-surface1); }
.project-row input[type="text"] { flex: 1; font-size: 0.9375rem; }
.project-row a { flex: 1; font-size: 0.9375rem; color: var(--ctp-text); }
.project-row a:hover { color: var(--ctp-blue); text-decoration: none; }
.project-row .btn-icon {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  background: transparent;
  border-color: transparent;
  color: var(--ctp-subtext0);
}
.project-row .btn-icon:hover:not(:disabled) {
  background-color: var(--ctp-surface0);
  color: var(--ctp-text);
}

/* ── Auth pages (login / signup) ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--ctp-base);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--ctp-mantle);
  border: 1px solid var(--ctp-surface0);
  border-radius: 10px;
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.auth-card h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ctp-text);
  text-align: center;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ctp-lavender);
  letter-spacing: 0.03em;
  margin-bottom: -0.5rem;
}
.auth-logo { height: 48px; width: 48px; }

.auth-form { display: flex; flex-direction: column; gap: 0.875rem; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ctp-subtext1);
}
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  background-color: var(--ctp-base);
  border: 1px solid var(--ctp-surface1);
  border-radius: 6px;
  color: var(--ctp-text);
  transition: border-color 0.15s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--ctp-blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ctp-blue) 20%, transparent);
}
.auth-form .btn-submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 600;
  background-color: var(--ctp-blue);
  color: var(--ctp-base);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.auth-form .btn-submit:hover:not(:disabled) { background-color: var(--ctp-lavender); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ctp-subtext0);
  font-size: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--ctp-surface0);
}

.auth-oauth { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-oauth a { display: block; text-decoration: none; }
.btn-oauth {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--ctp-surface0);
  color: var(--ctp-text);
  border: 1px solid var(--ctp-surface1);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-oauth:hover:not(:disabled) {
  background-color: var(--ctp-surface1);
  border-color: var(--ctp-surface2);
}

.auth-footer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ctp-subtext0);
  margin-top: -0.25rem;
}
.auth-footer a { color: var(--ctp-blue); font-weight: 500; }

.auth-error {
  font-size: 0.8125rem;
  color: var(--ctp-red);
  background-color: color-mix(in srgb, var(--ctp-red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ctp-red) 30%, transparent);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  text-align: center;
}

/* ── Settings page ──────────────────────────────────────────────────── */
.settings-layout {
  display: flex;
  min-height: calc(100vh - 48px);
}
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--ctp-surface0);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background-color: var(--ctp-mantle);
}
.settings-nav-item {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--ctp-subtext1);
  text-decoration: none;
}
.settings-nav-item:hover { background-color: var(--ctp-surface0); color: var(--ctp-text); text-decoration: none; }
.settings-nav-item.active { background-color: var(--ctp-surface0); color: var(--ctp-text); font-weight: 500; }

.settings-main { flex: 1; padding: 1.5rem 2rem; max-width: 640px; }

/* ── License settings ───────────────────────────────────────────────── */
.settings-license h2 { margin: 0 0 1.25rem; font-size: 1.125rem; }

.license-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ctp-surface0);
  border-radius: 8px;
  background-color: var(--ctp-mantle);
}

.plan-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-badge.active  { background-color: color-mix(in srgb, var(--ctp-green) 15%, transparent); color: var(--ctp-green); border: 1px solid color-mix(in srgb, var(--ctp-green) 40%, transparent); }
.plan-badge.expired { background-color: color-mix(in srgb, var(--ctp-red) 15%, transparent); color: var(--ctp-red); border: 1px solid color-mix(in srgb, var(--ctp-red) 40%, transparent); }

.license-expiry { margin: 0; font-size: 0.8125rem; color: var(--ctp-subtext0); }

.quota-bars { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.5rem; }
.quota-bar-row { display: flex; flex-direction: column; gap: 0.25rem; }
.quota-label { font-size: 0.8125rem; color: var(--ctp-subtext1); }
.quota-bar-track { height: 6px; border-radius: 99px; background-color: var(--ctp-surface0); overflow: hidden; }
.quota-bar-fill { height: 100%; border-radius: 99px; background-color: var(--ctp-blue); transition: width 0.3s ease; }

.activate-section { display: flex; flex-direction: column; gap: 0.75rem; }
.activate-section h3 { margin: 0; font-size: 1rem; }
.license-input { width: 100%; font-family: monospace; font-size: 0.8125rem; resize: vertical; }
.error-text { color: var(--ctp-red); font-size: 0.875rem; }

/* ── Avatar ─────────────────────────────────────────────────────────── */
.header-user-link { display: flex; align-items: center; gap: 0.5rem; }
.header-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ── Profile settings ───────────────────────────────────────────────── */
.profile-section { display: flex; gap: 2rem; align-items: flex-start; }
.profile-avatar-preview { flex-shrink: 0; }
.avatar-preview-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ctp-surface1); }
.profile-fields { display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.field-label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.875rem; color: var(--ctp-subtext1); }
.field-input { padding: 0.4rem 0.6rem; border-radius: 4px; border: 1px solid var(--ctp-surface1); background: var(--ctp-base); color: var(--ctp-text); font-size: 0.9rem; }
