/* ==========================================================================
   Grupo Integra ERP — hoja de estilos única (landing + panel)
   ========================================================================== */

:root {
  --navy: #0B1B3B;
  --primary: #1F5FE0;
  --teal: #17B6B0;
  --aqua: #25C9BE;
  --mist: #F7F9FC;
  --line: #DCE5F2;
  --slate: #3A4A6B;
  --muted: #5A6B8C;
  --faded: #8A99B8;
  --white: #fff;
  --danger: #D62F3F;
  --gradient: linear-gradient(90deg, #1F5FE0, #17B6B0);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--mist);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 2px;
  border-radius: 6px;
}

.hex { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

.text-gradient {
  background: linear-gradient(90deg, #1F5FE0, #25C9BE);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: Sora, sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(31, 95, 224, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 95, 224, .36); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #F3C9CD; }
.btn-danger:hover { background: #FDF2F3; }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form label,
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate);
}
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=url], select, textarea {
  width: 100%;
  font-family: Inter, sans-serif;
  font-size: 15px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  color: var(--navy);
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); background: var(--white); }
textarea { resize: vertical; min-height: 96px; }

.alert {
  border-radius: 12px;
  border: 1px solid;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
}
.alert-error { background: #FDF2F3; border-color: #F3C9CD; color: #A5202E; }
.alert-success { background: #E9F8F6; border-color: #A8E5E0; color: #0E7C77; }

/* ==========================================================================
   LANDING
   ========================================================================== */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px rgba(11, 27, 59, .1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { font-family: Sora, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .28em; color: var(--muted); }
.brand-name { font-family: Sora, sans-serif; font-size: 19px; font-weight: 800; }
.brand-name span { color: var(--teal); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { text-decoration: none; color: var(--slate); font-size: 15px; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover { color: var(--primary); }
.nav-links .btn { color: var(--white); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 8px 24px 20px; border-top: 1px solid var(--line); background: var(--mist); }
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 44px;
  padding: 14px 8px; border-radius: 10px;
  text-decoration: none; color: var(--navy); font-weight: 600;
}
.mobile-menu a:hover { background: #EDF2FA; }
.mobile-menu .btn { justify-content: center; color: var(--white); margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: center;
  padding: 72px 0 88px;
}
.blob { position: absolute; border-radius: 50%; filter: blur(40px); pointer-events: none; }
.blob-1 { top: -120px; left: -100px; width: 480px; height: 480px; background: radial-gradient(circle, rgba(31,95,224,.16), transparent 65%); animation: blob 14s ease-in-out infinite; }
.blob-2 { bottom: -140px; right: -80px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(23,182,176,.16), transparent 65%); animation: blob 18s ease-in-out infinite reverse; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--primary);
  box-shadow: 0 2px 8px rgba(11, 27, 59, .05);
}
.badge-dot { display: inline-block; width: 9px; height: 10px; background: linear-gradient(135deg,#1F5FE0,#17B6B0); }

h1.hero-title {
  font-family: Sora, sans-serif; font-weight: 800;
  font-size: clamp(38px, 5vw, 58px); line-height: 1.08;
  letter-spacing: -.02em; margin: 22px 0 20px;
}
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--slate); max-width: 520px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 36px; }
.hero-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); }

.hero-art { position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.hero-art > img { animation: floaty 7s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(11,27,59,.12)); }
.chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 18px; box-shadow: 0 10px 26px rgba(11,27,59,.1);
  font-family: Sora, sans-serif; font-weight: 600; font-size: 13.5px;
  animation: floaty2 6.5s ease-in-out infinite;
}
.chip i { display: inline-block; width: 11px; height: 12px; }
.chip-1 { top: 8%; left: 2%; }
.chip-2 { top: 42%; right: 0; animation-duration: 7.5s; animation-delay: -2s; }
.chip-3 { bottom: 6%; left: 14%; animation-duration: 6.8s; animation-delay: -4s; }

/* ---------- Marcas ---------- */
.brands { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.brands-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 36px; padding: 22px 24px; }
.brands-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.brands-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 32px; }
.brands-list span { font-family: Sora, sans-serif; font-weight: 700; font-size: 17px; color: var(--faded); }

/* ---------- Secciones ---------- */
.section { padding: 88px 0 72px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow { font-family: Sora, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .18em; color: var(--teal); text-transform: uppercase; }
.section-head h2 {
  font-family: Sora, sans-serif; font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em;
  line-height: 1.15; margin: 12px 0 14px;
}
.section-head p { font-size: 16.5px; line-height: 1.6; color: var(--slate); margin: 0; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 4px 14px rgba(11,27,59,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(11,27,59,.12); }
.service-top { display: flex; align-items: center; justify-content: space-between; }
.service-icon { position: relative; width: 52px; height: 56px; display: flex; align-items: center; justify-content: center; }
.service-icon span { font-family: Sora, sans-serif; font-weight: 800; font-size: 18px; color: var(--white); }
.service-num { font-family: Sora, sans-serif; font-weight: 800; font-size: 15px; color: #C3CFE4; }
.service-card h3 { font-family: Sora, sans-serif; font-weight: 700; font-size: 19px; margin: 0; letter-spacing: -.01em; }
.service-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.service-card li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--slate); }
.bullet { flex: none; margin-top: 5px; display: inline-block; width: 8px; height: 9px; background: var(--teal); }

/* ---------- Nosotros ---------- */
.about { background: var(--navy); position: relative; overflow: hidden; }
.about::after {
  content: ''; position: absolute; top: -160px; right: -120px;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(23,182,176,.22), transparent 65%);
  filter: blur(50px);
}
.about-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px; align-items: center; padding: 88px 0;
}
.about .eyebrow { color: var(--aqua); }
.about h2 {
  font-family: Sora, sans-serif; font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em;
  line-height: 1.18; margin: 14px 0 28px; color: var(--white);
}
.about ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.about li { display: flex; align-items: center; gap: 12px; color: #C9D6EE; font-size: 16.5px; font-weight: 500; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.stat-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 26px 22px; backdrop-filter: blur(6px);
}
.stat-value {
  font-family: Sora, sans-serif; font-weight: 800; font-size: 34px; line-height: 1;
  background: linear-gradient(90deg, #6BA2FF, #25C9BE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: #C9D6EE; }

/* ---------- Proceso ---------- */
.step-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: 0 4px 14px rgba(11,27,59,.05); }
.step-num {
  font-family: Sora, sans-serif; font-weight: 800; font-size: 14px; color: var(--white);
  background: linear-gradient(135deg, #1F5FE0, #17B6B0);
  width: 38px; height: 42px; display: flex; align-items: center; justify-content: center;
}
.step-card h3 { font-family: Sora, sans-serif; font-weight: 700; font-size: 18px; margin: 18px 0 8px; }
.step-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--slate); }

/* ---------- Contacto ---------- */
.contact { padding: 0 0 96px; }
.contact-box {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  border-radius: 22px; overflow: hidden; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(11,27,59,.14);
}
.contact-aside {
  background: linear-gradient(135deg, #1F5FE0, #17B6B0); color: var(--white);
  padding: clamp(32px, 4vw, 52px); display: flex; flex-direction: column; gap: 26px;
  position: relative; overflow: hidden;
}
.contact-aside h2 { font-family: Sora, sans-serif; font-weight: 800; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.contact-aside p { margin: 0; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.9); }
.contact-aside svg.watermark { position: absolute; bottom: -60px; right: -50px; opacity: .18; }
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; position: relative; z-index: 1; }
.contact-list a, .contact-list span { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.contact-form-wrap { padding: clamp(32px, 4vw, 52px); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.form-sent { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; min-height: 320px; }
.form-sent h3 { font-family: Sora, sans-serif; font-weight: 700; font-size: 22px; margin: 0; }
.form-sent p { margin: 0; font-size: 15.5px; color: var(--slate); max-width: 340px; line-height: 1.6; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C9D6EE; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding: 64px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-family: Sora, sans-serif; font-weight: 700; font-size: 14px; color: var(--white); letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.footer-col a { text-decoration: none; color: var(--faded); font-size: 14.5px; transition: color .2s ease; }
.footer-col a:hover { color: var(--aqua); }
.footer-col p, .footer-col > span { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--faded); max-width: 260px; }
.footer-brand-name { font-family: Sora, sans-serif; font-size: 17px; font-weight: 800; color: var(--white); }
.footer-brand-name span { color: var(--aqua); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.socials a:hover { background: rgba(37,201,190,.2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px;
  padding: 24px 0 32px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted);
}
.footer-bottom a { text-decoration: none; color: var(--muted); }
.footer-bottom a:hover { color: var(--aqua); }

/* ---------- Animaciones ---------- */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes floaty2 { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes blob { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(20px,-20px) scale(1.08); } }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, [data-reveal] { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero-art { display: none; }
}

/* ==========================================================================
   LOGIN / INSTALADOR
   ========================================================================== */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; padding: 32px;
  box-shadow: 0 10px 40px rgba(11,27,59,.08); text-align: center;
}
.auth-card h1 { font-family: Sora, sans-serif; font-size: 21px; font-weight: 800; margin: 16px 0 8px; }
.auth-card .form { text-align: left; margin-top: 20px; }
.auth-card .btn { width: 100%; }
.auth-card .alert { text-align: left; }
.auth-card code { background: var(--mist); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================== */
.admin { display: flex; min-height: 100vh; background: var(--mist); }

.sidebar {
  width: 240px; flex: none; background: var(--white);
  border-right: 1px solid var(--line); padding: 24px 16px;
  display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 28px; text-decoration: none; color: var(--navy); }
.sidebar-brand strong { font-family: Sora, sans-serif; font-size: 15px; font-weight: 800; display: block; line-height: 1.2; }
.sidebar-brand strong span { color: var(--teal); }
.sidebar-brand small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a {
  border-radius: 12px; padding: 10px 12px;
  font-size: 14px; font-weight: 600; color: var(--slate);
  text-decoration: none; transition: background .2s ease, color .2s ease;
}
.sidebar nav a:hover { background: var(--mist); }
.sidebar nav a.active { background: rgba(31,95,224,.1); color: var(--primary); }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.sidebar-foot .email { display: block; padding: 0 12px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot a { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--danger); text-decoration: none; }
.sidebar-foot a:hover { background: #FDF2F3; }

.admin-main { flex: 1; min-width: 0; padding: 32px; }

.admin-topbar { display: none; gap: 8px; overflow-x: auto; background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 16px; }
.admin-topbar a { white-space: nowrap; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--slate); text-decoration: none; }
.admin-topbar a.active { background: rgba(31,95,224,.1); color: var(--primary); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.page-head h1 { font-family: Sora, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; box-shadow: 0 2px 8px rgba(11,27,59,.04);
}
.card + .card { margin-top: 14px; }
.card.editing { border-color: rgba(31,95,224,.45); }
.card h2 { font-family: Sora, sans-serif; font-size: 18px; font-weight: 700; margin: 0 0 16px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.shortcut { text-decoration: none; display: block; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.shortcut:hover .card { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 20px rgba(11,27,59,.08); }
.shortcut strong { font-family: Sora, sans-serif; display: block; color: var(--navy); }
.shortcut span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }

.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.grid-4-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.mt-16 { margin-top: 16px; }

.tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; }
.tag-hidden { background: var(--line); color: var(--muted); }
.tag-nuevo { background: rgba(31,95,224,.1); color: var(--primary); }
.tag-contactado { background: rgba(23,182,176,.12); color: #0E7C77; }
.tag-cerrado { background: var(--line); color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters a {
  border-radius: 10px; padding: 7px 14px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; color: var(--slate); background: var(--white); border: 1px solid var(--line);
}
.filters a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s ease; }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::after { left: 22px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.media-item { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.media-thumb { width: 100%; height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--mist); }
.media-file { display: flex; align-items: center; justify-content: center; height: 128px; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); font-size: 30px; }
.media-name { margin: 8px 0 2px; font-size: 12px; font-weight: 600; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-size { margin: 0 0 8px; font-size: 11px; color: var(--faded); }
.media-url { width: 100%; font-size: 11px; padding: 6px 8px; }

.lead-item p { margin: 0; }
.lead-meta { margin-top: 4px !important; font-size: 13.5px; color: var(--muted); }
.lead-message { margin-top: 10px !important; white-space: pre-wrap; font-size: 14px; color: var(--slate); }
.lead-date { margin-top: 10px !important; font-size: 12px; color: var(--faded); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; font-size: 14px; color: var(--muted); }

.qr-box { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.qr-box img, .qr-box canvas { border: 1px solid var(--line); border-radius: 12px; }
.qr-secret { font-size: 12px; color: var(--muted); word-break: break-all; }

.empty { color: var(--muted); margin: 0; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .admin { flex-direction: column; }
  .admin-topbar { display: flex; }
  .admin-main { padding: 20px 16px; }
}
