/**
 * LUTHFRAME admin UI — monochrome (hi.luthframe.com)
 * Shared: maintenance.html + index.html Spotify override
 */
:root {
  --lf-black: #000000;
  --lf-gray-500: #777777;
  --lf-gray-300: #b8b8b8;
  --lf-gray-100: #e0e0e0;
  --lf-white: #ffffff;
  --lf-line: rgba(255, 255, 255, 0.12);
  --lf-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.lf-admin,
.lf-admin-login {
  font-family: 'DM Mono', ui-monospace, monospace;
  z-index: 100000;
}

/* Custom cursor z-index: set on #customCursor in index.html inline CSS */

/* ─── Floating panel (maintenance toggle) ─── */
.lf-admin {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: min(320px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  background: rgba(8, 8, 8, 0.92);
  border: 1px solid var(--lf-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: lfAdminFadeUp 0.4s var(--lf-ease) both;
}

/* ─── Centered overlay (login + Spotify) ─── */
.lf-admin-login {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Spotify panel on index.html — hidden until triple-tap */
#admin-panel.lf-admin-login {
  display: none;
}

#admin-panel.lf-admin-login.is-open {
  display: grid;
}

.lf-admin-login__box {
  width: min(360px, 100%);
  padding: 24px;
  background: rgba(8, 8, 8, 0.96);
  border: 1px solid var(--lf-line);
}

#admin-panel.is-open .lf-admin-login__box,
#lf-admin-login .lf-admin-login__box {
  animation: lfAdminFadeUp 0.4s var(--lf-ease) both;
}

/* Portfolio lock: separate enter anim so shake/success can override */
#password-modal.is-open #portfolio-lock-box {
  animation: lfPortfolioEnter 0.4s var(--lf-ease) forwards;
}

@keyframes lfPortfolioEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lf-admin-login__box--wide {
  width: min(400px, 100%);
}

.lf-admin__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lf-admin__label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lf-gray-300);
}

.lf-admin__close {
  border: 0;
  background: transparent;
  color: var(--lf-gray-300);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  font-family: inherit;
}

.lf-admin__close:hover {
  color: var(--lf-white);
}

.lf-admin__site {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-gray-500);
  margin-bottom: 6px;
}

.lf-admin__status {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-white);
  margin-bottom: 6px;
}

.lf-admin__status[data-state="on"] { color: var(--lf-white); }
.lf-admin__status[data-state="off"] { color: var(--lf-gray-300); }
.lf-admin__status[data-state="err"] { color: var(--lf-gray-500); }

.lf-admin__meta,
.lf-admin-login__copy,
.lf-admin__hint {
  font-size: 10px;
  line-height: 1.6;
  color: var(--lf-gray-500);
}

.lf-admin__meta { margin-bottom: 16px; }

.lf-admin__hint {
  margin-top: 12px;
  min-height: 1.6em;
  letter-spacing: 0.04em;
}

.lf-admin__hint[data-tone="ok"] { color: var(--lf-gray-100); }
.lf-admin__hint[data-tone="err"] { color: var(--lf-gray-300); }
.lf-admin__hint[data-tone="busy"] { color: var(--lf-gray-500); }

.lf-admin__bypass {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--lf-line);
  background: rgba(255, 255, 255, 0.04);
}

.lf-admin__bypass-text {
  margin: 0 0 8px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--lf-gray-100);
}

.lf-admin__bypass .lf-admin__btn { width: 100%; }

.lf-admin__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 16px;
}

.lf-admin__toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lf-admin__track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--lf-line);
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.lf-admin__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lf-white);
  transition: transform 0.25s var(--lf-ease);
}

.lf-admin__toggle input:checked + .lf-admin__track {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.lf-admin__toggle input:checked + .lf-admin__track::after {
  transform: translateX(20px);
}

.lf-admin__toggle-text {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-gray-100);
}

.lf-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lf-admin__btn {
  appearance: none;
  border: 1px solid var(--lf-line);
  background: var(--lf-white);
  color: var(--lf-black);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 14px;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.lf-admin__btn:hover { opacity: 0.88; }

.lf-admin__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lf-admin__btn--ghost {
  background: transparent;
  color: var(--lf-gray-100);
}

.lf-admin__field-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lf-gray-500);
  margin-bottom: 6px;
}

.lf-admin__field-label + .lf-admin-login__input {
  margin-top: 0;
}

.lf-admin__field + .lf-admin__field-label {
  margin-top: 14px;
}

.lf-admin-login__input {
  width: 100%;
  margin: 0 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--lf-line);
  background: rgba(0, 0, 0, 0.55);
  color: var(--lf-white);
  font-family: inherit;
  font-size: 12px;
  border-radius: 0;
}

.lf-admin-login__input::placeholder {
  color: var(--lf-gray-500);
}

.lf-admin-login__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.lf-admin-spotify[data-state="success"] {
  border-color: rgba(255, 255, 255, 0.35);
}

.lf-admin-spotify[data-state="error"] {
  border-color: rgba(255, 255, 255, 0.18);
}

.lf-admin-spotify__fields.is-hidden {
  display: none;
}

@keyframes lfAdminFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════
   Portfolio lock panel (index.html)
   Blends lf-admin shell + legacy FX classes
   ═══════════════════════════════════════════ */

#password-modal.lf-admin-login {
  display: none;
  z-index: 100001;
}

#password-modal.lf-admin-login.is-open {
  display: grid;
}

#password-modal.lf-admin-login[hidden] {
  display: none !important;
}

.lf-portfolio-lock.modal-content {
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease;
}

.lf-portfolio-lock.modal-content.panel-error {
  border-color: #ff4d4d !important;
}

.lf-portfolio-lock.modal-content.panel-success {
  border-color: #4ade80 !important;
}

.lf-portfolio-lock .lf-admin__site {
  margin-bottom: 18px;
  text-align: left;
}

.lf-portfolio-lock__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--lf-line);
}

.lf-portfolio-lock__hero h3 {
  margin: 0;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lf-white);
}

.lf-portfolio-lock__prompt {
  margin-bottom: 14px !important;
  text-align: center;
  line-height: 1.55;
}

.lf-portfolio-lock .lf-admin__field-label {
  text-align: left;
  margin-bottom: 8px;
}

.lf-portfolio-lock__input {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.18em;
  margin-bottom: 20px !important;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lf-portfolio-lock .lf-admin__actions {
  margin-top: 0;
}

.lf-portfolio-lock__input:focus {
  animation: lfPulseGlow 1.5s infinite;
}

.lf-portfolio-lock .icon-wrapper {
  display: inline-grid;
  place-items: center;
  font-size: 20px;
}

.lf-portfolio-lock .icon-locked,
.lf-portfolio-lock .icon-unlocked {
  grid-area: 1 / 1;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.lf-portfolio-lock .icon-unlocked {
  opacity: 0;
  transform: scale(0.5);
}

.lf-portfolio-lock.modal-content.panel-success .icon-locked {
  opacity: 0;
  transform: scale(0.5);
}

.lf-portfolio-lock.modal-content.panel-success .icon-unlocked {
  opacity: 1;
  transform: scale(1);
}

.lf-portfolio-lock .custom-modal-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* ─── Preserved motion FX (monochrome palette) ─── */

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

#password-modal.is-open #portfolio-lock-box.shake-animation {
  animation: lfShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

#password-modal.is-open #portfolio-lock-box.success-anim {
  animation: none;
  transform: scale(1.1) !important;
  opacity: 0 !important;
  transition: all 0.4s var(--lf-ease);
}

@keyframes lfPulseGlow {
  0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.05); }
  50% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.22); }
  100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.05); }
}

@keyframes lfBlinkWhite {
  0%, 100% {
    background: rgba(0, 0, 0, 0.55);
    border-color: var(--lf-line);
  }
  50% {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--lf-white);
  }
}

@keyframes lfBlinkErr {
  0%, 100% {
    background: rgba(0, 0, 0, 0.55);
    border-color: var(--lf-line);
  }
  50% {
    background: rgba(255, 77, 77, 0.2);
    border-color: #ff4d4d;
  }
}

@keyframes lfBlinkOk {
  0% {
    background: rgba(0, 0, 0, 0.55);
    border-color: var(--lf-line);
  }
  50% {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
  }
  100% {
    background: rgba(0, 0, 0, 0.55);
    border-color: #4ade80;
  }
}

.lf-portfolio-lock__input.input-blink-initial {
  animation: lfBlinkWhite 0.2s 3 !important;
}

.lf-portfolio-lock__input.input-blink-error {
  animation: lfBlinkErr 0.2s 2 !important;
  border-color: #ff4d4d !important;
}

.lf-portfolio-lock__input.input-blink-success {
  animation: lfBlinkOk 0.2s 2 forwards !important;
  border-color: #4ade80 !important;
}

.lf-portfolio-lock #error-msg {
  display: none;
  margin: 14px 0 0;
  min-height: 1.6em;
  font-size: 10px;
  font-family: 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: #ff4d4d;
  text-transform: uppercase;
  text-align: center;
}
