/* ============================================================
   Manual Digital Domus — estilos
   ============================================================ */
:root {
    --c-admin: #4338ca;
    --c-super: #2563eb;
    --c-administrativo: #0d9488;
    --c-vendedor: #ea580c;
    --c-creativo: #9333ea;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}
a { color: inherit; }

/* ── Barra superior ── */
.m-nav {
    position: sticky; top: 0; z-index: 50;
    background: #0f172a; color: #fff;
    display: flex; align-items: center; gap: 1rem;
    padding: .6rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    flex-wrap: wrap;
}
.m-nav .brand { font-weight: 800; font-size: 1.05rem; letter-spacing: .3px; }
.m-nav a.link { color: #cbd5e1; text-decoration: none; font-size: .9rem; padding: .25rem .5rem; border-radius: 6px; }
.m-nav a.link:hover, .m-nav a.link.active { background: rgba(255,255,255,.12); color: #fff; }
.m-nav .spacer { flex: 1; }

/* ── Contenedor ── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }

/* ── Hero ── */
.hero {
    border-radius: 18px; padding: 2.4rem 2rem; color: #fff;
    background: linear-gradient(135deg, #312e81, #1e3a8a);
    margin-bottom: 2rem;
}
.hero h1 { margin: 0 0 .4rem; font-size: 2rem; }
.hero p { margin: 0; opacity: .92; max-width: 640px; }
.hero.role { display: flex; align-items: center; gap: 1.4rem; }
.hero .avatar { width: 78px; height: 78px; min-width: 78px; border-radius: 50%;
    background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 2.4rem; }

.theme-admin .hero, .theme-admin { --c: var(--c-admin); }
.theme-super .hero, .theme-super { --c: var(--c-super); }
.theme-administrativo .hero, .theme-administrativo { --c: var(--c-administrativo); }
.theme-vendedor .hero, .theme-vendedor { --c: var(--c-vendedor); }
.theme-creativo .hero, .theme-creativo { --c: var(--c-creativo); }
.hero.role { background: linear-gradient(135deg, var(--c), #0f172a); }

h2.sec { font-size: 1.3rem; margin: 2.4rem 0 1rem; display: flex; align-items: center; gap: .5rem; }
h2.sec .bi { color: var(--c, #4338ca); }
h3.proc { font-size: 1.05rem; margin: 1.6rem 0 .8rem; padding-left: .6rem; border-left: 4px solid var(--c, #4338ca); }

.lead { color: var(--muted); margin-top: -.4rem; }

/* ── Tarjetas genéricas ── */
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 1.1rem 1.2rem;
}
.card .ico { font-size: 1.6rem; }

/* ── Tarjetas de rol (home) ── */
.role-card {
    display: block; text-decoration: none; color: inherit;
    border-radius: 14px; padding: 1.2rem; background: #fff;
    border: 1px solid var(--line); border-top: 5px solid var(--rc, #4338ca);
    transition: transform .15s, box-shadow .15s;
}
.role-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(2,6,23,.10); }
.role-card .ic { font-size: 2rem; color: var(--rc); }
.role-card h3 { margin: .4rem 0 .3rem; }
.role-card p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ── Diagrama de flujo (pasos) ── */
.flow { display: flex; flex-wrap: wrap; gap: 0; align-items: stretch; margin: .5rem 0 1rem; }
.step {
    position: relative; flex: 1 1 150px; min-width: 150px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: .9rem .8rem .9rem 2.6rem; margin: .45rem 1.1rem .45rem 0;
}
.step:not(:last-child)::after {
    content: "\F285"; font-family: "bootstrap-icons";
    position: absolute; right: -1.05rem; top: 50%; transform: translateY(-50%);
    color: var(--c, #4338ca); font-size: 1.1rem;
}
.step .n {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--c, #4338ca); color: #fff; display: grid; place-items: center;
    font-size: .8rem; font-weight: 700;
}
.step .t { font-weight: 600; font-size: .9rem; display: block; }
.step .d { font-size: .78rem; color: var(--muted); }

/* Flujo vertical (móvil / procesos largos) */
@media (max-width: 720px) {
    .step:not(:last-child)::after { content: "\F282"; right: 50%; top: auto; bottom: -1rem; transform: translateX(50%); }
    .step { margin-right: 0; margin-bottom: 1.4rem; }
    .flow { flex-direction: column; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* ── Badges de estado / pipeline ── */
.pipe { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.tag { font-size: .76rem; padding: .25rem .6rem; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 600; }
.tag.g { background: #dcfce7; color: #166534; }
.tag.y { background: #fef9c3; color: #854d0e; }
.tag.r { background: #fee2e2; color: #991b1b; }
.tag.b { background: #dbeafe; color: #1e40af; }
.tag.gray { background: #e2e8f0; color: #334155; }

/* ── KPIs del dashboard (mock) ── */
.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: .8rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem; text-align: center; }
.kpi .v { font-size: 1.25rem; font-weight: 800; color: var(--c, #4338ca); }
.kpi .l { font-size: .78rem; color: var(--muted); }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2,1fr); } }

/* ── Lista de permisos ── */
.perm { display: flex; flex-wrap: wrap; gap: .45rem; }
.perm .p { font-size: .8rem; padding: .3rem .65rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.perm .p .bi { color: #16a34a; }

/* ── Callout ── */
.callout { border-left: 4px solid var(--c, #4338ca); background: #fff; border-radius: 10px;
    padding: .8rem 1rem; margin: 1rem 0; font-size: .9rem; }
.callout.warn { border-color: #d97706; background: #fffbeb; }

/* ── Mapa de módulos ── */
.mods { display: grid; grid-template-columns: repeat(4,1fr); gap: .8rem; }
.mod { background:#fff; border:1px solid var(--line); border-radius:12px; padding:1rem; text-align:center; }
.mod .bi { font-size:1.8rem; color:#4338ca; }
.mod .t { font-weight:600; font-size:.85rem; margin-top:.4rem; }
@media (max-width: 720px){ .mods { grid-template-columns: repeat(2,1fr);} }

/* ── Capturas / mockups de pantalla ── */
figure.shot { margin: 0 0 1.2rem; }
figure.shot img {
    width: 100%; display: block; border-radius: 12px;
    border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(2,6,23,.10);
    background: #fff;
}
figure.shot figcaption {
    font-size: .8rem; color: var(--muted); text-align: center; margin-top: .5rem;
}
.shot-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.2rem; }
@media (max-width: 720px) { .shot-grid { grid-template-columns: 1fr; } }

footer.m-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 1rem; }
