:root {
  --sc-primary: #1f4e79;
  --sc-primary-dark: #163a5b;
  --sc-accent: #2e8b57;
  --sc-sidebar: #10273d;
  --sc-sidebar-text: #c9d6e3;
  --sc-bg: #f3f5f8;
  --sc-border: #dfe4ea;
  --bs-primary: #1f4e79;
  --bs-primary-rgb: 31, 78, 121;
  --bs-link-color: #1f4e79;
  --bs-link-color-rgb: 31, 78, 121;
}
body { background: var(--sc-bg); font-size: .925rem; }
.btn-primary { --bs-btn-bg: var(--sc-primary); --bs-btn-border-color: var(--sc-primary); --bs-btn-hover-bg: var(--sc-primary-dark); --bs-btn-hover-border-color: var(--sc-primary-dark); --bs-btn-active-bg: var(--sc-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--sc-primary); --bs-btn-border-color: var(--sc-primary); --bs-btn-hover-bg: var(--sc-primary); --bs-btn-hover-border-color: var(--sc-primary); }
.text-primary { color: var(--sc-primary) !important; }

/* Layout */
.sc-sidebar { width: 250px; background: var(--sc-sidebar); color: var(--sc-sidebar-text); position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.sc-main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.sc-brand { padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: .65rem; align-items: center; color: #fff; text-decoration: none; }
.sc-brand img { max-height: 38px; max-width: 60px; background: #fff; border-radius: 6px; padding: 2px; }
.sc-brand .sc-brand-mark { width: 38px; height: 38px; border-radius: 8px; background: var(--sc-accent); display: grid; place-items: center; font-size: 1.2rem; }
.sc-brand small { display: block; color: var(--sc-sidebar-text); font-size: .72rem; line-height: 1.1; }
.sc-nav .sc-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: #7f93a8; padding: 1rem 1.2rem .35rem; }
.sc-nav a { display: flex; align-items: center; gap: .65rem; padding: .48rem 1.2rem; color: var(--sc-sidebar-text); text-decoration: none; border-left: 3px solid transparent; }
.sc-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sc-nav a.active { background: rgba(46,139,87,.18); color: #fff; border-left-color: var(--sc-accent); }
.sc-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sc-topbar { background: #fff; border-bottom: 1px solid var(--sc-border); padding: .6rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1030; }
.sc-content { padding: 1.25rem; flex: 1; }
.sc-footer { padding: .75rem 1.25rem; color: #8592a3; font-size: .78rem; }
@media (max-width: 991.98px) {
  .sc-sidebar { transform: translateX(-100%); }
  .sc-sidebar.show { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .sc-main { margin-left: 0; }
}

/* Componentes */
.card { border: 1px solid var(--sc-border); box-shadow: 0 1px 2px rgba(16,39,61,.04); }
.card-header { background: #fff; font-weight: 600; }
.page-title { font-size: 1.35rem; font-weight: 600; margin: 0; color: #13283d; }
.stat-card { border-left: 4px solid var(--sc-primary); }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: #66768a; font-size: .8rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7e; background: #f7f9fb; white-space: nowrap; }
.table td { vertical-align: middle; }
.badge-status { font-weight: 500; }
.badge-status i { margin-right: .25rem; }
.dl-grid { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: .35rem .75rem; margin: 0; }
.dl-grid dt { color: #66768a; font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 4px; bottom: 4px; width: 2px; background: var(--sc-border); }
.timeline li { position: relative; padding-left: 50px; padding-bottom: 1.1rem; }
.timeline .tl-icon { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.timeline .tl-correction { border: 1px dashed #dc3545; border-radius: 6px; padding: .4rem .6rem; background: #fff5f5; }
.sig-pad-wrap { border: 2px dashed #b8c4d2; border-radius: 8px; background: #fff; position: relative; touch-action: none; }
.sig-pad-wrap canvas { width: 100%; height: 200px; display: block; border-radius: 8px; }
.sig-pad-wrap .sig-line { position: absolute; left: 8%; right: 8%; bottom: 40px; border-bottom: 1px solid #c3ccd6; pointer-events: none; }
.sig-img { max-height: 90px; max-width: 100%; }
.asset-pick-results { max-height: 300px; overflow-y: auto; }
.required::after { content: ' *'; color: #dc3545; }
.photo-thumb { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; border: 1px solid var(--sc-border); }
.pre-line { white-space: pre-line; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #10273d 0%, #1f4e79 60%, #2e8b57 140%); padding: 1rem; }
.login-card { width: 100%; max-width: 410px; }
@media print { .sc-sidebar, .sc-topbar, .no-print { display: none !important; } .sc-main { margin: 0; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat-grid > div > a, .stat-grid .card { height: 100%; display: block; }
