:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ee;
  --green: #0f766e;
  --green-dark: #115e59;
  --red: #b91c1c;
  --blue: #1d4ed8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.75;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  background: #101827;
  color: white;
}

.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 2px 0 0; color: #cbd5e1; }
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.top-actions a { color: white; text-decoration: none; border: 1px solid #334155; padding: 8px 12px; border-radius: 6px; }

.status, .alert {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.ok { background: #d1fae5; color: #065f46; }
.bad { background: #fee2e2; color: #991b1b; }

.layout {
  max-width: 1180px;
  margin: 22px auto 48px;
  padding: 0 18px;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.panel h2, .panel h3 { margin: 0; }
.panel h2 { font-size: 18px; }
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.panel p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 13px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  font: inherit;
}

textarea { resize: vertical; }

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  background: #e2e8f0;
  color: #0f172a;
}

button.primary {
  background: var(--green);
  color: white;
  font-weight: bold;
}

button.primary:hover { background: var(--green-dark); }
button.ghost { background: transparent; border: 1px solid var(--line); }

.checks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.checks label, .switch {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}

.checks input, .switch input { width: auto; }
.provider { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }

.test-row {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 12px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #101827;
}

.login-shell { width: min(420px, calc(100vw - 32px)); }

.login-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #233044;
}

.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card p { margin: 0 0 18px; color: var(--muted); }
.login-card form { display: grid; gap: 12px; }
.login-card button { background: var(--green); color: white; }

@media (max-width: 760px) {
  .topbar, .panel-title { display: grid; }
  .grid-form, .test-row { grid-template-columns: 1fr; }
}
