:root {
  --bg: #eef4fb;
  --panel: #ffffff;
  --text: #142033;
  --muted: #64748b;
  --line: #d8e2ef;
  --brand: #153e75;
  --brand2: #0f766e;
  --danger: #dc2626;
  --ok: #166534;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #eef4fb 0%, #dbeafe 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--brand);
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
}

button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.primary,
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
}

button.secondary,
.btn.secondary {
  background: #e2e8f0;
  color: var(--text);
}

button.danger {
  background: #fee2e2;
  color: var(--danger);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.alert {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.alert.show {
  display: block;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: var(--ok);
}

.page-shell {
  min-height: 100vh;
  padding: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0;
  color: var(--brand);
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.admin {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.user {
  background: #e2e8f0;
  color: #334155;
}

.badge.active {
  background: #dcfce7;
  color: var(--ok);
}

.badge.inactive {
  background: #fee2e2;
  color: var(--danger);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.app-topbar {
  background: linear-gradient(135deg, var(--brand), #0b1f3a 58%, var(--brand2));
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-topbar strong {
  font-size: 15px;
}

.app-topbar .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-topbar button,
.app-topbar a {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.app-frame-wrap {
  height: calc(100vh - 52px);
}

.app-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.hidden {
  display: none !important;
}
