:root {
  --navy: #0b1f3a;
  --navy-2: #12355f;
  --blue: #1f6feb;
  --teal: #18a999;
  --gold: #c99a2e;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --border: #dbe3ef;
  --danger: #b42318;
  --success: #027a48;
  --warning: #b54708;
  --shadow: 0 18px 50px rgba(11, 31, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 235, 0.12), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.4fr);
  gap: 28px;
  padding: 32px;
}

.brand-panel {
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: #ffffff;
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-mark {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.eyebrow.danger {
  color: var(--danger);
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.brand-copy {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.6;
}

.security-note {
  margin-top: 32px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.access-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card,
.dashboard {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card {
  padding: 28px;
}

.dashboard {
  padding: 22px;
}

.card-header h2,
.topbar h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.card-header p:not(.eyebrow),
.topbar p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

button {
  border: none;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
}

button:hover {
  filter: brightness(0.96);
}

button.secondary {
  background: #eef4ff;
  color: var(--navy);
}

.error {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: 14px;
  background: #fff1f0;
  color: var(--danger);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 8px 8px 20px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #f8fbff;
}

.info-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.info-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.menu-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
}

.menu-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--blue);
  margin-bottom: 14px;
  font-size: 19px;
}

.menu-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.menu-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.test-result {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.test-row {
  padding: 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid var(--border);
  color: var(--muted);
}

.test-row strong {
  color: var(--text);
}

.ok {
  color: var(--success);
  font-weight: 800;
}

.warn {
  color: var(--warning);
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .brand-panel {
    min-height: auto;
  }

  .profile-grid,
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }
}
