/* ==========================================================================
   TRIO MERAK — Premium Cyber-Dark Design System (Login & Admin Panel)
   ========================================================================== */

:root {
  --bg-base: #070a13;
  --bg-surface: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(11, 17, 32, 0.85);
  --bg-input: rgba(3, 7, 18, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.5);
  --border-card: rgba(148, 163, 184, 0.14);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-blue: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-indigo: #818cf8;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-lg: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(14, 165, 233, 0.05);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 24px 16px;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

/* --- Ambient Glowing Orbs --- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

.orb-a {
  width: 380px;
  height: 380px;
  background: rgba(14, 165, 233, 0.15);
  top: -80px;
  left: -80px;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: rgba(168, 85, 247, 0.12);
  bottom: -100px;
  right: -100px;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  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: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* --- Main Layout Shell --- */
.shell {
  width: 100%;
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.auth-shell {
  width: 100%;
}

.auth-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-indigo), transparent);
}

/* --- Brand Header --- */
.auth-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.25));
}

.brand-title span {
  -webkit-text-fill-color: initial;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* Creator & EVM Badge Capsule */
.creator-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin: 10px auto 22px auto;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  max-width: 100%;
  box-sizing: border-box;
}

.creator-capsule span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-capsule .copy-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.creator-capsule .copy-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* --- Modern Segmented Tabs --- */
.auth-tabs {
  display: flex;
  background: rgba(2, 6, 23, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.auth-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(129, 140, 248, 0.2) 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* --- Form Elements --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form.hidden {
  display: none !important;
}

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

.field span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(3, 7, 18, 0.9);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

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

.password-wrap .ghost-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.password-wrap .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* --- Buttons --- */
.primary-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
  transition: all 0.25s ease;
  text-align: center;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.5);
  filter: brightness(1.08);
}

.primary-btn:active {
  transform: translateY(0);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

/* --- Admin Panel Aesthetics --- */
.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.admin-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.admin-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Responsive */
@media (max-width: 640px) {
  .auth-panel {
    padding: 24px 18px;
  }
  
  .brand-title {
    font-size: 1.8rem;
  }
  
  .admin-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
