/* Panel Roinox — simple y claro para uso no técnico */
:root {
  --ink: #131417; --muted: #66686d; --line: #e2e3e7; --bg: #f6f7f9;
  --steel: #4e6b89; --steel-dark: #3d5a78; --blanco: #fff;
  --ok: #e8f5ec; --rojo: #b3392b;
  --grad: linear-gradient(105deg, #607d9c, #4e6b89 45%, #3d5a78);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; color: var(--ink); background: var(--bg);
  display: flex; min-height: 100vh;
}
h1 { font-size: 1.7rem; margin-bottom: .4rem; }
h2 { font-size: 1.15rem; }
a { color: inherit; text-decoration: none; }

/* ---- barra lateral ---- */
.side {
  width: 240px; flex: none; background: var(--ink); color: #fff;
  display: flex; flex-direction: column; padding: 1.4rem 1rem;
  position: sticky; top: 0; height: 100vh;
}
.side__brand { font-weight: 800; font-size: 1.3rem; letter-spacing: .05em; padding: 0 .6rem 1.4rem; }
.side__brand span { display: block; font-size: .68rem; font-weight: 500; color: #9aa5b1; letter-spacing: .15em; text-transform: uppercase; margin-top: .3rem; }
.side nav { display: flex; flex-direction: column; gap: .25rem; }
.side nav a { padding: .7rem .8rem; border-radius: 8px; color: #cfd4da; font-size: .95rem; }
.side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side nav a.on { background: var(--grad); color: #fff; font-weight: 600; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }

/* ---- contenido ---- */
.main { flex: 1; padding: 2.2rem clamp(1.2rem, 4vw, 3rem); max-width: 1000px; }
.intro { color: var(--muted); margin: .3rem 0 1.6rem; max-width: 62ch; }
.cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.aviso {
  background: var(--ok); border: 1px solid #bfe3c8; color: #1e5c2e;
  padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; font-weight: 500;
}
.aviso--error { background: #fdeceb; border-color: #f2c2bd; color: var(--rojo); }

/* ---- botones ---- */
.btn {
  display: inline-block; background: var(--grad); color: #fff; border: none; cursor: pointer;
  font-size: 1rem; font-weight: 600; padding: .75rem 1.4rem; border-radius: 999px;
}
.btn:hover { filter: brightness(1.1); }
.btn-ghost {
  display: inline-block; border: 1px solid rgba(255,255,255,.35); color: #cfd4da;
  padding: .55rem 1rem; border-radius: 999px; font-size: .85rem; text-align: center;
  background: none; cursor: pointer;
}
.main .btn-ghost { border-color: var(--line); color: var(--muted); }
.btn-mini {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
}
.btn-mini:hover { border-color: var(--steel); color: var(--steel); }
.btn-mini--rojo:hover { border-color: var(--rojo); color: var(--rojo); }

/* ---- dashboard ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tarjeta {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem;
  transition: transform .2s, box-shadow .2s;
}
.tarjeta:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(19,20,23,.08); }
.tarjeta__icono { font-size: 1.7rem; }
.tarjeta h2 { margin: .6rem 0 .35rem; }
.tarjeta p { font-size: .87rem; color: var(--muted); }
.ayuda { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; margin-top: 1.5rem; }
.ayuda h3 { margin-bottom: .6rem; }
.ayuda ol { padding-left: 1.2rem; color: var(--muted); }
.ayuda li { margin-bottom: .3rem; }
.ayuda p { color: var(--muted); margin-top: .6rem; font-size: .9rem; }

/* ---- listas de proyectos ---- */
.lista { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; }
.fila {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem;
}
.fila--oculta { opacity: .55; }
.fila__foto { width: 74px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.fila__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fila__info span { font-size: .8rem; color: var(--muted); }
.fila__acciones { display: flex; align-items: center; gap: .4rem; }
.fila__acciones form { display: inline; }
.fila__acciones button[title] { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.chip { font-size: .68rem; font-weight: 700; letter-spacing: .1em; padding: .25rem .6rem; border-radius: 999px; }
.chip--max { background: var(--grad); color: #fff; }

/* ---- formularios ---- */
.formulario { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; max-width: 760px; }
.formulario--compacto { max-width: 560px; }
.formulario label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .92rem; }
.pista { font-weight: 400; color: var(--muted); font-size: .82rem; }
.formulario input[type="text"], .formulario input:not([type]), .formulario input[type="email"], .formulario input[type="password"], .formulario textarea {
  font: inherit; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: 10px;
}
.formulario input:focus, .formulario textarea:focus { outline: none; border-color: var(--steel); }
.formulario input[type="file"] { font-size: .9rem; }
.previa { width: 190px; border-radius: 10px; margin-bottom: .3rem; }
.opciones { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.check { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.check input { width: 18px; height: 18px; }
.maxbox { border: 2px dashed var(--steel); border-radius: 12px; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }
.maxbox legend { font-weight: 700; color: var(--steel); padding: 0 .5rem; }
.maxbox[hidden] { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.galeria-actual { display: flex; flex-wrap: wrap; gap: .8rem; }
.galeria-item { align-items: center; font-size: .8rem; font-weight: 500; }
.galeria-item img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: .3rem; }
.acciones-form { display: flex; gap: .8rem; align-items: center; }
.acciones-form--fija { position: sticky; bottom: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .6rem; width: fit-content; box-shadow: 0 8px 24px rgba(19,20,23,.12); }

/* ---- textos agrupados ---- */
.grupo { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.grupo summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; font-size: 1.02rem; list-style: none; }
.grupo summary::before { content: "▸ "; color: var(--steel); }
.grupo[open] summary::before { content: "▾ "; }
.grupo__campos { padding: .4rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 1rem; }
form.formulario > .grupo { margin: 0; }

/* ---- clientes ---- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.logo-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.logo-card img { max-height: 60px; max-width: 100%; object-fit: contain; }
.logo-card span { font-size: .8rem; color: var(--muted); }

/* ---- login ---- */
.login-body { display: grid; place-items: center; background: var(--bg); }
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 2.5rem; width: min(92vw, 380px); display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 20px 50px rgba(19,20,23,.1); text-align: center;
}
.login-card h1 { letter-spacing: .06em; }
.login-card p { color: var(--muted); font-size: .9rem; }
.login-card label { text-align: left; display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .9rem; }
.login-card input { font: inherit; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; }

@media (max-width: 760px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side__foot { margin: 0; flex-direction: row; }
  .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .fila { flex-wrap: wrap; }
  .fila__acciones { width: 100%; justify-content: flex-end; }
}
