/* ═══════════════════════════════════════════════════════
   GestiShark CRM · Estilos globales
   Paleta aprobada: Shark orange #FF6200 sobre fondo claro
═══════════════════════════════════════════════════════ */
:root {
  /* Shark */
  --o: #FF6200;
  --od: #CC4E00;
  --ol: #FF8533;
  --os: #FFF1E5;
  --ob: #FFCFA8;

  /* Neutros */
  --bg: #FAFAFA;
  --s: #FFFFFF;
  --s2: #F5F5F5;
  --s3: #EEEEEE;
  --bdr: #E5E5E5;
  --bdr2: #D4D4D4;

  /* Texto */
  --t1: #171717;
  --t2: #404040;
  --t3: #737373;
  --t4: #A3A3A3;

  /* Estado */
  --g: #16A34A;  --gbg: #F0FDF4;  --gbd: #BBF7D0;
  --r: #DC2626;  --rbg: #FEF2F2;  --rbd: #FECACA;
  --y: #B45309;  --ybg: #FFFBEB;  --ybd: #FDE68A;
  --b: #1D4ED8;  --bbg: #EFF6FF;  --bbd: #BFDBFE;

  /* Sombras y radios */
  --sh: 0 1px 3px rgba(0,0,0,.05);
  --sh2: 0 6px 22px rgba(0,0,0,.1);
  --sh3: 0 20px 50px rgba(0,0,0,.15);
  --ra: 7px;
  --rb: 10px;
  --rc: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--o); text-decoration: none; }
a:hover { color: var(--od); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bdr2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t4); }

/* ═══════════════ FLASH MESSAGES ═══════════════ */
.flash-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 400px;
}
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  border-radius: var(--rb);
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--sh2);
  border: 1px solid;
  transition: opacity .3s;
  animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.flash-success { background: var(--gbg); color: var(--g); border-color: var(--gbd); }
.flash-danger  { background: var(--rbg); color: var(--r); border-color: var(--rbd); }
.flash-warning { background: var(--ybg); color: var(--y); border-color: var(--ybd); }
.flash-info    { background: var(--bbg); color: var(--b); border-color: var(--bbd); }
.flash-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; line-height: 1;
  color: inherit; opacity: .6;
}
.flash-close:hover { opacity: 1; }

/* ═══════════════ BOTONES ═══════════════ */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--ra);
  font-family: inherit; font-size: .88rem; font-weight: 700;
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--o); color: #fff;
  box-shadow: 0 1px 2px rgba(255,98,0,.2);
}
.btn-primary:hover { background: var(--od); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,98,0,.3); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--s); color: var(--t1); border-color: var(--bdr2); }
.btn-secondary:hover { background: var(--s2); border-color: var(--t4); }
.btn-ghost { background: transparent; color: var(--t2); }
.btn-ghost:hover { background: var(--s2); color: var(--t1); }

.btn-block { width: 100%; }

/* ═══════════════ PÁGINA DE LOGIN ═══════════════ */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(255,98,0,.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(255,98,0,.08), transparent 60%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}

.login-wrap {
  position: relative;
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--s);
  border-radius: var(--rc);
  box-shadow: var(--sh3);
  overflow: hidden;
  border: 1px solid var(--bdr);
}

/* Lado izquierdo: brand */
.login-brand {
  background: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
  color: #fff;
  padding: 48px 44px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-brand::before {
  content: "";
  position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--o) 0%, transparent 60%);
  opacity: .25;
  pointer-events: none;
}
.brand-head { display: flex; align-items: center; gap: 14px; z-index: 1; }
.brand-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--o), var(--od));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 8px 20px rgba(255,98,0,.35);
}
.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 3px;
  line-height: 1;
}
.brand-name em { color: var(--o); font-style: normal; }
.brand-tag {
  font-size: .62rem;
  color: #888;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 3px;
}

.brand-hero { margin-top: 60px; z-index: 1; position: relative; }
.brand-eyebrow {
  display: inline-block;
  font-size: .65rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--o);
  background: rgba(255,98,0,.12);
  padding: 5px 10px; border-radius: 4px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,98,0,.25);
}
.brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}
.brand-title .hl { color: var(--o); }
.brand-copy {
  font-size: .92rem;
  color: #bbb;
  line-height: 1.6;
  max-width: 380px;
}

.brand-foot {
  display: flex; align-items: center; gap: 14px;
  font-size: .72rem;
  color: #666;
  z-index: 1; position: relative;
}
.brand-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); }

/* Lado derecho: formulario */
.login-form-wrap {
  padding: 52px 48px;
  display: flex; flex-direction: column; justify-content: center;
}
.form-head { margin-bottom: 32px; }
.form-head h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 6px;
}
.form-head p { color: var(--t3); font-size: .88rem; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .78rem; font-weight: 700;
  color: var(--t2);
  margin-bottom: 7px;
  letter-spacing: .3px;
}
.form-input {
  width: 100%;
  background: var(--s);
  border: 1.5px solid var(--bdr);
  border-radius: var(--ra);
  padding: 12px 14px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--t1);
  transition: all .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--o);
  box-shadow: 0 0 0 3px rgba(255,98,0,.12);
}
.form-input::placeholder { color: var(--t4); }
.form-input.has-error { border-color: var(--r); }

.form-error {
  display: block;
  font-size: .75rem;
  color: var(--r);
  margin-top: 5px;
  font-weight: 500;
}

.form-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--t2);
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--o);
  cursor: pointer;
}
.form-help-link {
  font-size: .8rem;
  color: var(--o);
  font-weight: 600;
}

.form-foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--bdr);
  text-align: center;
  font-size: .78rem;
  color: var(--t3);
}
.form-foot strong { color: var(--t1); }

/* ═══════════════ PÁGINA DE ERROR ═══════════════ */
.err-page {
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(255,98,0,.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
}
.err-wrap { width: 100%; max-width: 520px; }
.err-card {
  background: var(--s);
  border: 1px solid var(--bdr);
  border-radius: var(--rc);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--sh2);
}
.err-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--o);
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.err-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 10px;
}
.err-msg {
  color: var(--t3);
  font-size: .92rem;
  margin-bottom: 28px;
}

/* ═══════════════ DASHBOARD (mínimo) ═══════════════ */
.topbar {
  background: var(--s);
  border-bottom: 1px solid var(--bdr);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 2px;
}
.topbar-brand .logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--o), var(--od));
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.1rem;
}
.topbar-brand em { color: var(--o); font-style: normal; }
.topbar-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  font-size: .85rem;
  color: var(--t2);
}
.topbar-user .chip {
  background: var(--os);
  color: var(--o);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.dash-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.dash-hero {
  background: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
  color: #fff;
  border-radius: var(--rc);
  padding: 36px 40px;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.dash-hero::before {
  content: "";
  position: absolute; top: -30%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--o) 0%, transparent 60%);
  opacity: .3;
}
.dash-hero h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; position: relative; }
.dash-hero p { color: #bbb; position: relative; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.dash-card {
  background: var(--s);
  border: 1px solid var(--bdr);
  border-radius: var(--rb);
  padding: 22px;
  transition: all .2s;
}
.dash-card:hover { border-color: var(--ob); transform: translateY(-2px); box-shadow: var(--sh2); }
.dash-card .ic { font-size: 1.6rem; margin-bottom: 10px; }
.dash-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.dash-card p { color: var(--t3); font-size: .82rem; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; max-width: 460px; }
  .login-brand { padding: 32px 28px; }
  .brand-hero { margin-top: 28px; }
  .brand-title { font-size: 1.6rem; }
  .login-form-wrap { padding: 36px 28px; }
}
@media (max-width: 520px) {
  .flash-container { left: 12px; right: 12px; max-width: none; }
  .dash-hero { padding: 24px; }
  .dash-hero h1 { font-size: 1.4rem; }
}

/* ═══════════════ MÓDULO CONFIG ═══════════════ */
.topbar-nav { display: flex; gap: 4px; margin-left: 20px; }
.topbar-nav a {
  padding: 8px 14px; border-radius: 6px;
  font-size: .85rem; font-weight: 600; color: var(--t2);
}
.topbar-nav a:hover { background: var(--s2); color: var(--t1); }
.topbar-nav a.on { background: var(--os); color: var(--o); }

.cfg-side {
  position: fixed; top: 58px; left: 0; bottom: 0;
  width: 240px; background: var(--s);
  border-right: 1px solid var(--bdr);
  padding: 20px 12px; overflow-y: auto;
}
.cfg-side-title {
  font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--t4); padding: 0 10px 10px;
}
.cfg-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 7px;
  font-size: .88rem; font-weight: 600; color: var(--t2);
  margin-bottom: 2px;
}
.cfg-side-link:hover { background: var(--s2); color: var(--t1); }
.cfg-side-link.on { background: var(--os); color: var(--o); border-left: 3px solid var(--o); padding-left: 9px; }

.cfg-main { margin-left: 240px; padding: 28px 36px; max-width: 1200px; }

.cfg-hero {
  background: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
  color: #fff; border-radius: var(--rc);
  padding: 30px 36px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.cfg-hero::before {
  content: ""; position: absolute; top: -30%; right: -5%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--o), transparent 60%);
  opacity: .3;
}
.cfg-hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; position: relative; }
.cfg-hero p { color: #bbb; position: relative; font-size: .9rem; }

.cfg-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.cfg-head h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 3px; }
.cfg-sub { color: var(--t3); font-size: .85rem; }

.cfg-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card {
  background: var(--s); border: 1px solid var(--bdr);
  border-radius: var(--rb); padding: 18px;
  border-left: 3px solid var(--bdr2);
}
.stat-val { font-size: 1.8rem; font-weight: 800; color: var(--t1); }
.stat-lbl { font-size: .72rem; color: var(--t3); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.stat-ok { border-left-color: var(--g); }
.stat-ok .stat-val { color: var(--g); }
.stat-warn { border-left-color: var(--y); }
.stat-warn .stat-val { color: var(--y); }
.stat-info { border-left-color: var(--b); }
.stat-info .stat-val { color: var(--b); }

.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cfg-tile {
  background: var(--s); border: 1px solid var(--bdr);
  border-radius: var(--rb); padding: 22px;
  transition: all .2s; display: block;
}
.cfg-tile:hover { border-color: var(--ob); transform: translateY(-2px); box-shadow: var(--sh2); }
.tile-ic { font-size: 1.7rem; margin-bottom: 10px; }
.cfg-tile h3 { font-size: 1rem; color: var(--t1); margin-bottom: 4px; }
.cfg-tile p { font-size: .82rem; color: var(--t3); }

/* Forms */
.cfg-form { background: var(--s); border: 1px solid var(--bdr); border-radius: var(--rc); padding: 0; }
.form-section {
  padding: 24px 28px; border-bottom: 1px solid var(--bdr);
}
.form-section:last-of-type { border-bottom: none; }
.form-section h2 { font-size: 1rem; font-weight: 700; color: var(--t1); margin-bottom: 16px; }
.form-grid { display: grid; gap: 14px 18px; }
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-actions { padding: 20px 28px; background: var(--s2); display: flex; justify-content: flex-end; gap: 10px; border-radius: 0 0 var(--rc) var(--rc); }

.logo-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 14px; background: var(--s2); border-radius: var(--rb); }
.logo-preview img { max-height: 64px; max-width: 200px; border-radius: 4px; }
.logo-current { font-size: .78rem; color: var(--t3); font-family: 'DM Mono', monospace; }

.cfg-search { display: flex; gap: 10px; margin-bottom: 18px; }
.cfg-search input { flex: 1; }

/* Tablas */
.data-table-wrap { background: var(--s); border: 1px solid var(--bdr); border-radius: var(--rb); overflow: hidden; margin-bottom: 18px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th {
  background: var(--s2); text-align: left;
  padding: 12px 14px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--t3);
  border-bottom: 1px solid var(--bdr);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--bdr); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--s2); }
.row-inactive { opacity: .55; }
.row-actions { text-align: right; white-space: nowrap; }

.mono { font-family: 'DM Mono', monospace; font-size: .78rem; }
.truncate { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--t4); padding: 40px !important; font-style: italic; }

.chip { background: var(--os); color: var(--o); padding: 3px 9px; border-radius: 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.chip-action { background: var(--bbg); color: var(--b); }
.badge-ok { background: var(--gbg); color: var(--g); padding: 3px 9px; border-radius: 4px; font-size: .72rem; font-weight: 700; border: 1px solid var(--gbd); }
.badge-danger { background: var(--rbg); color: var(--r); padding: 3px 9px; border-radius: 4px; font-size: .72rem; font-weight: 700; border: 1px solid var(--rbd); }
.badge-muted { background: var(--s3); color: var(--t3); padding: 3px 9px; border-radius: 4px; font-size: .72rem; font-weight: 700; }

.btn-ghost-sm {
  background: transparent; border: 1px solid var(--bdr2);
  padding: 5px 10px; border-radius: 5px;
  font-size: .75rem; font-weight: 600; cursor: pointer;
  font-family: inherit; color: var(--t2);
  text-decoration: none; display: inline-block;
}
.btn-ghost-sm:hover { background: var(--s2); color: var(--t1); }
.btn-ghost-sm.danger { color: var(--r); border-color: var(--rbd); }
.btn-ghost-sm.danger:hover { background: var(--rbg); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pg-link { padding: 8px 16px; border: 1px solid var(--bdr2); border-radius: 6px; font-size: .82rem; font-weight: 600; color: var(--t2); }
.pg-link:hover { background: var(--s2); color: var(--t1); }
.pg-info { font-size: .8rem; color: var(--t3); }

.form-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--t2); cursor: pointer; margin-bottom: 10px; }

@media (max-width: 900px) {
  .cfg-side { display: none; }
  .cfg-main { margin-left: 0; padding: 20px; }
  .cfg-stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ═══════════════ CATÁLOGOS ═══════════════ */
.cob-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.cob-card {
  background: var(--s); border: 1px solid var(--bdr);
  border-radius: var(--rb); padding: 20px;
  transition: all .2s; display: flex; flex-direction: column;
}
.cob-card:hover { box-shadow: var(--sh2); transform: translateY(-2px); }
.cob-card.inactive { opacity: .55; }
.cob-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cob-pct {
  width: 54px; height: 54px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.cob-clave { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--t3); letter-spacing: 1px; }
.cob-nombre { font-weight: 800; font-size: 1.05rem; color: var(--t1); }
.cob-desc { color: var(--t2); font-size: .85rem; margin-bottom: 12px; }
.cob-incluye { list-style: none; margin-bottom: 14px; }
.cob-incluye li {
  padding: 5px 0 5px 20px; font-size: .82rem; color: var(--t2);
  position: relative;
}
.cob-incluye li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--g); font-weight: 700;
}
.cob-meta { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--bdr); font-size: .75rem; color: var(--t3); margin-bottom: 10px; }
.cob-actions { display: flex; gap: 6px; }

.cat-filters { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px; border-radius: 20px;
  font-size: .78rem; font-weight: 600;
  background: var(--s); border: 1px solid var(--bdr2);
  color: var(--t2);
}
.pill:hover { background: var(--s2); color: var(--t1); }
.pill.on { background: var(--o); color: #fff; border-color: var(--o); }

.chip-arrendador { background: var(--os); color: var(--o); }
.chip-arrendatario { background: var(--bbg); color: var(--b); }
.chip-fiador { background: #F5F3FF; color: #7C3AED; }
.chip-propiedad { background: var(--gbg); color: var(--g); }

/* ═══════════════ ARRENDADORES ═══════════════ */
.main-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 28px; }

.cell-name { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--o), var(--od));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .78rem; flex-shrink: 0;
}
.avatar-lg {
  width: 72px; height: 72px; border-radius: 16px;
  background: linear-gradient(135deg, var(--o), var(--od));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(255,98,0,.3);
  flex-shrink: 0;
}

.head-breadcrumb { margin-bottom: 8px; }
.head-breadcrumb a { font-size: .82rem; color: var(--t3); font-weight: 600; }
.head-breadcrumb a:hover { color: var(--o); }

.detail-hero {
  display: flex; align-items: center; gap: 18px;
  background: var(--s); border: 1px solid var(--bdr);
  border-radius: var(--rc); padding: 22px 26px;
  margin-bottom: 20px;
}
.detail-hero.inactive { opacity: .6; }
.detail-head-info { flex: 1; }
.detail-folio { font-size: .75rem; color: var(--t3); letter-spacing: 1px; font-weight: 700; }
.detail-head-info h1 { font-size: 1.5rem; margin: 2px 0 8px; }
.detail-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 8px; }

.alert-warn {
  background: var(--ybg); border: 1px solid var(--ybd);
  color: var(--y); padding: 12px 16px; border-radius: var(--rb);
  margin-bottom: 18px; font-size: .88rem;
}

.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.detail-card {
  background: var(--s); border: 1px solid var(--bdr);
  border-radius: var(--rb); padding: 20px;
}
.detail-card h2 { font-size: .95rem; font-weight: 700; color: var(--t1); margin-bottom: 12px; }
.detail-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: .85rem; }
.detail-dl dt { color: var(--t3); font-weight: 600; }
.detail-dl dd { color: var(--t1); }
.empty-inline { color: var(--t4); font-style: italic; font-size: .85rem; }

.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.doc-upload-form {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px;
  padding: 14px; background: var(--s2); border-radius: var(--rb);
}

@media (max-width: 820px) {
  .detail-hero { flex-direction: column; text-align: center; }
  .detail-grid { grid-template-columns: 1fr; }
  .doc-upload-form { grid-template-columns: 1fr; }
}
