:root {
  --albali-blue: #123c69;
  --albali-blue-2: #0d2f55;
  --albali-yellow: #f2b705;
  --albali-gold: #f2b705;
  --albali-gold-soft: #fff4cc;
  --ink: #17202a;
  --muted: #5b6773;
  --line: #d9e2ec;
  --surface: #ffffff;
  --page: #f7f9fb;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  position: relative;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: var(--albali-yellow);
  z-index: 2;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  background: linear-gradient(180deg, var(--albali-blue) 0%, var(--albali-blue-2) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% -20% 18%;
  height: 220px;
  background: var(--albali-yellow);
  transform: rotate(-8deg);
  opacity: 0.95;
  z-index: 0;
}

.brand-mark {
  width: min(240px, 70%);
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 38px;
  position: relative;
  z-index: 1;
}

.brand-mark img {
  display: block;
  width: 100%;
  max-height: 108px;
  object-fit: contain;
  object-position: left center;
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--albali-yellow);
}

.brand-panel h1 {
  margin: 0;
  max-width: 480px;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.brand-copy {
  max-width: 460px;
  margin: 24px 0 0;
  color: #d7e3ee;
  font-size: 1.08rem;
  line-height: 1.6;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 40px;
  background:
    linear-gradient(180deg, rgba(255, 244, 204, 0.54), rgba(255, 255, 255, 0) 38%),
    var(--page);
}

.panel-heading {
  margin-bottom: 28px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--albali-blue);
  font-size: 2rem;
}

.form-stack {
  display: grid;
  gap: 18px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--albali-blue);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(255, 198, 0, 0.35);
  border-color: var(--albali-gold);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: var(--albali-yellow);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #dca604;
}

.alert {
  margin-bottom: 18px;
  border-left: 4px solid var(--danger);
  background: #fff3f1;
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 700;
}

.notice {
  margin-bottom: 18px;
  border-left: 4px solid var(--albali-yellow);
  background: var(--albali-gold-soft);
  color: var(--albali-blue);
  padding: 12px 14px;
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: var(--surface);
  border-top: 10px solid var(--albali-blue);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 4px 0 var(--albali-yellow);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-logo {
  width: 112px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.brand-line {
  color: var(--albali-blue);
  font-weight: 900;
  font-size: 1.25rem;
}

.topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--albali-blue);
  font-weight: 800;
}

.topbar nav a {
  padding: 9px 12px;
  border: 1px solid rgba(242, 183, 5, 0.45);
  border-radius: 6px;
  background: var(--albali-gold-soft);
  text-decoration: none;
}

.content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0;
  color: var(--albali-blue);
  font-size: 2rem;
}

.page-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: var(--albali-yellow);
  color: var(--ink);
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--albali-blue);
}

.table-panel,
.form-card,
.detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--albali-yellow);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(7, 41, 77, 0.06);
}

.table-panel {
  overflow-x: auto;
}

.spaced-panel {
  margin-top: 22px;
}

.panel-title {
  padding: 18px 18px 0;
}

.panel-title h2 {
  margin: 0;
  color: var(--albali-blue);
}

.panel-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--albali-blue);
  font-size: 0.82rem;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

td a {
  color: var(--albali-blue);
  font-weight: 800;
  text-decoration: none;
}

.table-action-form {
  margin: 0;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.table-details summary {
  color: var(--albali-blue);
  cursor: pointer;
  font-weight: 800;
}

.password-reset-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  margin-top: 10px;
}

.password-reset-form input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--albali-blue);
}

.secondary-button:hover {
  background: var(--page);
}

.delegated-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid #f2d88a;
  background: var(--albali-gold-soft);
}

.delegated-session-bar strong,
.delegated-session-bar span {
  display: block;
}

.delegated-session-bar strong {
  color: var(--albali-blue);
}

.delegated-session-bar span {
  margin-top: 3px;
  color: var(--muted);
}

.delegated-session-bar form {
  margin: 0;
}

.delegated-session-bar button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--albali-blue);
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

.form-card {
  display: grid;
  gap: 22px;
  padding: 24px;
}

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

.privacy-note {
  border-left: 4px solid var(--albali-yellow);
  background: var(--albali-gold-soft);
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 700;
}

.secret-box {
  border: 1px solid rgba(242, 183, 5, 0.55);
  border-radius: 8px;
  background: #fffdf4;
  padding: 18px;
}

.secret-box h2 {
  margin: 0 0 16px;
  color: var(--albali-blue);
  font-size: 1.1rem;
}

.type-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 18px;
}

.type-fields-heading {
  margin-bottom: 16px;
}

.type-fields-heading h2 {
  margin: 0;
  color: var(--albali-blue);
  font-size: 1.1rem;
}

.type-fields-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.type-specific + .type-specific {
  margin-top: 18px;
}

.quick-create {
  margin-top: 7px;
  font-size: 0.86rem;
}

.quick-create summary {
  cursor: pointer;
  color: var(--albali-blue);
  font-weight: 800;
}

.quick-create input {
  min-height: 38px;
  margin-top: 8px;
  font-size: 0.92rem;
}

.quick-create button {
  min-height: 38px;
  margin-top: 8px;
  padding: 0 12px;
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

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

.detail-panel {
  padding: 22px;
}

.detail-panel h2 {
  margin: 0 0 16px;
  color: var(--albali-blue);
}

.warning-panel {
  background: linear-gradient(180deg, #fffdf4, #fff);
}

.warning-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--albali-blue);
  color: #fff;
  font-weight: 900;
}

.simple-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.simple-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
}

.simple-list span {
  color: var(--muted);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.6fr) auto auto;
  align-items: center;
  gap: 10px;
}

.inline-form button {
  min-height: 48px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--albali-blue);
  font-weight: 800;
}

.check-label input {
  width: auto;
  min-height: auto;
}

.revealed-secret {
  margin-bottom: 18px;
  border: 2px solid var(--albali-yellow);
  border-radius: 8px;
  background: #fffdf4;
  padding: 20px;
}

.revealed-secret h2 {
  margin: 0 0 12px;
  color: var(--albali-blue);
}

.revealed-secret code {
  display: block;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 1.1rem;
}

.revealed-secret p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.reveal-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  width: 100%;
}

.reveal-form button {
  min-height: 48px;
}

.welcome-block {
  border-top: 10px solid var(--albali-yellow);
  background: var(--surface);
  padding: 34px;
  box-shadow: 0 18px 40px rgba(7, 41, 77, 0.08);
}

.view-as-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f2d88a;
  border-left: 5px solid var(--albali-yellow);
  border-radius: 8px;
  background: var(--albali-gold-soft);
}

.view-as-banner strong,
.view-as-banner span {
  display: block;
}

.view-as-banner strong {
  color: var(--albali-blue);
}

.view-as-banner span {
  margin-top: 4px;
  color: var(--muted);
}

.view-as-banner form {
  margin: 0;
}

.welcome-block h1 {
  margin: 0 0 28px;
  color: var(--albali-blue);
  font-size: 2.1rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 0;
}

.status-grid div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: var(--page);
}

.status-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 14px 0 0;
  color: var(--albali-blue);
  font-size: 1.45rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.it-panel {
  padding-bottom: 18px;
}

.it-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
}

.it-panel-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
}

.it-panel-grid h3 {
  margin: 0 0 12px;
  color: var(--albali-blue);
}

.empty-state {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 18px;
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 38vh;
    padding: 34px 24px;
  }

  .brand-panel::after {
    inset: auto -18% -26px 40%;
    height: 92px;
    transform: rotate(-6deg);
    opacity: 0.9;
  }

  .brand-mark {
    width: min(188px, 72%);
    height: 74px;
    margin-bottom: 26px;
  }

  .brand-mark img {
    max-height: 74px;
  }

  .login-panel {
    padding: 34px 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .topbar-logo {
    width: 96px;
    height: 40px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .page-heading,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .detail-grid,
  .inline-form,
  .reveal-form {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .simple-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}
