/* ESTILO GENERAL PARA MODEL34 (FONDO CLARO, AIRE TÉCNICO) */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f5f7fa;
  color: #111827;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

/* CABECERA CON LOGO Y FRANJA DE PLANOS */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #111827;
  border-bottom: 1px solid #0f172a;
}

.header-overlay {
  background-color: #111827;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 50%;
  border: 2px solid #fbbf24;
  background: #111827;
}

.logo span {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f9fafb;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 10px;
}

.nav a:hover {
  background-color: #fbbf24;
  color: #111827;
}

.spacer { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  background-color: #fbbf24;
  color: #111827;
}

/* Caja usuario (cabecera) */
.userbox{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  margin-left:10px;
}
.btn-logout{
  padding: 7px 12px;
  height: 28px; /* aprox 50% de la altura de la franja negra */
}
.username{
  color:#e5e7eb;
  font-size:14px;
  font-weight:700;
  line-height:1.1;
  max-width: 260px;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Franja inferior con la imagen de cabecera (50px alto) */
.header-strip {
  width: 100%;
  height: 50px;
  background-image: url('/assets/img/cabecera_model34.png');
  background-size: cover;
  background-position: center;
}

/* HERO PRINCIPAL */
.hero {
  margin-top: 14px;
  padding: 28px 24px 22px;
  border-radius: 20px;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
}

.hero-main h1 {
  margin: 0 0 10px 0;
  font-size: 30px;
}

.hero-main p {
  margin: 4px 0;
  max-width: 780px;
  color: #4b5563;
  font-size: 14px;
}

.hero-main .tagline {
  font-weight: bold;
  color: #111827;
}

.hero-aside {
  background-image: url('/assets/img/plano_model34.png');
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
}

.hero-aside-inner {
  padding: 16px;
  background: rgba(249,250,251,0.95);
}

.hero-aside-inner h2 {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.hero-aside-inner p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}

/* SECCIONES GENERALES */
.section { padding: 28px 0 10px; }

.section h2 {
  margin: 0 0 10px 0;
  font-size: 22px;
}

.section > p {
  margin-top: 0;
  color: #6b7280;
  font-size: 14px;
}

/* GRID DE TARJETAS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.card {
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #d1d5db;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.card h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* GALERÍA MINI */
.gallery-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.gallery-strip img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

/* TABLAS */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 14px;
}

.table th,
.table td {
  padding: 9px 12px;
}

.table th {
  text-align: left;
  font-weight: 600;
  color: #4b5563;
}

.table tr {
  background-color: #ffffff;
  border-radius: 12px;
}

/* CHIPS */
.badge,
.badge-pill {
  display: inline-block;
  border-radius: 10px;
  font-size: 12px;
  padding: 2px 10px;
  border: 1px solid #93c5fd;
  background-color: #dbeafe;
  color: #1d4ed8;
}

.small { font-size: 12px; color: #6b7280; }

ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean li { margin-bottom: 6px; }

/* FORMULARIOS */
form label {
  display: block;
  margin: 14px 0 4px 0;
  font-size: 14px;
  color: #374151;
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background-color: #f9fafb;
  color: #111827;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ALERTAS */
.alert {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.alert-ok {
  background-color: #ecfdf3;
  border: 1px solid #4ade80;
  color: #166534;
}

.alert-err {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ENLACES GENERALES */
a.link { color: #2563eb; text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* TAGS REDES */
.tag {
  display: inline-block;
  font-size: 12px;
  border-radius: 10px;
  padding: 3px 9px;
  border: 1px solid #cbd5f5;
  background-color: #0f172a;
  color: #e5e7eb;
}

/* Enlaces de redes (iconos) */
.social-links{ display:flex; gap:10px; align-items:center; }
.social{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(15, 23, 42, .06);
}
.social img{ width:20px; height:20px; display:block; }

/* Evitar botones pegados / solapes en tarjetas */
.card, .hero, .section{ overflow:hidden; }
.card-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.card p{ margin-bottom:10px; }
.card .btn{ position:static !important; float:none !important; }

/* PIE */
footer {
  border-top: 1px solid #d1d5db;
  background-color: #f9fafb;
}

footer .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container { padding: 20px 14px 26px; }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px 18px 20px;
    border-radius: 16px;
  }
}

@media (max-width: 520px) {
  .nav { gap: 6px; padding: 10px 12px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .logo span { display:none; }
}


/* v6a — evitar solapamientos y mejorar responsive */
.table{
  width:100%;
  border-collapse:collapse;
}
.table th, .table td{
  padding:10px 12px;
  vertical-align:top;
}
.table th{ text-align:left; }
.table td a.link{ display:inline-flex; align-items:center; white-space:nowrap; }

.section h1, .section h2, .section h3{ margin-top:0; }
.card p{ margin: 8px 0; }
.btn{ max-width:100%; }
.btn, .link{ line-height:1.2; }

/* ==============================
   PANEL SOCIOS (evitar solapes)
   ============================== */
.panel-grid{
  display:grid;
  gap:18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top:10px;
}
@media (max-width: 860px){
  .panel-grid{ grid-template-columns: 1fr; }
}

.panel-card{
  background:#fff;
  border-radius:16px;
  border:1px solid #d1d5db;
  padding:16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:visible;
}

.panel-card h3{ margin:0 0 6px 0; font-size:16px; }
.panel-card p{ margin:0; color:#6b7280; font-size:14px; line-height:1.35; }

.panel-card .card-actions{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.panel-card .btn{
  position: static !important;
  float: none !important;
}

@media (max-width: 680px){
  .table{ display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .nav a{ padding:10px 10px; }
}

.docrow{ display:flex; gap:10px; align-items:center; }
.docbadge{ display:inline-flex; align-items:center; justify-content:center; min-width:44px; padding:4px 8px; border-radius:999px; border:1px solid rgba(0,0,0,.12); font-size:12px; font-weight:700; background:#fff; }
