/* ============================================================
   Biolink Pro — Admin Panel Stylesheet
   Dark-first · Glassmorphism · Sidebar · Responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --font: 'Inter', system-ui, sans-serif;

  /* Colors */
  --bg: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(124, 58, 237, 0.6);

  --text-1: #f0f0ff;
  --text-2: #a5b4fc;
  --text-3: #6b7280;
  --text-4: #4b5563;

  --primary: #7c3aed;
  --primary-l: #9f5ff5;
  --primary-dim: rgba(124, 58, 237, 0.15);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;

  --sidebar-w: 260px;
  --header-h: 64px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

  --glass: blur(16px) saturate(200%);
  --t: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--primary-l);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: rgba(15, 12, 41, 0.95);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--t);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
}

.sidebar-logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.sidebar-logo-text span {
  color: var(--primary-l);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding: 16px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--t);
  position: relative;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-1);
  text-decoration: none;
}

.nav-link.active {
  background: var(--primary-dim);
  color: var(--primary-l);
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-footer .nav-link {
  color: var(--danger);
}

.sidebar-footer .nav-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* ── Main Layout ────────────────────────────────────────────── */
.admin-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Header ─────────────────────────────────────────────── */
.admin-header {
  height: var(--header-h);
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-2);
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

/* ── Page Content ───────────────────────────────────────────── */
.admin-content {
  flex: 1;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--t);
}

.card:hover {
  background: var(--bg-card-hover);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--primary-l);
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent, var(--primary-dim)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.purple {
  background: rgba(124, 58, 237, 0.2);
  color: var(--primary-l);
}

.stat-icon.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: var(--info);
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.stat-icon.yellow {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.stat-body {
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  color: var(--text-2);
}

.drag-handle {
  cursor: grab;
  color: var(--text-4);
  font-size: 16px;
  padding: 4px;
  transition: color var(--t);
}

.drag-handle:hover {
  color: var(--text-1);
}

tr.dragging {
  opacity: 0.5;
  background: var(--primary-dim) !important;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--info);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-purple {
  background: var(--primary-dim);
  color: var(--primary-l);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-l);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 0.9rem;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-control::placeholder {
  color: var(--text-4);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 0.77rem;
  color: var(--text-3);
  margin-top: 5px;
}

/* Color picker */
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-preview {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}

input[type="color"] {
  width: 38px;
  height: 38px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

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

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--t);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--t);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #16163a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--t);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--t);
}

.modal-close:hover {
  color: var(--text-1);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Alert messages ─────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert i {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Icon Picker ────────────────────────────────────────────── */
.icon-picker-wrap {
  position: relative;
}

.icon-preview-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  cursor: pointer;
  width: 100%;
  font-size: 0.9rem;
  transition: border-color var(--t);
}

.icon-preview-btn:hover {
  border-color: var(--border-focus);
}

.icon-preview-btn .icon-preview-i {
  font-size: 18px;
  color: var(--primary-l);
}

/* ── Chart area ─────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 280px;
}

/* ── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}

.login-blob-1 {
  width: 500px;
  height: 500px;
  background: #7c3aed;
  top: -200px;
  left: -100px;
}

.login-blob-2 {
  width: 400px;
  height: 400px;
  background: #06b6d4;
  bottom: -100px;
  right: -100px;
}

.login-box {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin: 0 auto 14px;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 4px;
}

/* ── Responsive ─────────────────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-wrap {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(20, 20, 40, 0.97);
  color: white;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Utility ─────────────────────────────────────────────────── */
.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 16px;
}

.mb-3 {
  margin-bottom: 16px;
}

.text-muted {
  color: var(--text-3);
}

.text-sm {
  font-size: 0.82rem;
}

.fw-bold {
  font-weight: 700;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ── Links Manager Layout with Preview ──────────────────────── */
.links-manager-layout {
  display: flex;
  gap: 18px; /* Reducida la separación entre columnas */
  align-items: flex-start;
  width: 100%;
}

.links-left-col {
  flex: 1;
  min-width: 0;
}

.links-right-col {
  width: 360px; /* Ajustado para acomodar el teléfono más ancho */
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 28px);
  z-index: 10;
}

/* Compact Table inside Links Manager */
.links-left-col table {
  font-size: 0.81rem; /* Fuente reducida de los textos */
}

.links-left-col thead th {
  padding: 8px 10px; /* Altura y padding vertical reducido */
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.links-left-col tbody td {
  padding: 7px 10px; /* Padding vertical e interno reducido para filas más delgadas */
}

/* Make toggle switches smaller */
.links-left-col .toggle-switch {
  width: 38px;
  height: 20px;
}

.links-left-col .toggle-slider::before {
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
}

.links-left-col .toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Smaller action buttons in links table */
.links-left-col .btn-sm.btn-icon {
  padding: 5px 8px;
  font-size: 0.76rem;
}

/* Smaller badges in links table */
.links-left-col .badge {
  font-size: 0.68rem;
  padding: 2px 7px;
}

/* Custom compact styles for titles and subtitles inside table */
.lnk-title {
  font-weight: 600;
  color: var(--text-1);
  font-size: 0.82rem;
}

.lnk-subtitle {
  font-size: 0.73rem;
  color: var(--text-3);
  margin-top: 1px;
}

.lnk-url {
  font-size: 0.66rem;
  color: var(--text-4);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

/* Phone Mockup */
.phone-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.phone-frame {
  position: relative;
  width: 330px; /* Teléfono ligeramente más ancho */
  height: 640px;
  background: #000000;
  /* Fondo completamente negro para el marco */
  border: 14px solid #000000;
  /* Borde negro grueso que actúa como marco físico */
  border-radius: 46px;
  /* Esquinas muy redondeadas */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
  /* Sombra física sutil y reflejo interno */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Notch & Camera/Speaker */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 22px;
  background: #000000;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.phone-speaker {
  width: 32px;
  height: 4px;
  background: #222222;
  border-radius: 2px;
}

.phone-camera {
  width: 6px;
  height: 6px;
  background: #111111;
  border-radius: 50%;
  border: 1px solid #222222;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  /* Esquinas redondeadas del área de pantalla */
  overflow: hidden;
  position: relative;
  background: #0d0b21;
}

.phone-screen iframe {
  width: 113.64%; /* 100 / 0.88 */
  height: 113.64%; /* 100 / 0.88 */
  border: none;
  background: transparent;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  transform: scale(0.88); /* Reduce escala de los elementos internos (avatar, botones, textos) */
  transform-origin: top left;
}

/* Responsive: Sólo mostrar lado a lado en ordenadores de escritorio */
@media (max-width: 992px) {
  .links-manager-layout {
    flex-direction: column;
    align-items: center;
  }

  .links-right-col {
    width: 100%;
    position: relative;
    top: 0;
    margin-top: 32px;
  }
}

/* ── Custom Select / Dropdowns ──────────────────────────────── */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t);
}

.custom-select-trigger:focus, .custom-select-trigger:hover {
  outline: none;
  border-color: var(--border-focus);
}

.custom-select-trigger i:first-child {
  margin-right: 10px;
  color: var(--primary-l);
  width: 18px;
  text-align: center;
  font-size: 1.05rem;
}

.custom-select-trigger .arrow {
  margin-left: auto; /* Empuja el chevron hacia la extrema derecha */
  font-size: 0.8rem;
  color: var(--text-3);
  transition: transform var(--t);
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111129; /* Fondo oscuro adecuado para el tema */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 5px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 150;
  display: none;
  box-shadow: var(--shadow-lg);
}

.custom-options.open {
  display: block;
}

.custom-option {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
  font-size: 0.88rem;
}

.custom-option:hover {
  background: var(--primary-dim);
  color: var(--text-1);
}

.custom-option i {
  margin-right: 10px;
  color: var(--primary-l);
  width: 18px;
  text-align: center;
  font-size: 1.05rem;
}

.custom-add-option {
  border-top: 1px solid var(--border);
  color: var(--info) !important;
  font-weight: 600;
}

.custom-add-option i {
  color: var(--info) !important;
}

/* Style Select options natively for contrast as a fallback */
select.form-control option {
  background-color: #111129;
  color: #f0f0ff;
}