/*
 * BandMaster Admin v3.0 — Login Page
 * Deep Purple Theme
 */

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

@font-face {
  font-family: 'NanumBarunGothic';
  src: url('../fonts/NanumBarunGothic.eot');
  src: url('../fonts/NanumBarunGothic.eot?#iefix') format('embedded-opentype'),
       url('../fonts/NanumBarunGothic.woff') format('woff'),
       url('../fonts/NanumBarunGothic.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'NanumBarunGothic';
  src: url('../fonts/NanumBarunGothicBold.eot');
  src: url('../fonts/NanumBarunGothicBold.eot?#iefix') format('embedded-opentype'),
       url('../fonts/NanumBarunGothicBold.woff') format('woff'),
       url('../fonts/NanumBarunGothicBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-deep: #110c1f;
  --bg-surface: #17112b;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-active: rgba(167, 139, 250, 0.4);
  --text-primary: #ede9f6;
  --text-secondary: #9087a8;
  --text-muted: #564b6e;
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.08);
  --green: #34d399;
  --red: #f87171;
  --gradient-1: #a78bfa;
  --gradient-2: #f472b6;
}

html, body {
  min-height: 100vh;
  font-family: 'NanumBarunGothic', 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   ANIMATED BACKGROUND
   ================================================================ */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
}
.bg-orb:nth-child(1) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--gradient-1), transparent 70%);
  top: -10%; left: -5%; animation-duration: 25s;
}
.bg-orb:nth-child(2) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--gradient-2), transparent 70%);
  bottom: -15%; right: -5%; animation-duration: 30s; animation-delay: -5s;
}
.bg-orb:nth-child(3) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #c084fc, transparent 70%);
  top: 50%; left: 60%; animation-duration: 22s; animation-delay: -10s; opacity: 0.15;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 35px) scale(1.02); }
}
.bg-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 100%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ================================================================
   CENTER WRAP
   ================================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; z-index: 10;
}

/* ================================================================
   MAIN CARD — 2 Panel Layout
   ================================================================ */
.login-card-main {
  width: 920px; height: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================================================
   LEFT PANEL — Info / Branding
   ================================================================ */
.panel-info {
  flex: 5.5;
  display: flex; flex-direction: column;
  padding: 36px 32px;
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
}

.panel-info-header { margin-bottom: 28px; flex-shrink: 0; }
.panel-info-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 6px;
}
.panel-info-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 24px rgba(167, 139, 250, 0.2);
}
.panel-info-logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.03em;
}
.panel-info-sub {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px; letter-spacing: 0.02em;
}

/* Info Content Area */
.info-content {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.info-feature {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.25s;
}
.info-feature:hover {
  background: rgba(167,139,250,0.04);
  border-color: rgba(167,139,250,0.1);
}
.info-feature-icon {
  width: 38px; height: 38px; min-width: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.info-feature-icon.purple { background: rgba(192,132,252,0.1); }
.info-feature-icon.pink { background: rgba(244,114,182,0.1); }
.info-feature-icon.green { background: rgba(52,211,153,0.1); }
.info-feature-text h3 {
  font-size: 13px; font-weight: 600; margin-bottom: 3px;
  font-family: 'Outfit', sans-serif;
}
.info-feature-text p {
  font-size: 11px; color: var(--text-secondary); line-height: 1.5;
}

/* Server Status */
.server-status-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  background: rgba(52,211,153,0.05);
  border: 1px solid rgba(52,211,153,0.1);
  margin-top: 8px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}
.server-status-bar span {
  font-size: 12px; color: var(--green); font-weight: 500;
}
.server-status-bar .server-version {
  margin-left: auto; font-size: 10px; color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

/* ================================================================
   RIGHT PANEL — Login Form
   ================================================================ */
.panel-login {
  flex: 4.5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 36px 32px;
  position: relative;
  background: rgba(255, 255, 255, 0.01);
}

/* Login Inner */
.login-inner { width: 100%; max-width: 280px; }

/* Logo */
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon {
  width: 50px; height: 50px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.25);
  animation: logoGlow 3s ease-in-out infinite alternate;
}
@keyframes logoGlow {
  from { box-shadow: 0 8px 32px rgba(167, 139, 250, 0.2); }
  to { box-shadow: 0 8px 40px rgba(167, 139, 250, 0.35); }
}
.login-logo h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.03em;
}
.login-logo p {
  font-size: 12px; color: var(--text-muted); margin-top: 4px;
}

/* Form */
.login-form { display: flex; flex-direction: column; gap: 14px; }

.form-group { position: relative; }
.form-group label {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-icon {
  position: absolute; left: 12px; bottom: 11px;
  width: 16px; height: 16px; color: var(--text-muted);
  pointer-events: none; transition: color 0.25s;
}
.form-input {
  width: 100%; padding: 11px 12px 11px 38px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px; font-family: 'NanumBarunGothic', sans-serif;
  outline: none; transition: all 0.3s;
}
.form-input:focus {
  border-color: rgba(167,139,250,0.5);
  background: rgba(167,139,250,0.04);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.1);
}
.form-input:focus ~ .form-icon,
.form-input:focus + .form-icon { color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

/* Remember Me */
.form-options {
  display: flex; align-items: center; margin-top: 2px;
}
.remember-me {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 12px; color: var(--text-secondary);
}
.remember-me input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  cursor: pointer; position: relative;
  transition: all 0.2s;
}
.remember-me input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.remember-me input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid white; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Submit Button */
.login-btn {
  width: 100%; padding: 12px;
  margin-top: 6px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white; font-size: 14px; font-weight: 600;
  font-family: 'NanumBarunGothic', sans-serif;
  cursor: pointer; transition: all 0.3s;
  position: relative; overflow: hidden;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(167,139,250,0.35);
}
.login-btn:active { transform: translateY(0); }
.login-btn.loading { pointer-events: none; opacity: 0.8; }
.login-btn.loading .btn-text { opacity: 0; }
.login-btn.loading .btn-spinner { opacity: 1; }

.btn-text { transition: opacity 0.2s; }
.btn-spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.btn-spinner::after {
  content: ''; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error Message */
.login-error {
  display: none; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 9px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.15);
  color: var(--red); font-size: 12px;
  animation: shakeIn 0.4s ease;
  margin-bottom: 20px;
}
.login-error.show { display: flex; }
.login-error svg {
  width: 14px; height: 14px; min-width: 14px;
  stroke: var(--red); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes shakeIn {
  0% { transform: translateX(-8px); opacity: 0; }
  40% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
  100% { transform: translateX(0); opacity: 1; }
}

/* Footer */
.login-footer {
  margin-top: 24px; text-align: center;
}
.login-footer p {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.02em;
}
