:root {
  --auth-navy: #0b4168;
  --auth-blue: #077bb3;
  --auth-cyan: #08bce5;
  --auth-ink: #061820;
  --auth-muted: #61737b;
  --auth-line: #d9e2e5;
  --auth-mist: #f2f6f7;
  --auth-paper: #ffffff;
  --auth-success: #14845f;
  --auth-danger: #a84343;
}

* { box-sizing: border-box; }

body.auth-body {
  min-height: 100vh;
  margin: 0;
  background: #edf5f7;
  color: var(--auth-ink);
  font-family: "Inter", Arial, sans-serif;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(390px, .92fr) minmax(520px, 1.08fr);
  min-height: 100vh;
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 52px clamp(38px, 5vw, 82px);
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(3,37,54,.96), rgba(4,66,91,.89)),
    url("../images/Infrastructure-1409967811.jpg") center/cover no-repeat;
  color: #fff;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77,210,239,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,210,239,.075) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(145deg, #000, transparent 76%);
  pointer-events: none;
}

.auth-story > * { position: relative; z-index: 1; }

.auth-brand img {
  display: block;
  width: min(225px, 60vw);
  height: auto;
}

.auth-story-copy {
  max-width: 590px;
  margin: 0;
  padding-top: 64px;
}

.auth-kicker {
  margin: 0 0 18px;
  color: #08bce5;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.auth-story h1{
  max-width: 680px;
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(29px, 2.75vw, 46px);
  line-height: 1.06;
  letter-spacing: -.015em;
}

.auth-story h1 span { color: var(--auth-cyan); }

.auth-story-lede {
  max-width: 510px;
  margin: 26px 0 0;
  color: rgba(230,244,248,.82);
  font-size: 16px;
  line-height: 1.7;
}

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.auth-proof div {
  min-height: 88px;
  padding: 17px;
  border: 1px solid rgba(123,222,243,.16);
  border-radius: 5px;
  background: rgba(5,38,54,.45);
  backdrop-filter: blur(10px);
}

.auth-proof strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.auth-proof span {
  display: block;
  margin-top: 5px;
  color: rgba(217,238,244,.68);
  font-size: 10px;
  line-height: 1.45;
}

.auth-security-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(221,240,245,.64);
  font-size: 10px;
}

.auth-security-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42d5a5;
  box-shadow: 0 0 0 5px rgba(66,213,165,.09);
}

.auth-workspace {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 148px clamp(28px, 6vw, 92px) 48px;
  place-items: start center;
  background:
    radial-gradient(circle at 90% 8%, rgba(8,183,223,.13), transparent 25%),
    linear-gradient(180deg, #f9fcfd, #edf5f7);
}

.auth-home-link {
  position: absolute;
  top: 28px;
  right: 34px;
  color: #3e626f;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.auth-home-link:hover { color: var(--auth-blue); }

.auth-card {
  width: min(100%, 550px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(167,193,204,.68);
  border-radius: 5px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 30px 80px -46px rgba(1,39,57,.45);
  backdrop-filter: blur(16px);
}

.auth-card-head h2{
  margin: 0;
  color: var(--auth-navy);
  font-weight: 700;
  font-size: clamp(29px, 2.75vw, 46px);
  line-height: 1.06;
  letter-spacing: -.015em;
}

.auth-card-head p {
  margin: 12px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 30px 0 24px;
  padding: 4px;
  border-radius: 5px;
  background: #edf4f6;
}
.auth-tabs[hidden] { display: none; }

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #5f7882;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--auth-blue);
  box-shadow: 0 6px 18px -12px rgba(0,40,60,.7);
}

.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }

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

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #35535f;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auth-field input,
.auth-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbdbe1;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}

.auth-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #59717b 50%),
    linear-gradient(135deg, #59717b 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.auth-field label span {
  color: #8ba0a8;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--auth-cyan);
  box-shadow: 0 0 0 4px rgba(8,183,223,.11);
}

.auth-location-row {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.auth-check {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #667d87;
  font-size: 9.5px;
  line-height: 1.5;
  cursor: pointer;
}

.auth-check input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--auth-blue);
}

.auth-check a {
  color: #007fa6;
  font-weight: 750;
}

.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 58px; }

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  min-width: 42px;
  min-height: 30px;
  border: 0;
  transform: translateY(-50%);
  background: transparent;
  color: #53717c;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.auth-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #007fa6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, #073e5d, #08688c);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 16px 30px -20px rgba(0,62,92,.8);
}

.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:disabled { cursor: wait; opacity: .62; }

.auth-form-note {
  margin: 0;
  color: #78909a;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-message {
  display: none;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.5;
}

.auth-message.show { display: block; }
.auth-message.error { border: 1px solid #edcbd0; background: #fff2f4; color: var(--auth-danger); }
.auth-message.success { border: 1px solid #bee5d8; background: #effbf7; color: #087251; }
.auth-message.info { border: 1px solid #c6e7ef; background: #eefafe; color: #096b86; }

.auth-setup {
  display: none;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #f0d8a8;
  border-radius: 5px;
  background: #fff8e9;
  color: #755516;
  font-size: 11px;
  line-height: 1.55;
}

.auth-setup.show { display: block; }

/* Account workspace */
.account-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(9,73,97,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9,73,97,.025) 1px, transparent 1px),
    radial-gradient(circle at 82% 0, rgba(8,183,223,.13), transparent 28%),
    #f3f7f8;
  background-size: 72px 72px, 72px 72px, auto, auto;
}

.account-main {
  width: min(calc(100% - 48px), 1420px);
  margin: 0 auto;
  padding: 28px 0 90px;
}

.account-loading {
  display: grid;
  min-height: calc(100vh - 132px);
  place-items: center;
  color: #52717e;
  font-size: 13px;
  text-align: center;
}

.account-loading[hidden] { display: none !important; }
.account-layout[hidden] { display: none; }

.account-loading strong,
.account-loading small { display: block; }
.account-loading strong { margin-top: 22px; color: #123c4e; font-size: 14px; }
.account-loading small { margin-top: 6px; color: #78929c; font-size: 10px; }

.account-loading-core {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  place-items: center;
}

.account-loading-core span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(8,183,223,.32);
  border-radius: 50%;
  animation: accountOrbit 1.8s linear infinite;
}

.account-loading-core span:nth-child(2) {
  inset: 9px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 2.4s;
}

.account-loading-core i {
  color: #087da3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.account-command-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 36px;
  border: 1px solid rgba(64,193,220,.2);
  border-radius: 5px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 5%, rgba(9,187,226,.23), transparent 30%),
    linear-gradient(135deg, #052d40, #073f58 62%, #062e41);
  box-shadow: 0 30px 70px -48px rgba(1,38,55,.75);
}

.account-command-grid {
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image:
    linear-gradient(rgba(81,211,238,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81,211,238,.12) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(100deg, transparent 5%, #000 70%);
  pointer-events: none;
}

.account-welcome {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.account-welcome .auth-kicker { color: #08bce5; }

.account-welcome h1{
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(29px, 2.75vw, 46px);
  line-height: 1.06;
  letter-spacing: -.015em;
}

.account-welcome p {
  max-width: 650px;
  margin: 16px 0 0;
  color: rgba(218,239,244,.72);
  font-size: 14px;
  line-height: 1.65;
}

.account-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(116,223,244,.24);
  border-radius: 5px;
  background: rgba(4,31,44,.5);
  color: #d8f5fb;
  font-size: 10px;
  font-weight: 850;
  text-transform: capitalize;
}

.account-role::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #31c69d;
  content: "";
}

.account-signal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(190px, .9fr);
  gap: 10px;
}

.account-signal-grid article,
.account-signal-grid > a {
  display: flex;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(117,213,232,.15);
  border-radius: 5px;
  align-items: center;
  gap: 12px;
  background: rgba(2,28,40,.46);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.account-signal-grid > a {
  display: grid;
  align-content: center;
  gap: 2px;
  border-color: rgba(81,220,248,.35);
  background: linear-gradient(135deg, rgba(8,188,229,.18), rgba(4,46,64,.55));
  transition: transform .2s ease, background .2s ease;
}

.account-signal-grid > a:hover { transform: translateY(-2px); background: rgba(8,188,229,.2); }
.account-signal-grid small { color: #70dff4; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.account-signal-grid strong { display: block; margin-top: 2px; font-size: 15px; }
.account-signal-grid p,
.account-signal-grid > a span { display: block; margin: 2px 0 0; color: rgba(211,235,241,.62); font-size: 9px; }

.account-signal-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border: 1px solid rgba(92,224,249,.25);
  border-radius: 5px;
  place-items: center;
  color: #6be5fa;
  background: rgba(8,188,229,.08);
  font-size: 14px;
}

.account-signal-icon i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d5a5;
  box-shadow: 0 0 0 6px rgba(53,213,165,.1), 0 0 18px #35d5a5;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr);
  gap: 20px;
}

.account-panel {
  overflow: hidden;
  border: 1px solid #d5e1e6;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 22px 60px -48px rgba(3,45,64,.55);
}

.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid #e2eaed;
}

.account-panel-head h2 {
  margin: 3px 0 0;
  color: var(--auth-navy);
  font-size: 18px;
}

.account-panel-kicker {
  color: #08bce5 !important;
  font-size: 8px !important;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.account-panel-head span {
  color: #78909a;
  font-size: 10px;
}

.account-empty {
  display: grid;
  min-height: 300px;
  padding: 42px;
  place-items: center;
  text-align: center;
}

.account-empty-icon {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 5px;
  background: #eaf8fc;
  color: #008eb6;
}

.account-empty-icon i,
.account-empty-icon b {
  position: absolute;
  border: 1px solid #06a9d0;
  content: "";
}

.account-empty-icon i {
  width: 23px;
  height: 23px;
  transform: rotate(45deg);
}

.account-empty-icon b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(8,183,223,.12);
}

.account-empty h3 { margin: 0; color: var(--auth-ink); font-size: 18px; }
.account-empty p { max-width: 410px; margin: 10px auto 22px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.account-empty-actions { display: flex; justify-content: center; gap: 8px; }

.account-action {
  display: inline-flex;
  min-height: 42px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd2db;
  border-radius: 5px;
  background: #fff;
  color: #075a78;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.account-action.primary { border-color: #075a78; background: #075a78; color: #fff; }

.account-side { display: grid; align-content: start; gap: 20px; }

.profile-card { padding: 24px; }

.profile-status-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: -3px 0 19px;
  color: #0790b5;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profile-status-line i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2bc89a;
  box-shadow: 0 0 0 5px rgba(43,200,154,.09);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.profile-top .profile-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin-top: 0;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(135deg, #0a4f75, #08a6ce);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.profile-top strong { display: block; font-size: 14px; }
.profile-top span { display: block; margin-top: 3px; color: var(--auth-muted); font-size: 10px; }

.profile-data {
  display: grid;
  gap: 14px;
  margin: 0;
}

.profile-data div { padding-bottom: 14px; border-bottom: 1px solid #e7edef; }
.profile-data div:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-data dt { color: #78909a; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.profile-data dd { margin: 4px 0 0; color: var(--auth-ink); font-size: 12px; overflow-wrap: anywhere; }

.account-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.account-quick a {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #d5e1e6;
  border-radius: 5px;
  background: #fff;
  color: var(--auth-ink);
  text-decoration: none;
  transition: transform .2s, border-color .2s;
}

.account-quick a::after {
  position: absolute;
  right: -30px;
  bottom: -52px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(8,183,223,.12);
  border-radius: 50%;
  content: "";
}

.account-quick a:hover { border-color: #7fd6e9; box-shadow: 0 18px 35px -28px rgba(4,66,91,.55); transform: translateY(-3px); }
.account-quick a > b { position: absolute; top: 14px; right: 15px; color: #c8d8de; font-size: 20px; letter-spacing: -.05em; }
.quick-pulse { display: block; width: 8px; height: 8px; margin-bottom: 15px; border-radius: 50%; background: #09b8df; box-shadow: 0 0 0 7px rgba(9,184,223,.08); }
.account-quick strong { display: block; font-size: 13px; }
.account-quick span { display: block; margin-top: 7px; color: var(--auth-muted); font-size: 10px; line-height: 1.5; }
.account-quick em { display: block; margin-top: 13px; color: #0783a8; font-size: 9px; font-style: normal; font-weight: 850; }

.account-signout {
  width: 100%;
  margin-top: 20px;
  color: #8b3440;
}

.account-side-signal {
  padding: 22px;
  border: 1px solid rgba(43,163,193,.2);
  border-radius: 5px;
  color: #dff4f8;
  background:
    linear-gradient(rgba(71,208,235,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71,208,235,.08) 1px, transparent 1px),
    #073449;
  background-size: 34px 34px;
}

.account-side-signal > span { color: #5bdcf5; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.account-side-signal strong { display: block; margin-top: 11px; color: #fff; font-size: 16px; line-height: 1.25; }
.account-side-signal p { margin: 9px 0 15px; color: rgba(211,237,242,.65); font-size: 10px; line-height: 1.55; }
.account-side-signal a { color: #65dff5; font-size: 9px; font-weight: 850; text-decoration: none; }

@keyframes accountOrbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding: 34px 30px 40px; }
  .auth-story-copy { margin: 50px 0 20px; padding: 0; }
  .auth-story h1 { max-width: 720px; }
  .auth-proof { max-width: 680px; }
  .auth-security-note { margin-top: 24px; }
  .auth-workspace { min-height: auto; padding: 74px 24px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-signal-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .auth-workspace { order: -1; min-height: 100vh; }
  .auth-story { padding: 26px 20px 30px; }
  .auth-story-copy { margin-top: 42px; }
  
  .auth-story-lede { font-size: 14px; }
  .auth-proof { grid-template-columns: 1fr; }
  .auth-proof div { min-height: 0; }
  .auth-workspace { padding: 62px 14px 42px; }
  .auth-home-link { top: 20px; right: 20px; }
  .auth-card { padding: 25px 20px; border-radius: 5px; }
  .auth-row { grid-template-columns: 1fr; }
  .account-main { width: min(calc(100% - 24px), 1240px); padding-top: 16px; }
  .account-command-hero { padding: 24px 20px; border-radius: 5px; }
  .account-welcome { display: block; }
  .account-role { margin-top: 18px; }
  .account-signal-grid { grid-template-columns: 1fr; }
  .account-empty { min-height: 260px; padding: 28px 20px; }
  .account-empty-actions { flex-direction: column; }
  .account-quick { grid-template-columns: 1fr; }
}
