/* ====================================================================
   BioLink Studio - Modern Minimalist & Performant CSS System
   Target: Single CSS file, zero external CSS frameworks
   ==================================================================== */

:root {
  --bg-theme: linear-gradient(135deg, #0f172a, #1e1b4b);
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-border: rgba(255, 255, 255, 0.18);
  --btn-radius: 12px;
  --text-color: #ffffff;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Admin Theme Variables */
  --admin-bg: #090d16;
  --admin-surface: #111827;
  --admin-surface-hover: #1f2937;
  --admin-border: #1e293b;
  --admin-border-focus: #3b82f6;
  --admin-text: #f8fafc;
  --admin-text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ================= Link Animation Keyframes ================= */
@keyframes animPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes animGlow {
  0%, 100% {
    box-shadow: 0 0 22px rgba(124, 58, 237, 0.38), 0 0 44px rgba(99, 102, 241, 0.2);
    border-color: rgba(139, 92, 246, 0.55);
  }
  50% {
    box-shadow: 0 0 32px rgba(147, 51, 234, 0.6), 0 0 65px rgba(124, 58, 237, 0.32);
    border-color: rgba(168, 85, 247, 0.85);
  }
}

@keyframes animBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-7px); }
  60% { transform: translateY(-3px); }
}

.anim-pulse {
  animation: animPulse 2.2s infinite ease-in-out;
}

.anim-glow {
  animation: animGlow 2.5s infinite ease-in-out;
}

.anim-bounce {
  animation: animBounce 2.5s infinite ease-in-out;
}

/* ================= PUBLIC VIEW CONTAINER ================= */
.public-container {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-theme);
  font-family: var(--font-family);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3rem 1.25rem 2rem;
  transition: background 0.3s ease;
}

.public-container .bio-phone-content {
  width: 100%;
  max-width: 580px;
}

.public-footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
}

.powered-by {
  display: inline-block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.powered-by:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ================= BIO CARD & PROFILE PREVIEW ================= */
.bio-phone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  font-family: var(--font-family);
  color: var(--text-color);
}

.bio-avatar-wrapper {
  margin-bottom: 1.25rem;
  position: relative;
}

.bio-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: block;
}

.bio-name {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.bio-description {
  font-size: 1.05rem;
  opacity: 0.95;
  text-align: center;
  max-width: 520px;
  margin-bottom: 1.65rem;
  line-height: 1.55;
  color: #e2e8f0;
  font-weight: 500;
}

/* ================= Social Icons Bar ================= */
.bio-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.bio-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bio-social-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

.bio-social-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ================= PUBLIC & PREVIEW LINKS ================= */
.bio-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  width: 100%;
}

.bio-link-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 0.75rem 1.15rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.bio-link-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
}

.bio-link-item:active {
  transform: translateY(1px);
}

.bio-link-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #cbd5e1;
  transition: background 0.2s ease, color 0.2s ease;
}

.bio-link-item:hover .bio-link-icon-box {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.bio-link-icon-box svg {
  width: 22px;
  height: 22px;
  display: block;
}

.bio-link-text {
  flex: 1;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bio-link-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bio-link-badge {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  white-space: nowrap;
}

.bio-link-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.bio-link-item:hover .bio-link-arrow {
  transform: translateX(3px);
  color: #ffffff;
}

.bio-link-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ================= Button Styles ================= */
/* Glass */
.button-style-glass .bio-link-item {
  background: var(--btn-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--btn-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.button-style-glass .bio-link-item:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Pill */
.button-style-pill .bio-link-item {
  border-radius: 9999px !important;
  background: var(--btn-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--btn-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.button-style-pill .bio-link-item:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Neo Brutalist */
.button-style-neo .bio-link-item {
  border-radius: 6px !important;
  background: #ffffff;
  color: #0f172a !important;
  border: 2px solid #0f172a;
  box-shadow: 4px 4px 0px #0f172a;
}
.button-style-neo .bio-link-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #0f172a;
}
.button-style-neo .bio-link-item:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0f172a;
}
.button-style-neo .bio-link-badge {
  background: #0f172a;
  color: #fff;
}

/* Minimal */
.button-style-minimal .bio-link-item {
  border-radius: 4px !important;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}
.button-style-minimal .bio-link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ================= ADMIN INTERFACE LAYOUT ================= */
.admin-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--admin-bg);
}

/* Navbar */
.admin-navbar {
  height: 60px;
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.35rem;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge-status {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-only-btn {
  display: none;
}

/* Main Body: Two-Column */
.admin-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* Left Pane */
.admin-pane {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
  border-right: 1px solid var(--admin-border);
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--admin-text);
  background: var(--admin-surface-hover);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.text-muted {
  color: var(--admin-text-muted);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 {
  flex: 1;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

input[type="text"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: #0a0f1d;
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.18s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--admin-border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--admin-surface-hover);
  color: #cbd5e1;
  border: 1px solid var(--admin-border);
}
.btn-secondary:hover {
  background: #334155;
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ================= Links Management Editor ================= */
.links-draggable-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-editor-item {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.link-editor-item:hover {
  border-color: #334155;
}

.link-drag-handle {
  cursor: grab;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
}

.link-drag-handle:active {
  cursor: grabbing;
}

.link-drag-handle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.link-item-info {
  flex: 1;
  min-width: 0;
}

.link-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.link-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.link-item-badge {
  font-size: 0.7rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-weight: 600;
}

.link-item-url {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.link-item-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* Move buttons (up/down) */
.move-btn-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-move {
  background: #1e293b;
  border: none;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
}
.btn-move:hover {
  background: #334155;
  color: #fff;
}

/* Theme Presets Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
}

.theme-card {
  background: #0a0f1d;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--admin-text);
}

.theme-card:hover {
  border-color: #475569;
}

.theme-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.theme-swatch {
  width: 100%;
  height: 52px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Button style radio cards */
.button-style-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #0a0f1d;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.radio-card:hover {
  border-color: #475569;
}

.radio-card input[type="radio"]:checked ~ .radio-label strong {
  color: #60a5fa;
}

.radio-card input[type="radio"]:checked {
  accent-color: var(--primary);
}

.radio-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.radio-label strong {
  font-size: 0.95rem;
  color: #fff;
}

.radio-label small {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

/* Avatar Upload & Preview Box */
.avatar-upload-card {
  margin-top: 0.5rem;
}

.avatar-preview-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: #0a0f1d;
  border-radius: 12px;
  border: 1px dashed var(--admin-border);
  transition: border-color 0.2s ease;
}

.avatar-preview-box:hover {
  border-color: #475569;
}

#avatar-preview-img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.avatar-upload-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Analytics KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.kpi-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Link Engagement Breakdown */
.analytics-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
}

.breakdown-bar-bg {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* System Stats List */
.system-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.system-stats li {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1e293b;
}

.system-stats span {
  color: var(--admin-text-muted);
}

/* ================= RIGHT PANE: LIVE SMARTPHONE FRAME ================= */
.preview-pane {
  width: 440px;
  background: #070b13;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-left: 1px solid var(--admin-border);
}

.preview-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.preview-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin-bottom: 1rem;
}

/* Smartphone Mockup */
.smartphone-frame {
  width: 320px;
  height: 640px;
  background: #020408;
  border-radius: 46px;
  padding: 11px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 4px #1e293b, 0 0 0 6px #0f172a;
  position: relative;
  display: flex;
  flex-direction: column;
}

.smartphone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 20px;
  background: #020408;
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.notch-speaker {
  width: 40px;
  height: 4px;
  background: #1e293b;
  border-radius: 2px;
}

.notch-camera {
  width: 8px;
  height: 8px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 50%;
}

.smartphone-screen {
  flex: 1;
  border-radius: 36px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-theme);
  padding: 3rem 1.15rem 2rem;
  position: relative;
  scrollbar-width: none;
  transition: background 0.3s ease;
}

.smartphone-screen::-webkit-scrollbar {
  display: none;
}

/* ================= MODAL & TOAST ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-logo {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  background: #1e293b;
  color: #fff;
  border: 1px solid #334155;
  padding: 0.75rem 1.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.25s ease;
}

.toast-success {
  border-color: var(--success);
}

.toast-error {
  border-color: var(--danger);
}

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

/* ================= RESPONSIVE LAYOUT (< 1024px) ================= */
@media (max-width: 1024px) {
  .admin-body {
    flex-direction: column;
  }

  .admin-pane {
    border-right: none;
    padding: 1.25rem 1rem;
  }

  .mobile-only-btn {
    display: inline-flex;
  }

  .preview-pane {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    width: 100%;
    height: calc(100vh - 60px);
    z-index: 40;
    overflow-y: auto;
    background: rgba(7, 11, 19, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    padding: 2rem 1rem;
  }

  .preview-pane.mobile-open {
    display: flex;
  }
}

/* ================= Telegram 2FA & OTP Styles ================= */
.tg-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #93c5fd;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.otp-input-field {
  text-align: center;
  font-family: 'JetBrains Mono', monospace, ui-monospace;
  font-size: 1.85rem !important;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 12px !important;
  color: #60a5fa !important;
  background: #060913 !important;
  border: 1px solid #2563eb !important;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
}

.otp-input-field:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.otp-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  margin-bottom: 1.25rem;
}

.otp-timer-row strong {
  color: #60a5fa;
}

.login-switch-footer {
  margin-top: 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1.15rem;
}

.link-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.15s ease;
}

.link-btn:hover {
  color: #93c5fd;
}

/* ================= Social Media Icons Manager ================= */
.social-icons-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-editor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0d1527;
  border: 1px solid var(--admin-border);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: border-color 0.18s ease;
}

.social-editor-item:hover {
  border-color: #3b82f6;
}

.social-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #cbd5e1;
}

.social-item-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.social-item-platform-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #f1f5f9;
  min-width: 105px;
  flex-shrink: 0;
}

.social-item-url-box {
  flex: 1;
}

.social-item-url-box input {
  padding: 8px 12px;
  font-size: 0.85rem;
  background: #080d1a;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: #fff;
  width: 100%;
}

.social-item-url-box input:focus {
  border-color: var(--primary);
}

.social-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.social-item-actions .btn-move {
  padding: 6px 9px;
  font-size: 0.75rem;
}

.btn-move:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 640px) {
  .social-editor-item {
    flex-wrap: wrap;
    gap: 8px;
  }
  .social-item-url-box {
    width: 100%;
    order: 3;
    flex: none;
  }
  .social-item-actions {
    margin-left: auto;
    order: 2;
  }
}


