.login-shell {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 22px;
  display: grid;
  place-items: center;
  background: var(--desk);
  font-family: Archivo, sans-serif;
  transition: background .25s;
}

.login-frame {
  position: relative;
  width: 100%;
  max-width: 940px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 58%, var(--panel-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -3px 10px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .32);
  overflow: hidden;
}

.screw {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #bbb8b2, #5f5c58 72%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), 0 1px 2px rgba(0, 0, 0, .45);
  z-index: 2;
}

.screw-tl { top: 9px; left: 10px; }
.screw-tr { top: 9px; right: 10px; }
.screw-bl { bottom: 9px; left: 10px; }
.screw-br { bottom: 9px; right: 10px; }

.login-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 26px;
  border-bottom: 1px solid rgba(0, 0, 0, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .28);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 70%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 20px;
  border-right: 1px solid rgba(0, 0, 0, .22);
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: linear-gradient(180deg, #33312e, #141312);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 6px rgba(0, 0, 0, .4);
  display: grid;
  place-items: center;
}

.brand-led {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px 2px rgba(242, 73, 13, .8), inset 0 -2px 3px rgba(0, 0, 0, .45);
  animation: blink 2.4s infinite;
}

.brand-copy h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
}

.brand-copy p {
  margin: 2px 0 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.6px;
  color: var(--engrave);
}

.head-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: var(--engrave);
}

.head-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px 1px rgba(228, 218, 30, .7), inset 0 -1px 2px rgba(0, 0, 0, .4);
}

.theme-toggle {
  width: 46px;
  height: 24px;
  flex: none;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  padding: 3px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .12));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3);
  display: flex;
  justify-content: flex-start;
}

:root[data-theme="dark"] .theme-toggle {
  justify-content: flex-end;
}

.theme-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--cap-hi), var(--cap));
  box-shadow: 0 2px 3px rgba(0, 0, 0, .45), inset 0 1px 0 #fff;
}

.login-body {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  align-items: stretch;
}

.login-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 18px;
  border-right: 1px solid rgba(0, 0, 0, .22);
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .04));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .18);
}

.rail-label {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.6px;
  color: var(--engrave);
}

.rail-leds {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rail-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}

.rail-led.is-on {
  background: var(--orange);
  box-shadow: 0 0 8px 1px rgba(242, 73, 13, .7), inset 0 -1px 2px rgba(0, 0, 0, .4);
}

.rail-led.is-warm {
  background: var(--yellow);
  box-shadow: 0 0 7px 1px rgba(228, 218, 30, .6), inset 0 -1px 2px rgba(0, 0, 0, .4);
}

.rail-knob {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 4px auto;
  background: radial-gradient(circle at 36% 26%, #dcd9d2, #8b8883 60%, #55524e);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5), inset 0 -4px 8px rgba(0, 0, 0, .35), 0 4px 9px rgba(0, 0, 0, .38);
  display: grid;
  place-items: center;
  transform: rotate(-46deg);
}

.rail-knob-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #413e3a;
  box-shadow: 0 15px 0 -2px #6d6a66;
}

.rail-code {
  margin: 0;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--engrave);
}

.rail-meter {
  width: 100%;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .14));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.rail-meter-fill {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.rail-foot {
  margin: auto 0 0;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1.6;
  color: var(--engrave);
}

.login-panel {
  padding: 28px 30px 32px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(0, 0, 0, .22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}

.panel-code {
  margin: 0 0 3px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--engrave);
}

.panel-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}

.panel-clock {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--engrave);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--engrave);
}

.field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 0;
  border-radius: 7px;
  outline: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .26), rgba(0, 0, 0, .1));
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--ink);
  transition: box-shadow .15s;
}

.field input::placeholder {
  color: var(--engrave);
  opacity: .7;
}

.field input:focus {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45), 0 0 0 1px var(--orange);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 62px;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 5px 9px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, .3);
  cursor: pointer;
  background: linear-gradient(180deg, var(--cap-hi), var(--cap));
  box-shadow: inset 0 1px 0 #fff, 0 2px 3px rgba(0, 0, 0, .28);
  color: #2b2a28;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.reveal:active {
  transform: translateY(-50%) translateY(1px);
}

.form-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 14px;
}

.meta-led {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}

.meta-led.is-error {
  background: var(--orange);
  box-shadow: 0 0 9px 1px rgba(242, 73, 13, .8), inset 0 -1px 2px rgba(0, 0, 0, .4);
  animation: blink 1s infinite;
}

.meta-led.is-ok {
  background: var(--yellow);
  box-shadow: 0 0 9px 1px rgba(228, 218, 30, .8), inset 0 -1px 2px rgba(0, 0, 0, .4);
}

.meta-text {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--engrave);
}

.meta-text.is-error {
  color: var(--orange);
}

.meta-text.is-ok {
  color: var(--yellow);
}

.submit {
  margin-top: 2px;
  padding: 13px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, .3);
  cursor: pointer;
  background: linear-gradient(180deg, #ff7a43, var(--orange));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 6px rgba(0, 0, 0, .32);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.2px;
  transition: filter .15s;
}

.submit:hover {
  filter: brightness(1.07);
}

.submit:active {
  transform: translateY(1px);
}

.submit:disabled {
  cursor: default;
  filter: saturate(.6);
  opacity: .75;
}

.hint {
  margin: 0;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--engrave);
}

.hint b {
  color: var(--ink);
  font-weight: 600;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 26px;
  border-top: 1px solid rgba(0, 0, 0, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--engrave);
}

.login-form.shake {
  animation: shake .32s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 720px) {
  .login-head {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
  }

  .brand {
    border-right: 0;
    padding-right: 0;
  }

  .head-status {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .login-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-rail {
    display: none;
  }

  .login-panel {
    padding: 22px 20px 26px;
  }

  .panel-head h2 {
    font-size: 22px;
  }

  .login-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 20px;
  }
}
