:root {
  color-scheme: light;
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #1b1f23;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(circle at top, #ffffff, #edf1f5 70%);
}

main.auth {
  width: min(720px, 100%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 32px;
}

h1 {
  margin: 0 0 16px;
  font-size: 28px;
}

p {
  margin: 0 0 16px;
  color: #3b4351;
}

form {
  display: grid;
  gap: 16px;
}

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

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
}

input:focus {
  outline: 2px solid #0ea5e9;
  border-color: #0ea5e9;
}

button {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: #111827;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

button.secondary {
  background: #f1f5f9;
  color: #0f172a;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.notice {
  background: #eff6ff;
  color: #1e3a8a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.error {
  color: #b91c1c;
  font-weight: 600;
}

.success {
  color: #15803d;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.table th {
  color: #1f2937;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions button {
  padding: 6px 10px;
  font-size: 13px;
}

.read-access-toggle {
  min-width: 140px;
}

.read-access-popover {
  margin-top: 16px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.read-access-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.read-access-popover__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.read-access-popover__header h2 {
  margin: 0;
  font-size: 18px;
}

.read-access-popover__meta {
  margin: 10px 0 12px;
  color: #334155;
}

.read-access-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.read-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
}

.read-access-item__label {
  display: grid;
  gap: 2px;
}

.read-access-item__title {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
}

.read-access-item__route {
  font-size: 12px;
  color: #64748b;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.switch__state {
  font-size: 12px;
  color: #334155;
  min-width: 28px;
  text-align: right;
}

@media (max-width: 640px) {
  main.auth {
    padding: 24px;
  }

  h1 {
    font-size: 24px;
  }
}
