html {
  color-scheme: light;
}

:root {
  --if-bg: #eef2f6;
  --if-surface: #ffffff;
  --if-surface-muted: #f6f8fb;
  --if-surface-raised: #fbfcfe;
  --if-navy: #223b63;
  --if-navy-dark: #172946;
  --if-ink: #0b172a;
  --if-text: #23324a;
  --if-muted: #607089;
  --if-border: #cbd3df;
  --if-border-strong: #b8c3d2;
  --if-focus: rgba(34, 59, 99, 0.18);
  --if-success: #059669;
  --if-warning: #d97706;
  --if-danger: #dc2626;
  --if-info: #2563eb;
  --if-radius: 6px;
  --if-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  --if-shadow-raised: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  background: var(--if-bg);
  color: var(--if-ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.if-app-shell {
  min-height: 100vh;
  background: var(--if-bg);
  color: var(--if-ink);
}

.if-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #1a2d4c;
  background: var(--if-navy);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
}

.if-brand-button {
  display: flex;
  height: 100%;
  min-width: 128px;
  align-items: center;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.if-nav-item {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.12s ease, color 0.12s ease;
}

.if-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.if-nav-item-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.if-module-bar {
  border-bottom: 1px solid var(--if-border);
  background: #fff;
}

.if-page-width {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.if-panel {
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  background: var(--if-surface);
  box-shadow: var(--if-shadow);
}

.if-panel-header {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--if-border);
  padding-bottom: 12px;
}

@media (min-width: 1024px) {
  .if-panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.if-panel-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--if-text);
}

.if-panel-subtitle {
  margin-top: 4px;
  max-width: 720px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--if-muted);
}

.if-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--if-muted);
}

.if-action-button {
  display: inline-flex;
  min-height: 36px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  background: #fff;
  padding: 8px 12px;
  color: var(--if-ink);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.if-action-button:hover:not(:disabled) {
  background: var(--if-surface-muted);
  border-color: var(--if-border-strong);
}

.if-action-button:active:not(:disabled) {
  transform: translateY(1px);
}

.if-action-button:focus-visible,
.if-field-input:focus,
.if-field-input:focus-visible {
  outline: none;
  border-color: var(--if-navy);
  box-shadow: 0 0 0 3px var(--if-focus);
}

.if-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.if-action-button-primary {
  border-color: var(--if-navy);
  background: var(--if-navy);
  color: #fff;
}

.if-action-button-primary:hover:not(:disabled) {
  background: var(--if-navy-dark);
  border-color: var(--if-navy-dark);
}

.if-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--if-text);
}

.if-required-pill {
  border-radius: 4px;
  background: #edf2f7;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.if-required-pill-warning {
  background: #fef3c7;
  color: #92400e;
}

.if-field-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  background: #fff;
  padding: 8px 12px;
  color: var(--if-ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.if-field-input-invalid {
  border-color: #f59e0b;
  background: #fffbeb;
}

.if-field-input-readonly {
  background: #f8fafc;
  color: #475569;
}

.if-field-input:disabled {
  background: #f8fafc;
  color: #64748b;
}

.if-register-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.if-register-table th {
  border-bottom: 1px solid var(--if-border);
  background: #f3f5f8;
  padding: 7px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--if-muted);
  white-space: nowrap;
}

.if-register-table td {
  border-bottom: 1px solid #e3e8ef;
  padding: 7px 10px;
  color: var(--if-ink);
  vertical-align: middle;
}

.if-register-table tr:hover td {
  background: #eff6ff;
}

.if-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--if-border);
  border-radius: 4px;
  background: #f8fafc;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #334155;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  background: rgba(34, 59, 99, 0.28);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.login-page {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.16), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(20, 184, 166, 0.18), transparent 26rem),
    linear-gradient(135deg, #eaf0f7 0%, #f8fafc 45%, #edf6f7 100%);
}

.login-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-blob {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.42;
  animation: loginFloat 16s ease-in-out infinite;
}

.login-blob-one {
  top: 5%;
  left: -10rem;
  background: rgba(34, 59, 99, 0.42);
}

.login-blob-two {
  top: 2rem;
  right: -9rem;
  background: rgba(20, 184, 166, 0.38);
  animation-delay: -5s;
}

.login-blob-three {
  bottom: -14rem;
  left: 45%;
  background: rgba(37, 99, 235, 0.24);
  animation-delay: -9s;
}

.login-gridlines {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(34, 59, 99, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 59, 99, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 68%);
  animation: loginGridDrift 22s linear infinite;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card-wrap {
  position: relative;
  width: min(100%, 460px);
  animation: loginRise 0.8s ease both;
}

.login-card-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(135deg, #49c7b4, #4f7cff 45%, #13233e);
  opacity: 0.9;
}

.login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  padding: 42px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(24px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -45% -25% auto;
  height: 16rem;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.14), transparent 62%);
}

.login-lock-badge {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #223b63, #0f172a);
  color: white;
  box-shadow: 0 14px 30px rgba(34, 59, 99, 0.24);
}

.login-input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  padding: 0 14px;
  color: #64748b;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.login-input-shell:focus-within {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-input-shell input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 14px 0;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  box-shadow: none;
}

.login-input-shell input:disabled {
  opacity: 0.65;
}

.login-submit-button {
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #223b63, #13233e);
  color: white;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(34, 59, 99, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.login-submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(34, 59, 99, 0.34);
  filter: saturate(1.08);
}

.login-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

@keyframes loginFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(28px, -22px, 0) scale(1.08);
  }
}

@keyframes loginGridDrift {
  from {
    transform: rotate(-8deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-8deg) translate3d(72px, 72px, 0);
  }
}

@keyframes loginTrack {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(220%);
  }
}

@keyframes loginRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .login-shell {
    padding: 28px;
  }

  .login-card {
    padding: 34px;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 18px;
  }

  .login-card {
    border-radius: 24px;
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-blob,
  .login-gridlines,
  .login-card-wrap {
    animation: none !important;
  }
}
