/* Albariza Ingeniería: the simulated company's own look. Deliberately not
   OwnMind's: in a demo this is the customer's house, not the product. */
:root {
  --petrol: #0f4c5c; --petrol-dark: #0a3540; --petrol-wash: #e6eff1;
  --orange: #d9580b; --orange-wash: #fdeee3;
  --ink: #1b2a2f; --muted: #5d6d72; --line: #dbe1e2; --paper: #fff; --ground: #f5f3ee;
  --ok: #1f6f4a; --ok-wash: #e5f3ec; --danger: #a3261f; --danger-wash: #fbeceb;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--petrol-dark); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.1rem; } h3 { font-size: 0.95rem; }
p { margin: 0; } a { color: var(--petrol); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(217, 88, 11, 0.5); outline-offset: 2px; border-radius: 4px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 400; font-size: 1.05rem;
  color: #fff; text-decoration: none; letter-spacing: 0.01em; }
.brand b { font-weight: 700; }
.brand__mark { width: 1.9rem; height: 1.9rem; border-radius: 6px; background: var(--orange); flex: none;
  clip-path: polygon(50% 8%, 96% 92%, 70% 92%, 50% 52%, 30% 92%, 4% 92%); }
.brand--lg { color: var(--petrol-dark); font-size: 1.3rem; }
.fiction { font-size: 0.75rem; color: var(--muted); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem;
  padding: 0 0.9rem; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--petrol); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.button:hover { background: var(--petrol-dark); }
.button--lg { min-height: 2.9rem; padding: 0 1.4rem; font-size: 1rem; }
.button--quiet { background: transparent; color: var(--petrol); border-color: var(--line); }
.button--quiet:hover { background: var(--petrol-wash); }
.button--danger { background: transparent; color: var(--danger); border-color: var(--line); }
.button--danger:hover { background: var(--danger-wash); }
.button--sm { min-height: 1.8rem; padding: 0 0.6rem; font-size: 0.8rem; }
select, input[type="search"], textarea { font: inherit; padding: 0.4rem 0.6rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); }
textarea { width: 100%; min-height: 22rem; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-content: center; gap: 1rem; padding: 1.5rem; justify-items: center; }
.signin__card { width: min(100%, 27rem); display: grid; gap: 1rem; padding: 2rem; background: var(--paper);
  border-radius: 12px; border-top: 6px solid var(--petrol); box-shadow: 0 10px 30px rgba(15, 76, 92, 0.12); }
.signin__card p { color: var(--muted); }
.signin__try { padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; font-size: 0.85rem; }
.signin__try ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.signin__try code { background: var(--petrol-wash); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* Shell */
.shell { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.side { background: var(--petrol); color: #fff; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; }
.side .fiction { margin-top: auto; color: rgba(255, 255, 255, 0.6); }
.nav { display: grid; gap: 0.15rem; }
.nav a { padding: 0.5rem 0.75rem; border-radius: var(--radius); color: rgba(255, 255, 255, 0.82);
  text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--petrol-dark); font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.who { display: flex; align-items: center; gap: 0.6rem; }
.who div { display: grid; line-height: 1.25; } .who small { color: var(--muted); font-size: 0.75rem; }
.avatar { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; flex: none;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 0.8rem; }
.view { padding: 1.5rem; display: grid; gap: 1.25rem; align-content: start; max-width: 72rem; width: 100%; }

.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem; }
.head p { color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.split { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
.stat b { display: block; font-size: 1.7rem; color: var(--petrol-dark); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--petrol-wash);
  color: var(--petrol-dark); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.chip--warm { background: var(--orange-wash); color: #8a3a06; }
.chip--ok { background: var(--ok-wash); color: var(--ok); }
.chip--plain { background: var(--ground); color: var(--muted); }
.notice { padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--petrol-wash); color: var(--petrol-dark); font-size: 0.88rem; }
.notice--locked { background: var(--ground); border: 1px dashed var(--line); color: var(--muted); }
.notice--locked::before { content: "🔒 "; }
.notice--danger { background: var(--danger-wash); color: var(--danger); }

dl.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; }
dl.facts dt { color: var(--muted); font-size: 0.85rem; } dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 0.4rem 0.6rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.link { cursor: pointer; } tr.link:hover td { background: var(--petrol-wash); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { text-decoration: none; font-weight: 600; } td a:hover { text-decoration: underline; }
.icon { display: inline-block; width: 1.3rem; text-align: center; margin-right: 0.3rem; }

.doc { font-size: 0.95rem; line-height: 1.6; overflow-wrap: anywhere; }
.doc h1 { font-size: 1.35rem; margin: 0 0 0.6rem; } .doc h2 { font-size: 1.1rem; margin: 1.1rem 0 0.4rem; }
.doc h3 { margin: 0.9rem 0 0.3rem; } .doc p { margin: 0 0 0.7rem; } .doc ul, .doc ol { margin: 0 0 0.7rem; padding-left: 1.3rem; }
.doc table { margin-bottom: 0.8rem; } .doc iframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); }
.access { display: grid; gap: 0.5rem; }
.access li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.access ul { margin: 0; padding: 0; list-style: none; }
.access form { display: grid; gap: 0.4rem; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
  .side .fiction { display: none; }
  .nav { display: flex; flex-wrap: wrap; }
  .split { grid-template-columns: 1fr; }
  .view { padding: 1rem; }
}
