:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #f2f4f7;
  --border: #e4e7ec;
  --text: #101828;
  --text-muted: #475467;
  --primary: #111827;
  --primary-hover: #1f2937;
  --danger-bg: #fef3f2;
  --danger-border: #fecdd3;
  --danger-text: #b42318;
  --ok-bg: #ecfdf3;
  --ok-border: #a6f4c5;
  --ok-text: #067647;
  --radius: 12px;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

.page-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-link {
  text-decoration: none;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.topbar-link:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.auth-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: 30px 14px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #98a2b3;
  box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.08);
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-checkbox label {
  margin: 0;
  font-weight: 500;
}

.actions {
  margin-top: 18px;
}

.btn,
input[type="submit"],
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary,
input[type="submit"] {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
input[type="submit"]:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-small {
  padding: 7px 12px;
  font-size: 0.85rem;
}

.auth-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-links a {
  color: #344054;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.notice,
.alert {
  border-radius: 10px;
  border: 1px solid;
  padding: 10px 12px;
  margin: 0 0 16px;
}

.notice {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.alert {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.resource-errors {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--danger-text);
}
