.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f8fafc);
  padding: 1.5rem;
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 24rem;
  background: #fff;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius-lg, 10px);
  padding: 2rem;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(15, 23, 42, 0.1));
}

.auth-card--status {
  text-align: center;
  padding: 2.5rem 2rem;
}

.auth-card__locale {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding-right: 4.5rem;
}

.auth-brand--compact {
  margin-bottom: 1rem;
}

.auth-brand .app-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.auth-brand.auth-brand--compact .app-logo {
  width: 36px;
  height: 36px;
}

.auth-brand__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0.2rem 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}

.auth-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.auth-panel__hint {
  margin: 0 0 1rem;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
  line-height: 1.45;
}

.auth-status {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}

.auth-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.auth-form input {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid var(--accent-soft, #dbeafe);
  border-color: var(--accent, #2563eb);
}

.btn--block {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-footer-link {
  margin: 0.85rem 0 0;
  text-align: center;
}

.auth-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent, #2563eb);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link-btn:hover {
  color: #1d4ed8;
}

.auth-footer-link a.auth-link-btn {
  text-decoration: none;
}

.auth-footer-link a.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-error {
  margin-top: 0.85rem;
  padding: 0.55rem 0.65rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius, 6px);
  font-size: 0.85rem;
}

.auth-success {
  margin-top: 0.85rem;
  padding: 0.55rem 0.65rem;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius, 6px);
  font-size: 0.85rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
}

.permission-item {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.access-form {
  max-width: 40rem;
}

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

.workspace-list a {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.workspace-list a:hover {
  border-color: var(--accent, #2563eb);
}

.workspaces-main {
  max-width: 42rem;
}

.workspace-card {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.workspace-card:last-child {
  border-bottom: none;
}

.workspace-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.workspace-section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workspace-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.workspace-list__item form {
  flex: 1 1 12rem;
  min-width: 0;
}

.workspace-programme-btn {
  text-align: left;
}

.workspace-programme-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.workspace-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

.workspace-active-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #2563eb);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.workspace-delete-btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
}

.workspace-rename-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.workspace-rename-row input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  font: inherit;
}

.workspace-rename-field {
  margin-bottom: 0.35rem;
}

.workspace-members {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 6px);
}

.workspace-member-list {
  margin-bottom: 1rem;
}

.workspace-invite-form .field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.new-programme-form {
  margin: 1rem 0 0.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 6px);
}

.new-programme-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.new-programme-form input {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  font: inherit;
}

.admin-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}
