/* ============================================================
   viibeware Admin Panel Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500&display=swap');

:root {
  --cyan: #00F2FF;
  --purple: #AF00FF;
  --bg-deep: #06060e;
  --bg-card: #0c0c1a;
  --border: #1a1a3e;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 0;
}

.admin-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-header h1 em { font-style: normal; color: var(--cyan); }

.admin-header nav { display: flex; gap: 1rem; align-items: center; }

.admin-header a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.admin-header a:hover { color: var(--cyan); background: rgba(0,242,255,0.08); }

.admin-body {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Section cards */
.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.admin-section-header:hover { background: rgba(255,255,255,0.02); }

.admin-section-header h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cyan);
}

.admin-section-header .toggle {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.3s;
}

.admin-section-body {
  padding: 1.5rem;
  display: none;
}

.admin-section-body.open { display: block; }

/* Form elements */
label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  background: #0a0a18;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 120px;
  resize: vertical;
}

.btn-save {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  transition: all 0.2s;
}

.btn-save:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(0,242,255,0.3); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) { .field-row { grid-template-columns: 1fr; } }

/* Flash messages */
.flash {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid;
}

.flash.success {
  background: rgba(0,230,118,0.08);
  border-color: rgba(0,230,118,0.3);
  color: #00e676;
}

.flash.error {
  background: rgba(255,82,82,0.08);
  border-color: rgba(255,82,82,0.3);
  color: #ff5252;
}

/* Login page */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.login-box h2 em { font-style: normal; color: var(--cyan); }

.login-box .btn-save { width: 100%; padding: 0.8rem; font-size: 0.9rem; }

/* Raw editor */
.raw-editor {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-height: 600px;
  line-height: 1.5;
  tab-size: 2;
}

/* Status toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,242,255,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast.show { transform: translateY(0); opacity: 1; }
