/* ============================================================
   GLOBALTY DASHBOARD — Shared Styles
   ============================================================ */

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

:root {
  --bg:          #f0f4f8;
  --bg2:         #e4eaf0;
  --surface:     #ffffff;
  --surface2:    #f8fafc;
  --text:        #1a1a2e;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --accent:      #6366f1;
  --accent2:     #8b5cf6;
  --danger:      #ef4444;
  --success:     #22c55e;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 8px 32px rgba(0,0,0,.12);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.16);
  --header-h:    64px;
  --radius:      16px;
  --radius-sm:   10px;
  --transition:  .3s cubic-bezier(.4,0,.2,1);
  --header-bg:   rgba(255,255,255,.88);
  --neon:        #00ff88;
}

[data-theme="dark"] {
  --bg:          #06060f;
  --bg2:         #0c0c1d;
  --surface:     #0f0f20;
  --surface2:    #181830;
  --text:        #e0e0ff;
  --text-muted:  #7878a0;
  --border:      #2a2a50;
  --accent:      #818cf8;
  --accent2:     #a78bfa;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.4);
  --shadow-md:   0 8px 32px rgba(0,0,0,.6);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.8);
  --header-bg:   rgba(6,6,15,.88);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  padding-top: var(--header-h);
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,.4);
  overflow: hidden;
}

.brand-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 4px;
}

[data-theme="dark"] .brand-icon {
  box-shadow: 0 4px 20px rgba(129,140,248,.5), 0 0 40px rgba(129,140,248,.2);
}

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

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

/* ---- BUTTONS (general) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,.35);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,.5);
}

.btn-danger {
  background: rgba(239,68,68,.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover {
  background: rgba(239,68,68,.2);
  border-color: var(--danger);
}

.btn-success {
  background: rgba(34,197,94,.1);
  color: var(--success);
  border: 1px solid rgba(34,197,94,.3);
}
.btn-success:hover {
  background: rgba(34,197,94,.2);
}

/* Theme toggle */
.btn-theme {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.btn-theme:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(99,102,241,.4);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 32px;
}

/* ============================================================
   SITES GRID
   ============================================================ */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ============================================================
   SITE CARD
   ============================================================ */
.site-card {
  --neon: #6366f1;
  --neon-glow: rgba(99,102,241,.25);
  --neon-strong: rgba(99,102,241,.5);

  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  cursor: default;
}

/* Radial halo behind logo, tinted with the site color */
.site-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 180px;
  background: radial-gradient(ellipse at center, var(--neon-glow) 0%, transparent 70%);
  opacity: .35;
  pointer-events: none;
  transition: opacity var(--transition);
}

.site-card:hover::before { opacity: .7; }

/* Diagonal sheen sweep on hover */
.site-card::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.site-card:hover::after {
  animation: card-sheen .9s ease;
}

@keyframes card-sheen {
  from { left: -80%; }
  to   { left: 130%; }
}

.site-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px var(--neon-glow), var(--shadow-lg);
  border-color: var(--neon);
}

[data-theme="dark"] .site-card {
  background: var(--surface);
  border: 1px solid var(--neon);
  box-shadow: 0 0 0 1px transparent,
              0 0 20px var(--neon-glow),
              var(--shadow-md);
}

[data-theme="dark"] .site-card:hover {
  box-shadow: 0 0 0 1px var(--neon),
              0 0 30px var(--neon-glow),
              0 0 60px var(--neon-glow),
              var(--shadow-lg);
  transform: translateY(-6px);
}

/* ---- Neon top strip ---- */
.card-strip {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon) 25%, var(--neon) 75%, transparent);
  transition: all var(--transition);
}

[data-theme="dark"] .card-strip {
  box-shadow: 0 0 10px var(--neon), 0 0 20px var(--neon-glow);
}

.site-card:hover .card-strip {
  height: 4px;
  background: var(--neon);
}

/* ---- Logo area ---- */
.card-logo-wrap {
  padding: 30px 24px 16px;
  display: flex;
  justify-content: center;
  position: relative;
}

.card-logo {
  width: 84px; height: 84px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 6px 18px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,.5);
}

[data-theme="dark"] .card-logo {
  border-color: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,.06);
}

.site-card:hover .card-logo {
  transform: scale(1.07) translateY(-2px);
  border-color: var(--neon);
}

[data-theme="dark"] .site-card:hover .card-logo {
  box-shadow: 0 0 20px var(--neon-glow);
}

.card-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
}

.card-logo-fallback {
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon);
  line-height: 1;
}

/* ---- Card body ---- */
.card-body {
  padding: 0 24px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.card-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--text);
  line-height: 1.3;
}

[data-theme="dark"] .card-name {
  color: #fff;
  text-shadow: 0 0 20px var(--neon-glow);
}

.card-description {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-url {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: .74rem;
  color: var(--text-muted);
  font-family: 'Cascadia Code', 'SF Mono', Consolas, monospace;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all var(--transition);
}

.card-url::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon);
  flex-shrink: 0;
}

.site-card:hover .card-url {
  border-color: var(--neon);
  color: var(--text);
}

[data-theme="dark"] .card-url {
  background: rgba(255,255,255,.04);
}

[data-theme="dark"] .card-url::before {
  box-shadow: 0 0 6px var(--neon);
}

/* ---- Card actions ---- */
.card-actions {
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-preview {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.btn-preview svg, .btn-enter svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
}

.btn-enter svg {
  transition: transform var(--transition);
}

.btn-enter:hover svg {
  transform: translateX(3px);
}

.btn-preview:hover {
  background: var(--neon-glow);
  border-color: var(--neon);
  color: var(--text);
}

[data-theme="dark"] .btn-preview {
  background: rgba(255,255,255,.04);
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .btn-preview:hover {
  background: var(--neon-glow);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow);
}

.btn-enter {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--neon), color-mix(in srgb, var(--neon) 72%, #1a1a2e));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2px;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 4px 14px var(--neon-glow);
}

.btn-enter:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--neon-strong);
}

[data-theme="dark"] .btn-enter {
  box-shadow: 0 0 15px var(--neon-glow), 0 0 30px var(--neon-glow);
}

[data-theme="dark"] .btn-enter:hover {
  box-shadow: 0 0 20px var(--neon), 0 0 40px var(--neon-glow);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: .5;
}

.empty-state h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state a {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   PREVIEW MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in .25s cubic-bezier(.34,1.56,.64,1);
}

[data-theme="dark"] .modal-content {
  border-color: var(--modal-neon, #6366f1);
  box-shadow: 0 0 0 1px var(--modal-neon, #6366f1),
              0 0 40px rgba(99,102,241,.3),
              var(--shadow-lg);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title .site-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--modal-neon, #6366f1);
  flex-shrink: 0;
}

[data-theme="dark"] .modal-title .site-dot {
  box-shadow: 0 0 8px var(--modal-neon, #6366f1);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-body {
  flex: 1;
  position: relative;
  min-height: 0;
  background: var(--bg2);
}

.preview-iframe {
  width: 100%; height: 68vh;
  border: none;
  display: block;
}

.preview-blocked {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 40px;
  background: var(--bg2);
}

.preview-blocked.visible { display: flex; }

.blocked-icon { font-size: 3rem; opacity: .6; }

.preview-blocked p {
  color: var(--text-muted);
  font-size: .9rem;
  max-width: 320px;
  line-height: 1.5;
}

.preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
}

.preview-loading.hidden { display: none; }

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

[data-theme="dark"] .spinner {
  border-top-color: var(--neon);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ADMIN — FORM
   ============================================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.card-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

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

.panel-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Form fields ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.input, .textarea, .select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: .9rem;
  transition: all var(--transition);
  font-family: inherit;
  outline: none;
  width: 100%;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  background: var(--surface);
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .textarea:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-glow, rgba(0,255,136,.15));
}

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

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn .input { flex: 1; }

.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.color-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-preset {
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
}

.color-preset:hover, .color-preset.active {
  border-color: var(--text);
  transform: scale(1.2);
}

/* ---- Logo preview in form ---- */
.logo-preview {
  width: 60px; height: 60px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg2);
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

/* ============================================================
   ADMIN — SITES LIST
   ============================================================ */
.sites-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.site-list-item:last-child { border-bottom: none; }

.site-list-item:hover { background: var(--surface2); }

.site-list-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.site-list-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.site-list-info { flex: 1; min-width: 0; }

.site-list-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-list-url {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.site-color-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.site-list-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--surface2); color: var(--text); }
.btn-icon.edit:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.delete:hover { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,.05); }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 320px;
}

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

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   DARK MODE — NEON AMBIENT GLOW BACKGROUND
   ============================================================ */
[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(99,102,241,.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(139,92,246,.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .main { position: relative; z-index: 1; }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .main { padding: 20px 16px 40px; }
  .sites-grid { grid-template-columns: 1fr; gap: 16px; }
  .header { padding: 0 16px; }
  .brand-name { display: none; }
  .modal-content { border-radius: 16px; }
  .preview-iframe { height: 56vh; }
}

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.login-content { max-width: 380px; }
.login-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}
.login-body label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.login-error { color: #ef4444; font-size: .85rem; }

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel-viewport {
  overflow: hidden;
  padding: 14px;
  margin: -14px;
}
.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.carousel-page {
  flex: 0 0 100%;
  min-width: 0;
  align-content: start;
}
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}
.carousel-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.carousel-btn:hover { transform: scale(1.1); border-color: var(--accent, #6366f1); }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.carousel-dot.active { width: 26px; border-radius: 6px; background: var(--accent, #6366f1); }

/* ============================================================
   CATEGORY TABS + READ-ONLY PREVIEW
   ============================================================ */
.cat-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cat-tab:hover { border-color: var(--accent, #6366f1); }
.cat-tab.active {
  background: var(--accent, #6366f1);
  border-color: var(--accent, #6366f1);
  color: #fff;
}
.cat-count {
  font-size: .75rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(128,128,128,.2);
}
.cat-tab.active .cat-count { background: rgba(255,255,255,.25); }

.preview-shield {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 68vh;
  z-index: 2;
  background: transparent;
  cursor: not-allowed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.preview-shield span {
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .72rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  pointer-events: none;
}
.preview-blocked { z-index: 5; }
@media (max-width: 640px) { .preview-shield { height: 56vh; } }

/* ============================================================
   ADMIN TABS
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.admin-tab:hover { border-color: var(--accent); }
.admin-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   RELEASE NOTES — TEASER (Default.aspx)
   ============================================================ */
.notes-teaser {
  margin-top: 36px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.notes-teaser-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.notes-teaser-icon { font-size: 1.8rem; line-height: 1; }
.notes-teaser-info h3 { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.notes-teaser-info p {
  font-size: .82rem;
  color: var(--text-muted);
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notes-badge {
  color: var(--accent2);
  font-size: .6rem;
  margin-left: 4px;
  vertical-align: middle;
}

/* ============================================================
   RELEASE NOTES — MODAL TIMELINE
   ============================================================ */
.notes-content { max-width: 720px; }
.notes-body { padding: 10px 24px 24px; max-height: 70vh; overflow-y: auto; }

.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 10px;
}

.note-item {
  display: flex;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}
.note-item:last-child { border-bottom: none; }

.note-type-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.note-body { flex: 1; min-width: 0; }

.note-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.note-site { font-weight: 700; font-size: .92rem; }
.note-version {
  font-size: .72rem;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg2);
  padding: 2px 7px;
  border-radius: 999px;
}

.note-type-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #fff;
}
.note-type-badge.nuevo     { background: #22c55e; }
.note-type-badge.mejora    { background: #3b82f6; }
.note-type-badge.arreglo   { background: #f59e0b; }
.note-type-badge.seguridad { background: #ef4444; }

.note-change {
  font-size: .86rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.note-meta {
  font-size: .76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.note-meta a { color: var(--accent); text-decoration: none; }
.note-meta a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .notes-teaser { flex-direction: column; align-items: stretch; }
  .notes-teaser-info p { max-width: none; white-space: normal; }
}
