.control-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0, rgba(91, 28, 144, 0.34), transparent 58%),
    var(--dark);
}

.control-nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(25, 6, 43, 0.84);
}

.fee-settings-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fee-settings-nav form {
  margin: 0;
}

.fee-settings-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.fee-setting-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 202, 40, 0.28);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(91, 28, 144, 0.74), rgba(35, 10, 55, 0.96));
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15px;
  transition:
    transform 0.18s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.fee-setting-button:hover,
.fee-setting-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 225, 130, 0.9);
  background: linear-gradient(145deg, #ffe17c, #ffca28);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 202, 40, 0.1);
  color: #261331;
}

.fee-setting-button:focus-visible {
  outline: 2px solid #ffdf71;
  outline-offset: 3px;
}

.name-save-button {
  background: linear-gradient(145deg, #ffdf71, #f3a927);
  color: #261331;
}

.control-main {
  flex: 1;
  width: min(1050px, calc(100% - 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  margin: 0 auto;
  padding: 28px 0;
}

.control-eyebrow {
  color: #ffca28;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(850px, 100%);
}

.scenario-button {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.scenario-success {
  background: linear-gradient(135deg, #14834f, #0d5f3b);
}

.scenario-failed {
  background: linear-gradient(135deg, #bd3b48, #812332);
}

.scenario-gold {
  background: linear-gradient(135deg, #ba8617, #77500a);
}

.scenario-gmail {
  background: linear-gradient(135deg, #316bc4, #204782);
}

.scenario-sync {
  background: linear-gradient(135deg, #7044bc, #472c7e);
}

.scenario-deployment {
  background: linear-gradient(135deg, #b95d2c, #783616);
}

.scenario-button:hover,
.scenario-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.control-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(9, 3, 17, 0.78);
  backdrop-filter: blur(5px);
}

.control-modal.visible {
  display: flex;
}

.control-modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  background: linear-gradient(145deg, #351154, #210834);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.control-modal-card h2 {
  margin: 7px 32px 5px 0;
  font-size: 27px;
}

.settings-description {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  line-height: 1.45;
}

.control-modal-close {
  position: absolute;
  top: 14px;
  right: 15px;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.settings-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.settings-field input {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  outline: none;
  background: rgba(12, 3, 21, 0.48);
  color: #fff;
  font-size: 15px;
}

.settings-field input:focus {
  border-color: #ffca28;
  box-shadow: 0 0 0 3px rgba(255,  202, 40, 0.12);
}

.settings-field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.settings-feedback {
  min-height: 20px;
  margin-top: 12px;
  color: #78e7a5;
  font-size: 13px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.settings-cancel,
.yellow-glass-btn.settings-save {
  width: auto;
  min-width: 112px;
  height: 42px;
  margin: 0;
  padding: 0 15px;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
}

.settings-cancel {
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.control-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 202, 40, 0.35);
  border-radius: 8px;
  background: #351054;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.control-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.pack-admin-panel {
  width: min(850px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(35, 10, 55, 0.82);
}

.pack-admin-panel h2 {
  margin: 0 0 14px;
}

.pack-message {
  color: #ffda69;
}

.pack-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-bottom: 14px;
}

.pack-add-form input {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(17, 3, 29, 0.5);
  color: #fff;
}

.pack-admin-list {
  display: grid;
  gap: 6px;
}

.pack-admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pack-admin-row form {
  margin: 0;
}

.pack-delete-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: #a52d3a;
  color: #fff;
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(91, 28, 144, 0.34), transparent 58%),
    var(--dark);
}

.login-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: linear-gradient(145deg, #351154, #210834);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.login-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.login-card h1 {
  margin: 8px 0 18px;
  font-size: 30px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.login-card label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(17, 3, 29, 0.5);
  color: #fff;
}

.login-submit {
  min-height: 46px;
  margin-top: 15px;
  border: 0;
  border-radius: 8px;
  background: #ffca28;
  color: #1a1a1a;
  cursor: pointer;
  font-weight: 700;
}

.login-error {
  color: #ffd1d1;
}

@media (max-width: 920px) {
  .control-nav {
    align-items: center;
  }

  .fee-settings-nav {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .control-nav {
    padding: 12px;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .scenario-button {
    min-height: 76px;
    padding: 14px;
  }

  .control-modal-card {
    padding: 25px 20px;
  }

  .settings-actions {
    flex-direction: column-reverse;
  }

  .settings-cancel,
  .yellow-glass-btn.settings-save {
    width: 100%;
  }

  .pack-add-form {
    grid-template-columns: 1fr;
  }

  .pack-admin-row {
    grid-template-columns: 1fr 1fr;
  }
}
