:root {
  --vio-accent: #c8463f;
  --vio-accent-rgb: 200, 70, 63;
  --vio-surface: rgba(8, 9, 13, 0.94);
  --vio-surface-elevated: rgba(30, 30, 30, 0.96);
  --vio-border: rgba(255, 255, 255, 0.08);
  --vio-text: #ffffff;
  --vio-text-muted: rgba(255, 255, 255, 0.55);
  --vio-text-dim: #666666;
  --vio-error: #e74c3c;
  --vio-success: #2ecc71;
  --vio-radius: 10px;
  --vio-radius-sm: 4px;
  --font-ui: 'Roboto', 'Segoe UI', sans-serif;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--vio-text);
  background: #0a0a0c;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ——— Login / Consent shell ——— */
.auth-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px 72px;
  background:
    radial-gradient(circle at 50% 28%, rgba(var(--vio-accent-rgb), 0.16), transparent 30rem),
    #0a0a0c;
}

.auth-login__grid {
  width: min(920px, 100%);
  display: grid;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .auth-login__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.auth-panel {
  background: var(--vio-surface);
  border: 1px solid var(--vio-border);
  border-radius: var(--vio-radius);
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-panel--hint {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.auth-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.auth-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--vio-text-muted);
  text-align: center;
  line-height: 1.45;
}

.auth-hint-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
}

.auth-hint-text {
  margin: 0;
  color: var(--vio-text-muted);
  line-height: 1.5;
}

.auth-domain {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--vio-border);
  border-radius: var(--vio-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.auth-footer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--vio-text-dim);
}

.auth-footer a:hover {
  color: var(--vio-text-muted);
}

/* ——— Forms ——— */
.auth-field {
  width: 100%;
  margin: 0 0 12px;
  padding: 13px 14px;
  border: 1px solid var(--vio-border);
  border-radius: 8px;
  background: #111218;
  color: var(--vio-text);
}

.auth-field:focus {
  outline: none;
  border-color: rgba(var(--vio-accent-rgb), 0.55);
}

.auth-field::placeholder {
  color: #777;
}

textarea.auth-field {
  min-height: 100px;
  resize: vertical;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--vio-accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.auth-btn:hover {
  background: #d4554e;
}

.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.auth-btn--ghost {
  background: transparent;
  border-color: var(--vio-border);
  color: #ddd;
}

.auth-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.auth-btn--block {
  width: 100%;
}

.auth-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(143, 40, 37, 0.14);
  color: #ef9b93;
  font-size: 13px;
}

.auth-alert--ok {
  border-color: rgba(46, 204, 113, 0.25);
  background: rgba(46, 204, 113, 0.07);
  color: #81dca7;
}

.cf-turnstile {
  margin: 12px 0 4px;
}

/* ——— Dashboard shell ——— */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--vio-accent-rgb), 0.1), transparent 28rem),
    #0a0a0c;
}

.auth-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--vio-border);
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(8px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.auth-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.auth-brand small {
  display: block;
  margin-top: 2px;
  color: var(--vio-text-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-nav a {
  padding: 8px 12px;
  border-radius: 7px;
  color: #a4a4aa;
  font-size: 12px;
  font-weight: 600;
  transition: 0.15s;
}

.auth-nav a:hover,
.auth-nav a.is-active {
  color: #fff;
  background: rgba(var(--vio-accent-rgb), 0.12);
}

.auth-nav a.is-active {
  box-shadow: inset 0 -2px 0 var(--vio-accent);
}

.auth-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--vio-border);
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-avatar__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: 0.2s;
  color: #fff;
  font-size: 14px;
}

.auth-avatar:hover .auth-avatar__overlay {
  opacity: 1;
}

.auth-main {
  flex: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 28px 18px 80px;
}

.auth-page-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.03em;
}

.auth-page-lead {
  margin: 0 0 22px;
  color: var(--vio-text-muted);
  max-width: 54ch;
  line-height: 1.45;
}

.auth-card {
  background: var(--vio-surface);
  border: 1px solid var(--vio-border);
  border-radius: var(--vio-radius);
  padding: 18px;
}

.auth-card + .auth-card {
  margin-top: 16px;
}

.auth-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-section-head h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
}

.auth-table-wrap {
  overflow: auto;
}

.auth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.auth-table th,
.auth-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--vio-border);
  vertical-align: top;
}

.auth-table th {
  color: #888;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-table td {
  color: #ddd;
}

.auth-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--vio-text-muted);
}

.auth-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #eee;
  font-size: 15px;
}

.auth-danger {
  color: var(--vio-accent) !important;
}

.auth-danger:hover {
  color: #ff7a72 !important;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #ccc;
}

.auth-check input {
  accent-color: var(--vio-accent);
  width: 16px;
  height: 16px;
}

.auth-scope-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 4px;
}

.auth-scope {
  padding: 10px 12px;
  border: 1px solid var(--vio-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.auth-scope strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.auth-scope span {
  color: var(--vio-text-muted);
  font-size: 12px;
}

.auth-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  user-select: all;
  word-break: break-all;
}

.auth-app-name {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 8px 0 4px;
}

@media (max-width: 700px) {
  .auth-topbar {
    padding: 12px 14px;
  }

  .auth-brand {
    width: 100%;
  }

  .auth-nav {
    width: 100%;
  }
}
