:root {
  --navy: #003366;
  --blue: #00509e;
  --cyan: #00a5cf;
  --bg: #edf4fa;
  --panel: #ffffff;
  --text: #0c2746;
  --muted: #5a708a;
  --border: #d7e4ef;
  --success-bg: #e7f8ee;
  --success-text: #157347;
  --warning-bg: #fff3db;
  --warning-text: #9a6700;
  --danger-bg: #ffe5ea;
  --danger-text: #b42318;
  --info-bg: #e7f1ff;
  --info-text: #00509e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: linear-gradient(180deg, #eaf2f8 0%, #f7fbfe 100%); }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #06498c 60%, #0779b4 100%);
  color: #fff; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; min-height: 100vh; overflow: hidden;
}
.sidebar::after {
  content:""; position:absolute; right:-120px; bottom:-40px; width:320px; height:320px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 68%);
}
.brand-block { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.brand-block-v6 { align-items: flex-start; }
.brand-logo-wrap-v6 { width: 64px; min-width: 64px; height: 64px; border-radius: 24px; background: rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.12); }
.brand-logo-img-v6 { width: 46px; max-width: 46px; height: auto; }
.brand-copy { min-width: 0; }
.brand-overline { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.78); font-weight: 800; margin-bottom: 4px; }
.brand-title { font-size: 24px; font-weight: 900; letter-spacing: -.03em; line-height: 1.02; }
.brand-subtitle { color: rgba(255,255,255,.84); font-size: 12px; line-height: 1.35; max-width: 175px; }
.sidebar-cockpit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; position:relative; z-index:1; }
.sidebar-cockpit-kpi { padding:10px 12px; border-radius:18px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.12); }
.sidebar-cockpit-kpi span { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:rgba(255,255,255,.72); }
.sidebar-cockpit-kpi strong { display:block; margin-top:6px; font-size:15px; color:#fff; }
.nav-stack { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.nav-link { display: block; padding: 15px 16px; border-radius: 20px; background: rgba(255,255,255,.10); font-size: 16px; font-weight: 700; transition: .2s ease; }
.nav-link:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.nav-link.active { background: #fff; color: var(--navy); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.sidebar-panel { padding: 14px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); position: relative; z-index: 1; }
.sidebar-panel-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.74); margin-bottom: 12px; }
.sidebar-panel-v6 .ghost-chip { justify-content: flex-start; }
.sidebar-footer { margin-top: auto; padding: 14px; border-radius: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.sidebar-footer-v6 { backdrop-filter: blur(10px); }
.sidebar-user { font-size: 16px; font-weight: 800; }
.sidebar-muted { font-size: 12px; color: rgba(255,255,255,.78); }
.sidebar-mini-status { display:flex; align-items:center; gap:8px; margin-top:10px; font-size:12px; color:#dce9f5; }
.status-dot { width:8px; height:8px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 4px rgba(74,222,128,.15); }
.sidebar-footer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.sidebar-footer-grid div { padding:10px 12px; border-radius:16px; background:rgba(255,255,255,.08); }
.sidebar-footer-grid span { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:rgba(255,255,255,.68); }
.sidebar-footer-grid strong { display:block; margin-top:5px; font-size:14px; }

.main-area { padding: 20px 22px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.topbar h1 { font-size: 56px; line-height: .98; margin: 0; letter-spacing: -.04em; }
.topbar p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.page-overline { display:inline-flex; margin-bottom:6px; font-size:10px; text-transform:uppercase; letter-spacing:.16em; color:#5d88b3; font-weight:800; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.panel, .stat-card, .hero-card, .auth-card, .auth-hero { background: var(--panel); border: 1px solid var(--border); border-radius: 30px; box-shadow: 0 12px 35px rgba(8, 42, 80, .06); }
.panel { padding: 22px; }
.panel-dark { background: linear-gradient(135deg, var(--navy) 0%, #0b4d8f 70%, var(--cyan) 100%); color: #fff; border-color: rgba(255,255,255,.12); }
.panel-dark p, .panel-dark .mini-muted, .panel-dark label { color: rgba(255,255,255,.78); }
.panel-plain { background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%); }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.panel-header h3 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.panel-header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.hero-card { padding: 26px; display: flex; justify-content: space-between; gap: 22px; align-items: center; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #0c4f90 72%, var(--cyan) 100%); }
.hero-card.compact { padding: 22px 24px; }
.hero-card-xl h2 { font-size: 44px; line-height: 1.02; }
.hero-card h2 { margin: 8px 0; font-size: 40px; line-height: 1.04; letter-spacing: -.04em; }
.hero-card p { margin: 0; max-width: 920px; color: rgba(255,255,255,.92); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-actions.align-right { justify-content: flex-end; }
.hero-figure { min-width: 136px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.10); }
.hero-figure strong { display: block; font-size: 24px; }
.hero-figure span { display: block; margin-top: 4px; color: rgba(255,255,255,.85); font-size: 12px; }
.hero-microstats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.hero-microstats strong { display: block; font-size: 22px; }
.hero-microstats span { color: rgba(255,255,255,.78); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.hero-client-v6 .hero-figure { min-width: 140px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 12px; font-size: 12px; letter-spacing: .04em; font-weight: 700; text-transform: uppercase; background: rgba(255,255,255,.14); }
.pill-light { background: rgba(255,255,255,.16); color: #fff; }

.stats-grid { display: grid; gap: 18px; }
.stats-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stats-grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.stats-grid-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.stats-grid-8 { grid-template-columns: repeat(8, minmax(0,1fr)); }
.stat-card { padding: 16px 18px; }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 22px; }
.stat-card.accent-primary { background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%); border-color: #c8dff1; }
.stat-card.accent-success { background: linear-gradient(180deg, #ffffff 0%, #f2fff7 100%); border-color: #cdeed9; }
.stat-card.accent-warning { background: linear-gradient(180deg, #ffffff 0%, #fffaf2 100%); border-color: #f3dfbe; }

.grid-2, .grid-2-colwide, .grid-3, .grid-2-tight { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1.1fr .9fr; }
.grid-2-colwide { grid-template-columns: 1.15fr .85fr; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2-tight { grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 16px; }
.mb-lg { margin-bottom: 22px; }
.mt-lg { margin-top: 22px; }
.mt-md { margin-top: 16px; }
.mt-xs { margin-top: 6px; }
.gap-md { gap: 14px; }
.row-between { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wrap-mobile { flex-wrap: wrap; }
.button-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.button-row.left { justify-content: flex-start; }
.legend-row { display: flex; gap: 10px; flex-wrap: wrap; }

.alert { border-radius: 18px; padding: 16px 18px; margin-bottom: 18px; }
.alert ul { margin: 8px 0 0 18px; }
.alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid #c8ebd6; }
.alert-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid #f3c5cc; }

.period-form, .search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.period-form select, .search-form input, .search-form select,
input, select, textarea {
  width: 100%; border-radius: 16px; border: 1px solid var(--border); background: #fff; color: var(--text); padding: 13px 14px; font-size: 15px; outline: none;
}
.period-form select { min-width: 90px; }
.search-form input { min-width: 280px; }
textarea { resize: vertical; min-height: 92px; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.check-row input { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; padding: 13px 18px; border: 1px solid transparent; cursor: pointer; font-size: 15px; font-weight: 700; text-decoration: none; }
.btn-small { padding: 9px 12px; font-size: 13px; border-radius: 14px; }
.btn-full { width: 100%; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #084b8d 72%, var(--cyan) 100%); }
.btn-secondary { color: var(--navy); background: #e7f4fb; border-color: #cae6f4; }
.btn-outline { color: var(--navy); background: #fff; border-color: #cfe1ef; }
.btn-light { color: var(--navy); background: #fff; }
.btn-outline-light { color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; }
.wide-table-wrap table { min-width: 1260px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: #f7fbff; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.success { background: var(--success-bg); color: var(--success-text); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); }
.badge.danger { background: var(--danger-bg); color: var(--danger-text); }
.badge.info, .badge.type-tributario, .badge.type-rrhh, .badge.type-finanzas, .badge.type-contable, .badge.type-interno { background: var(--info-bg); color: var(--info-text); }
.badge.muted { background: #eef3f8; color: #5e748f; }
.badge.type-tributario { background: #ffe6eb; color: #b42318; }
.badge.type-rrhh { background: #fff1da; color: #9a6700; }
.badge.type-finanzas { background: #e6f7ec; color: #157347; }
.badge.type-contable { background: #e7f1ff; color: #00509e; }
.badge.type-interno { background: #eef3f8; color: #4a637e; }

.score-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; }
.score-pill.good { background: var(--success-bg); color: var(--success-text); }
.score-pill.mid { background: var(--warning-bg); color: var(--warning-text); }
.score-pill.bad { background: var(--danger-bg); color: var(--danger-text); }

.list-card, .bordered-box, .credential-card, .client-row-card { border: 1px solid var(--border); border-radius: 22px; background: #fff; }
.list-card { padding: 14px 16px; }
.compact-list-card { padding: 12px 14px; }
.bordered-box { padding: 16px; }
.mini-muted, .muted { color: var(--muted); font-size: 14px; }
.credential-card { display: flex; justify-content: space-between; gap: 16px; padding: 16px; align-items: center; }
.credential-secret { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; min-width: 180px; }
.client-row-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px; color: inherit; }
.client-row-card:hover, .card-hover:hover { border-color: #b8d6eb; background: #f9fcfe; transform: translateY(-1px); }
.client-maincol { flex: 1; }
.client-meta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.client-row-aside { text-align: right; min-width: 180px; }
.client-row-aside span { display: block; font-weight: 800; }
.client-row-aside small { display: block; margin-top: 6px; color: var(--muted); }
.mini-badges-row { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.left-badges { justify-content: flex-start; }
.premium-row { box-shadow: 0 10px 24px rgba(6, 41, 78, .04); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.03fr .97fr; gap: 20px; padding: 16px; align-items: stretch; }
.auth-shell.wide { grid-template-columns: 1.1fr .9fr; }
.auth-hero { padding: 30px; background: linear-gradient(135deg, var(--navy) 0%, #084b8d 65%, var(--cyan) 100%); color: #fff; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-hero h1 { font-size: 56px; margin: 10px 0 8px; line-height: .96; }
.auth-hero p { font-size: 16px; max-width: 560px; margin: 0; color: rgba(255,255,255,.92); }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 28px; max-width: 620px; width: 100%; margin: auto; }
.auth-card h2 { font-size: 40px; margin: 0 0 8px; }
.auth-logo-top { display:flex; align-items:flex-start; gap:14px; margin-bottom:18px; }
.auth-logo-white { width: 150px; height:auto; }
.auth-logo-copy strong { display:block; margin-top:8px; font-size:14px; }
.auth-mini-overline { display:block; margin-top:4px; color:rgba(255,255,255,.72); font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.auth-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:20px; }
.auth-feature-grid-v6 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.auth-feature-card { padding:16px; border-radius:18px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); }
.auth-feature-kicker { display:inline-flex; padding:5px 9px; border-radius:999px; background:rgba(255,255,255,.12); text-transform:uppercase; letter-spacing:.08em; font-size:11px; font-weight:800; }
.auth-feature-card strong { display:block; margin-top:10px; font-size:17px; line-height:1.12; }
.auth-feature-card small { display:block; margin-top:8px; font-size:14px; line-height:1.35; color:rgba(255,255,255,.82); }
.auth-bottom-pills { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.auth-watermark { position:absolute; right:-90px; bottom:-60px; width:260px; opacity:.07; pointer-events:none; }
.auth-card-header { display:flex; gap:14px; align-items:center; margin-bottom:16px; }
.auth-logo-color { width:120px; height:auto; }
.auth-trust-strip { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.password-field { position:relative; }
.password-field input { padding-right: 84px; }
.password-toggle { position:absolute; right:8px; top:50%; transform:translateY(-50%); border:1px solid var(--border); background:#fff; border-radius:12px; padding:7px 12px; color:var(--navy); font-weight:800; }
.auth-inline-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.auth-card-footer { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:16px; }
.auth-mini-stat { padding:12px; border-radius:18px; background:#f8fbfe; border:1px solid var(--border); }
.auth-mini-stat strong { display:block; margin-bottom:6px; font-size:18px; }
.auth-mini-stat span { color:var(--muted); line-height:1.35; font-size:13px; }

.month-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.month-strip-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.month-strip-12 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.month-card { display:block; padding:16px; border-radius:20px; border:1px solid var(--border); background:#fff; }
.month-card.active { background:linear-gradient(180deg,#fff,#f0f8ff); border-color:#b9d7ea; }
.month-title { font-weight:800; }
.month-score { margin-top:8px; font-size:26px; font-weight:900; }
.month-score.good { color:var(--success-text); }
.month-score.mid { color:var(--warning-text); }
.month-score.bad { color:var(--danger-text); }
.month-metrics { margin-top:4px; color:var(--muted); font-size:12px; }

.chip-scroll { display:flex; gap:10px; flex-wrap:wrap; }
.chip { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:999px; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.08); color:#fff; font-weight:800; }
.ghost-chip { background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.18); }
.vertical-chips { display:flex; flex-direction:column; }

.command-bar { margin-bottom: 18px; }
.ops-ribbon {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: 28px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(12px); box-shadow: 0 14px 30px rgba(8,42,80,.05);
}
.ops-ribbon-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ops-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 18px; border: 1px solid #d7e5ef; background: #fff; color: var(--navy);
  font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.ops-pill.active { background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%); border-color: #bdd9ea; }
.ops-pill.soft-pill { background: #f4f9fd; color: #3e5f80; }
.ops-pill.primary-pill { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%); }
.ops-pill:hover { transform: translateY(-1px); }

.meta-strip { margin-bottom: 18px; }
.meta-chip-row { display:flex; flex-wrap:wrap; gap:10px; }
.meta-chip { display:inline-flex; align-items:center; padding:8px 12px; border-radius:999px; border:1px solid var(--border); background:#fff; color:var(--text); font-weight:800; font-size:12px; box-shadow: 0 8px 20px rgba(8,42,80,.04); }
.meta-chip.active { background:linear-gradient(135deg, rgba(0,51,102,.96), rgba(0,165,207,.92)); color:#fff; border-color:transparent; }

.mission-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.mission-card {
  border-radius: 28px; padding: 24px 26px; border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); box-shadow: 0 10px 24px rgba(6,41,78,.05);
}
.mission-card h3 { margin: 10px 0; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.mission-card p { margin: 0; color: var(--muted); font-size: 16px; }
.mini-kicker { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: #edf5fb; color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.mission-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.mini-pill { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: #f7fbff; border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700; }
.soft-card { background: linear-gradient(135deg, #f8fcff 0%, #eef8ff 100%); }
.mini-statline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.mini-statline:last-of-type { border-bottom: 0; }
.mini-statline strong { font-size: 34px; line-height: 1; }
.mini-statline span { color: var(--muted); font-weight: 700; }

.command-deck { display:grid; gap:14px; grid-template-columns:repeat(6,minmax(0,1fr)); }
.command-deck-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.command-deck-5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
.command-card { padding:18px; border-radius:24px; border:1px solid var(--border); background:linear-gradient(180deg, #fff, #f8fbfe); box-shadow:0 10px 24px rgba(6,41,78,.04); }
.command-card-top { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.command-card span { display:block; color:var(--muted); font-size:13px; font-weight:700; }
.command-card strong { font-size:28px; line-height:1; letter-spacing:-.04em; }
.command-card small { display:block; margin-top:10px; color:var(--muted); line-height:1.45; }
.command-card-dark { background:linear-gradient(135deg, var(--navy), var(--blue) 60%, var(--cyan)); color:#fff; border-color:transparent; }
.command-card-dark span, .command-card-dark small { color:rgba(255,255,255,.84); }
.progress-row { display: flex; flex-direction: column; gap: 8px; }
.progress-track { width: 100%; height: 12px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.progress-track.compact { background:#edf3f8; }
.panel-plain .progress-track { background: #edf3f8; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #35c4ff 0%, #7ef7d3 100%); }
.duo-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.duo-kpis div { padding: 14px 16px; border-radius: 18px; background: #f8fbfe; border: 1px solid var(--border); }
.duo-kpis span { display: block; font-size: 14px; color: var(--muted); }
.duo-kpis strong { display: block; margin-top: 6px; font-size: 28px; }
.timeline-steps { display: flex; flex-direction: column; gap: 12px; color: var(--text); }
.timeline-steps div { padding: 12px 14px; border-radius: 16px; background: #f8fbfe; border: 1px solid var(--border); }

.action-launcher { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.action-launcher.compact-launcher { grid-template-columns:repeat(3,minmax(0,1fr)); }
.action-launcher-v6 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.action-tile { display:flex; flex-direction:column; gap:8px; padding:18px 18px 16px; border-radius:24px; border:1px solid var(--border); background:linear-gradient(180deg, #ffffff, #f8fbfe); color:var(--text); box-shadow:0 16px 34px rgba(8,42,80,.05); }
.action-tile:hover { transform: translateY(-2px); border-color:#bbd9eb; background:#fff; }
.action-tile strong { font-size:18px; }
.action-tile small { color:var(--muted); line-height:1.4; }
.action-tile-icon { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:14px; background:linear-gradient(135deg, rgba(0,51,102,.1), rgba(0,165,207,.16)); color:var(--navy); font-weight:900; font-size:20px; }
.small-tile { padding:16px; }
.recommendation-card h3 { margin:10px 0 8px; font-size:32px; }
.recommendation-card p { margin:0; color:var(--muted); }
.client-overview-grid .recommendation-card h3 { font-size:28px; }
.annual-brief-panel .month-strip.vertical { grid-template-columns:repeat(4,minmax(0,1fr)); }
.empty-state-box { border:1px dashed #b9d5e7; border-radius:24px; padding:28px; background:linear-gradient(180deg, #fbfdff, #f6fbff); }
.empty-state-box h3 { margin:0 0 8px; font-size:28px; }
.empty-state-box p { margin:0; color:var(--muted); max-width:620px; }
.empty-state-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; }
.compact-empty h3 { font-size:22px; }
.soft-line-card { background:linear-gradient(180deg,#fff,#fbfdff); }

.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:12px; }
.calendar-weekday { font-size:13px; font-weight:800; color:var(--muted); padding:0 4px; text-transform:uppercase; letter-spacing:.06em; }
.calendar-cell { min-height:140px; border-radius:22px; background:#fff; border:1px solid var(--border); padding:12px; display:flex; flex-direction:column; gap:10px; }
.calendar-cell.has-events { background:linear-gradient(180deg,#fff,#f8fbfe); box-shadow:0 10px 20px rgba(8,42,80,.04); }
.calendar-cell.empty { background:transparent; border:1px dashed rgba(186,206,221,.5); }
.calendar-day-number { font-size:18px; font-weight:900; }
.calendar-day-events { display:flex; flex-direction:column; gap:8px; }
.calendar-chip { display:inline-flex; max-width:100%; padding:7px 9px; border-radius:12px; font-size:11px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-chip.tributario { background:#ffe6eb; color:#b42318; }
.calendar-chip.rrhh { background:#fff1da; color:#9a6700; }
.calendar-chip.finanzas { background:#e6f7ec; color:#157347; }
.calendar-chip.contable { background:#e7f1ff; color:#00509e; }
.calendar-chip.interno { background:#eef3f8; color:#4a637e; }
.calendar-empty, .calendar-more { color: var(--muted); font-size: 12px; }

.pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-link, .pagination .page-item span { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.pagination .active .page-link, .pagination .page-item.active span { background: var(--navy); border-color: var(--navy); color: #fff; }

.quick-dock {
  position: fixed; right: 24px; bottom: 24px; display: flex; gap: 10px; z-index: 40;
  padding: 10px; border-radius: 22px; background: rgba(255,255,255,.78); border: 1px solid rgba(205,223,236,.95); backdrop-filter: blur(14px); box-shadow: 0 20px 40px rgba(4,35,66,.12);
}
.quick-dock-btn {
  width: 54px; height: 54px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--navy); border: 1px solid var(--border); font-size: 22px; font-weight: 900;
}
.quick-dock-btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%); }
.quick-dock-btn:hover { transform: translateY(-1px); }

@media (max-width: 1440px) {
  .stats-grid-8 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .stats-grid-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stats-grid-5, .command-deck-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .command-deck { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1280px) {
  .month-strip, .month-strip-6, .month-strip-12, .month-strip.vertical { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .annual-brief-panel .month-strip.vertical { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .action-launcher, .action-launcher.compact-launcher, .action-launcher-v6 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-feature-grid-v6 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; min-height: auto; }
  .grid-2, .grid-2-colwide, .grid-3, .stats-grid-4, .stats-grid-5, .stats-grid-6, .stats-grid-8, .auth-shell, .auth-shell.wide, .month-strip, .month-strip.vertical, .command-deck, .command-deck-4, .command-deck-5, .mission-grid, .auth-card-footer { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .topbar h1 { font-size: 44px; }
  .hero-card, .credential-card, .client-row-card, .row-between, .hero-actions { flex-direction: column; align-items: flex-start; }
  .client-row-aside { text-align: left; min-width: 0; }
  .mini-badges-row { justify-content: flex-start; }
  .quick-dock { right: 14px; bottom: 14px; }
}
@media (max-width: 720px) {
  .main-area { padding: 18px; }
  .panel { padding: 18px; }
  .hero-card, .auth-card, .auth-hero { padding: 22px; }
  .grid-2-tight, .duo-kpis { grid-template-columns: 1fr; }
  .search-form input { min-width: 100%; }
  .topbar h1 { font-size: 38px; }
  .hero-card h2, .hero-card-xl h2, .auth-hero h1 { font-size: 38px; }
  .ops-ribbon-group { width: 100%; }
  .ops-pill { width: 100%; justify-content: center; }
  .quick-dock { display: none; }
  .auth-feature-grid, .auth-feature-grid-v6, .auth-card-footer { grid-template-columns: 1fr; }
  .meta-chip-row, .action-launcher, .action-launcher.compact-launcher, .action-launcher-v6 { grid-template-columns:1fr; display:grid; }
  .meta-chip { width:100%; justify-content:center; }
  .calendar-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}


.quick-dock-v6 { transform: scale(.9); transform-origin: bottom right; }
.auth-page.auth-page-v6 { overflow: hidden; }
.auth-card .muted { font-size: 14px; }
.mini-kicker { display:inline-flex; padding:6px 10px; border-radius:999px; background:#eef5fb; color:#2d6091; text-transform:uppercase; letter-spacing:.09em; font-size:11px; font-weight:800; margin-bottom:6px; }

@media (max-width: 1500px) {
  .topbar h1 { font-size: 50px; }
  .hero-card h2 { font-size: 36px; }
  .stats-grid-8 { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 270px 1fr; }
  .sidebar { padding: 14px 12px; }
  .brand-title { font-size: 22px; }
  .topbar h1 { font-size: 46px; }
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-page.auth-page-v6 { overflow: auto; }
  .auth-feature-grid-v6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 992px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
  .grid-2, .grid-2-colwide, .grid-3, .grid-2-tight, .grid-3-tight, .grid-4-tight, .stats-grid-4, .stats-grid-5, .stats-grid-6, .stats-grid-8, .auth-feature-grid, .auth-card-footer, .month-strip-6, .month-strip-12, .inline-grid-kpis { grid-template-columns: 1fr !important; }
  .hero-card { flex-direction: column; align-items: flex-start; }
  .quick-dock-v6 { transform: scale(.84); }
}


/* V6.2 login tuning */
.auth-shell-v62 { min-height: 100vh; grid-template-columns: 1fr .82fr; gap: 18px; padding: 14px; align-items: stretch; }
.auth-hero-v62 { padding: 26px 28px 22px; border-radius: 30px; justify-content: space-between; min-height: calc(100vh - 28px); }
.auth-logo-top-v62 { margin-bottom: 12px; gap: 12px; align-items: center; }
.auth-logo-white-v62 { width: 176px; }
.auth-hero-copy-v62 h1 { font-size: 72px; margin: 2px 0 8px; letter-spacing: -.05em; }
.auth-hero-copy-v62 p { font-size: 14px; line-height: 1.42; max-width: 560px; }
.auth-feature-grid-v62 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.auth-feature-card-v62 { padding: 14px; border-radius: 18px; }
.auth-feature-card-v62 strong { font-size: 15px; margin-top: 8px; }
.auth-feature-card-v62 small { font-size: 12px; line-height: 1.38; margin-top: 6px; }
.auth-bottom-pills-v62 { margin-top: 12px; gap: 8px; }
.auth-bottom-pills-v62 .chip { padding: 8px 12px; font-size: 12px; }
.auth-watermark-v62 { width: 220px; right: -72px; bottom: -52px; opacity: .06; }
.auth-card-v62 { max-width: 100%; padding: 24px 28px; border-radius: 30px; justify-content: center; min-height: calc(100vh - 28px); }
.auth-card-header-v62 { margin-bottom: 12px; gap: 12px; }
.auth-logo-color-v62 { width: 118px; }
.auth-card-header-v62 h2 { font-size: 52px; line-height: .98; margin-bottom: 6px; }
.auth-trust-strip-v62 { margin-bottom: 10px; }
.auth-trust-strip-v62 .meta-chip { padding: 9px 14px; font-size: 12px; }
.auth-form-v62 { gap: 10px; }
.auth-form-v62 label { font-size: 12px; margin-bottom: 5px; }
.auth-form-v62 input { padding: 13px 15px; min-height: 54px; }
.password-field-v62 input { padding-right: 86px; }
.password-toggle-v62 { min-width: 62px; padding: 8px 12px; border-radius: 14px; }
.auth-inline-row-v62 { font-size: 13px; margin-top: 2px; }
.auth-card-footer-v62 { gap: 8px; margin-top: 14px; }
.auth-mini-stat-v62 { padding: 12px; min-height: 88px; }
.auth-mini-stat-v62 strong { font-size: 15px; margin-bottom: 4px; }
.auth-mini-stat-v62 span { font-size: 12px; line-height: 1.35; }
@media (max-width: 1400px) {
  .auth-hero-copy-v62 h1 { font-size: 62px; }
  .auth-card-header-v62 h2 { font-size: 46px; }
  .auth-logo-white-v62 { width: 158px; }
}
@media (max-width: 1180px) {
  .auth-shell-v62 { grid-template-columns: 1fr; min-height: auto; }
  .auth-hero-v62, .auth-card-v62 { min-height: auto; }
  .auth-hero-copy-v62 h1 { font-size: 56px; }
}

/* V6.3 login fit refinement */
.auth-page.auth-page-v62 { overflow:auto; }
.auth-shell-v62 { min-height: calc(100vh - 20px); gap: 14px; padding: 10px; }
.auth-hero-v62 { padding: 22px 24px 18px; min-height: calc(100vh - 20px); }
.auth-card-v62 { padding: 22px 24px; min-height: calc(100vh - 20px); }
.auth-logo-white-v62 { width: 150px; }
.auth-hero-copy-v62 h1 { font-size: clamp(52px, 4.8vw, 66px); margin: 2px 0 6px; }
.auth-hero-copy-v62 p { font-size: 13px; line-height: 1.35; max-width: 520px; }
.auth-feature-grid-v62 { margin-top: 12px; gap: 8px; }
.auth-feature-card-v62 { padding: 12px 14px; }
.auth-feature-card-v62 strong { font-size: 14px; }
.auth-feature-card-v62 small { font-size: 11px; }
.auth-bottom-pills-v63 { margin-top: 10px; }
.auth-bottom-pills-v63 .chip { padding: 7px 11px; font-size: 11px; }
.auth-card-header-v62 h2 { font-size: clamp(42px, 4vw, 52px); }
.auth-logo-color-v62 { width: 104px; }
.auth-trust-strip-v62 .meta-chip { padding: 8px 12px; font-size: 11px; }
.auth-form-v62 input { padding: 12px 14px; min-height: 50px; }
.password-toggle-v62 { min-width: 58px; padding: 7px 11px; }
.auth-footer-pills-v63 { display:flex; flex-wrap:wrap; gap:8px; margin-top: 12px; }
.auth-footer-pills-v63 .mini-kicker.compact { margin-bottom:0; padding:7px 10px; font-size:11px; }
@media (max-height: 920px) {
  .auth-shell-v62 { min-height:auto; }
  .auth-hero-v62, .auth-card-v62 { min-height:auto; }
  .auth-logo-top-v62 { margin-bottom: 8px; }
  .auth-logo-white-v62 { width: 132px; }
  .auth-hero-copy-v62 h1 { font-size: clamp(44px, 4vw, 56px); }
  .auth-feature-grid-v62 { grid-template-columns: 1fr 1fr; }
  .auth-bottom-pills-v63 { display:none; }
}
@media (max-height: 820px) {
  .auth-feature-grid-v62 { grid-template-columns: 1fr; }
  .auth-footer-pills-v63 { display:none; }
  .auth-trust-strip-v62 { gap:6px; }
  .auth-trust-strip-v62 .meta-chip { padding:7px 10px; }
}


/* V7 operational real */
.ops-pill.danger-pill { color: #fff; border-color: transparent; background: linear-gradient(135deg, #af2334 0%, #e5485f 100%); }
.record-card { border:1px solid var(--border); border-radius:22px; background:#fff; overflow:hidden; }
.record-card[open] { box-shadow:0 10px 24px rgba(6,41,78,.05); border-color:#bdd9ea; }
.record-summary { list-style:none; display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:14px 16px; cursor:pointer; }
.record-summary::-webkit-details-marker { display:none; }
.record-summary::after { content:'▾'; color:var(--muted); font-size:14px; font-weight:800; margin-left:auto; }
.record-card[open] .record-summary::after { content:'▴'; }
.record-summary-right { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.record-form { padding:14px 16px 10px; border-top:1px solid var(--border); background:linear-gradient(180deg,#fff,#fbfdff); }
.record-delete-form { padding:0 16px 16px; }
.inline-grid-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.mini-kpi-box { padding:10px 12px; border:1px solid var(--border); border-radius:16px; background:#f8fbfe; }
.mini-kpi-box span { display:block; color:var(--muted); font-size:12px; }
.mini-kpi-box strong { display:block; margin-top:4px; font-size:18px; }
.grid-3-tight, .grid-4-tight { display:grid; gap:14px; }
.grid-3-tight { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4-tight { grid-template-columns:repeat(4,minmax(0,1fr)); }
.record-form textarea { min-height:84px; }
@media (max-width: 1280px) {
  .grid-4-tight { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .inline-grid-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .grid-3-tight, .grid-4-tight, .inline-grid-kpis { grid-template-columns:1fr; }
  .record-summary { flex-direction:column; }
  .record-summary-right { justify-content:flex-start; }
}
