:root {
  --charcoal-top: #636168;
  --charcoal: #54525a;
  --charcoal-dark: #3e3c44;
  --charcoal-deep: #2c2a32;
  --gold: #f0a500;
  --gold-lt: #ffb820;
  --gold-dk: #c88400;
  --lavender: #eeeef6;
  --text-dark: #1f2a44;
  --text-mid: #54525a;
  --text-muted: #8a8898;
  --btn-bg: #f0f0fa;
  --btn-border: #96a0b4;
  --input-bg: #fffde8;
  --input-border: #c8c4a0;
  --input-focus: #a89e40;
  --error-bg: #fff2f2;
  --error-border: rgba(180, 84, 84, 0.28);
  --error-text: #8a2f2f;
  --success-bg: #eef8f2;
  --success-border: rgba(56, 126, 89, 0.22);
  --success-text: #255f44;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body.login-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--lavender);
  font-family: "Lato", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text-dark);
}

.menubar {
  flex-shrink: 0;
  height: 30px;
  background: linear-gradient(180deg, var(--charcoal-top) 0%, var(--charcoal) 100%);
  border-bottom: 2.5px solid var(--gold);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 0;
  user-select: none;
  position: relative;
  z-index: 100;
}

.menu-item {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: default;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.menu-item .ul {
  text-decoration: underline;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menubar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.win-ctrl {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  cursor: default;
  border-radius: 2px;
  transition: background 0.15s;
}

.win-ctrl:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.menubar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
  margin-left: 6px;
}

.m-logo {
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: 0.08em;
}

.m-sub {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.desktop {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #dcdce8 0%, #eeeef6 50%, #e4e4ee 100%);
}

.desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(80, 78, 100, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 78, 100, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.window {
  width: 640px;
  max-width: calc(100vw - 32px);
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(60, 58, 68, 0.32),
    0 4px 14px rgba(0, 0, 0, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: winDrop 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes winDrop {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.titlebar {
  height: 28px;
  background: linear-gradient(180deg, var(--charcoal-top) 0%, var(--charcoal) 100%);
  border-bottom: 2.5px solid var(--gold);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
  user-select: none;
}

.titlebar-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.titlebar-label {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}

.protected-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5dd88a;
  text-transform: uppercase;
}

.protected-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5dd88a;
  box-shadow: 0 0 5px #5dd88a;
}

.win-body {
  display: flex;
  min-height: 368px;
}

.panel-left {
  width: 200px;
  flex-shrink: 0;
  background: linear-gradient(170deg, var(--charcoal-deep) 0%, var(--charcoal-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.panel-left::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.panel-left::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.edge-line {
  position: absolute;
  top: 15%;
  right: 0;
  bottom: 15%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 40%, var(--gold) 60%, transparent 100%);
  opacity: 0.5;
}

.watermark {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dk), transparent);
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.logo-icon {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at 35% 30%, var(--gold-lt), var(--gold-dk));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(240, 165, 0, 0.15),
    0 0 0 8px rgba(240, 165, 0, 0.06),
    0 6px 20px rgba(0, 0, 0, 0.5);
}

.logo-icon-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.logo-name {
  font-family: "Cinzel", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: 0.1em;
}

.logo-sub {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.divider-gold {
  width: 36px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  z-index: 1;
}

.panel-tagline {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
  line-height: 1.9;
  z-index: 1;
  letter-spacing: 0.02em;
}

.company-badge {
  position: absolute;
  bottom: 9px;
  font-size: 7.5px;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.16);
  text-transform: uppercase;
  z-index: 1;
  text-align: center;
  padding: 0 10px;
}

.panel-right {
  flex: 1;
  background: var(--lavender);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 30px;
}

.form-header {
  margin-bottom: 18px;
}

.form-header h2 {
  font-family: "Cinzel", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.04em;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  margin-bottom: 5px;
}

.form-header p {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.login-alert {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 10.5px;
  line-height: 1.45;
}

.login-alert--error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.login-alert--success,
.login-alert--info {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.login-form {
  display: flex;
  flex-direction: column;
}

.field {
  display: flex;
  align-items: flex-start;
  margin-bottom: 9px;
}

.field label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  width: 96px;
  flex-shrink: 0;
  padding-top: 7px;
}

.field label .req {
  color: var(--gold-dk);
  margin-left: 2px;
}

.field-control {
  flex: 1;
  min-width: 0;
}

.field input,
.field select,
.field .auth-control {
  width: 100%;
  flex: 1;
  min-width: 0;
  height: 25px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 2px;
  font-family: "Lato", "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  color: var(--text-dark);
  padding: 0 7px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input:focus,
.field select:focus,
.field .auth-control:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 2px rgba(240, 165, 0, 0.18);
  background: #fffef0;
}

.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 26px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-mid) 50%),
    linear-gradient(135deg, var(--text-mid) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pw-wrap {
  position: relative;
  display: flex;
}

.pw-wrap input,
.pw-wrap .auth-control {
  width: 100%;
  padding-right: 42px;
}

.show-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0 8px;
  background: none;
  border: none;
  border-left: 1px solid var(--input-border);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
}

.show-btn:hover {
  color: var(--gold-dk);
}

.login-form-errors {
  margin-top: 6px;
  margin-bottom: 0;
}

.remember-row {
  display: flex;
  align-items: center;
  margin-left: 96px;
  margin-bottom: 14px;
  margin-top: 2px;
  gap: 7px;
}

.remember-row input[type="checkbox"] {
  accent-color: var(--gold);
  width: 12px;
  height: 12px;
}

.remember-row label {
  width: auto;
  padding-top: 0;
  font-size: 10.5px;
  color: var(--text-mid);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.btn-row {
  display: flex;
  gap: 6px;
  margin-left: 96px;
}

.btn {
  height: 25px;
  padding: 0 14px;
  border-radius: 2px;
  font-family: "Lato", "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--text-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background 0.12s, border-color 0.12s, transform 0.12s, box-shadow 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: #e4e4f4;
  border-color: #7a8aa0;
}

.btn:active {
  background: #d8d8ee;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  transform: translateY(1px);
}

.btn-ok {
  background: var(--charcoal-dark);
  border-color: var(--charcoal-deep);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.25);
}

.btn-ok:hover {
  background: var(--charcoal-deep);
  border-color: #232128;
}

.auth-row {
  display: flex;
  align-items: center;
  margin-left: 96px;
  margin-top: 12px;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-row span {
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.auth-row a {
  font-size: 9.5px;
  color: var(--gold-dk);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-row a:hover {
  text-decoration: underline;
}

.statusbar {
  flex-shrink: 0;
  height: 26px;
  background: linear-gradient(180deg, var(--charcoal) 0%, var(--charcoal-dark) 100%);
  border-top: 2px solid var(--gold);
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.status-seg {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  padding: 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
}

.status-seg.gold {
  color: var(--gold-lt);
}

.status-mid {
  flex: 1;
  text-align: center;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-lt);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body.login-body {
    overflow: auto;
  }

  .desktop {
    padding: 18px 12px;
  }

  .window {
    width: 100%;
    max-width: 560px;
  }

  .win-body {
    flex-direction: column;
  }

  .panel-left {
    width: 100%;
    min-height: 188px;
    padding: 22px 18px 28px;
  }

  .edge-line {
    top: auto;
    right: 15%;
    left: 15%;
    bottom: 0;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 40%, var(--gold) 60%, transparent 100%);
  }

  .panel-right {
    padding: 22px 18px 24px;
  }
}

@media (max-width: 560px) {
  .menubar {
    padding: 0 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .menubar::-webkit-scrollbar {
    display: none;
  }

  .menu-item {
    flex: 0 0 auto;
    padding: 0 8px;
  }

  .menubar-brand {
    display: none;
  }

  .titlebar {
    gap: 6px;
    padding: 0 8px;
  }

  .titlebar-label {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .protected-badge {
    display: none;
  }

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

  .field label {
    width: auto;
    padding-top: 0;
  }

  .remember-row,
  .btn-row,
  .auth-row {
    margin-left: 0;
  }

  .btn-row {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1 1 100%;
  }

  .statusbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 26px;
  }

  .status-seg,
  .status-brand,
  .status-mid {
    min-height: 26px;
  }

  .status-mid {
    order: 10;
    width: 100%;
    padding: 4px 10px 6px;
    white-space: normal;
  }
}
