:root{--red:#d91f26;--dark:#23262d;--muted:#6b7280;--line:#dfe3e8;--bg:#f4f6f8;--green:#16803b;--orange:#e87500;--danger:#c51520;--blue:#163b73;--soft:#f9fafb}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--dark)}button,input,select,textarea{font:inherit}
a{text-decoration:none}
.topbar{min-height:98px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:12px 28px;position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:20px}.brand img{height:62px;width:auto}.altmed-brand img{height:72px}.brand b{font-size:24px;display:block}.brand span,.userbox span{color:var(--muted);font-size:14px}
.userbox{display:flex;gap:18px;align-items:center}.userbox a{color:var(--red);font-weight:800}
.nav{display:flex;align-items:center;gap:8px;background:#24272d;padding:0 28px;min-height:62px;overflow:auto}.nav button{border:0;background:transparent;color:#dfe3e8;padding:20px 16px;cursor:pointer;font-weight:700;border-bottom:3px solid transparent;white-space:nowrap}.nav button.active{color:#fff;border-color:var(--red)}.powered{margin-left:auto;display:flex;align-items:center;color:#d2d7de;font-size:11px;gap:10px}.powered img{width:185px;height:42px;object-fit:contain;background:#fff;border-radius:8px;padding:3px}
main{max-width:1360px;margin:28px auto;padding:0 18px}.card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;margin-bottom:20px;box-shadow:0 10px 24px rgba(23,31,46,.05)}
.step-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:18px}.step-no{width:42px;height:42px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:800;flex:0 0 auto}.step-head h2{margin:0 0 4px}.step-head p{margin:0;color:var(--muted)}
.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,1fr)}.grid.three{grid-template-columns:repeat(3,1fr)}.span-2{grid-column:span 2}.span-3{grid-column:span 3}.spaced-top{margin-top:18px}
label{display:block;font-weight:700;font-size:14px}small{font-weight:500;color:var(--muted)}input,select,textarea{width:100%;margin-top:7px;border:1px solid #cfd5dd;border-radius:12px;padding:12px;background:#fff}textarea{min-height:110px;resize:vertical}
.check-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.check{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);padding:12px;border-radius:12px;font-weight:500;background:var(--soft)}.check input{width:auto;margin:2px 0 0}
.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;flex-wrap:wrap}.btn{border:0;border-radius:12px;padding:12px 18px;font-weight:800;cursor:pointer;display:inline-flex;justify-content:center;align-items:center}.btn.primary{background:var(--red);color:#fff}.btn.secondary{background:#e9edf2;color:var(--dark)}.btn.dark{background:var(--dark);color:#fff}.btn.full{width:100%;margin-top:14px}.btn-sm{padding:8px 12px;font-size:12px}
.traffic{border-radius:18px;padding:24px;color:#fff;margin:18px 0}.traffic.verde{background:linear-gradient(135deg,#117233,#23a04f)}.traffic.naranja{background:linear-gradient(135deg,#d86100,#f19524)}.traffic.rojo{background:linear-gradient(135deg,#a90f1a,#df2530)}.traffic.strong{box-shadow:0 18px 34px rgba(0,0,0,.12)}.traffic-tag{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.08em;background:rgba(255,255,255,.18);padding:8px 11px;border-radius:999px;margin-bottom:10px}.traffic h2{font-size:32px;margin:0 0 8px}.traffic p{margin:5px 0;font-size:15px;line-height:1.5}
.notice{padding:14px;border-radius:12px;margin:12px 0;border:1px solid transparent}.notice.warning{background:#fff4df;border-color:#edb04d}.notice.danger{background:#ffebed;border-color:#e38b92}.notice.success{background:#e9f7ee;border-color:#84c99a}.notice-large{padding:18px;font-size:15px;line-height:1.55}
.alert-panel{border-radius:16px;padding:18px 20px;margin:16px 0;border:2px solid}.alert-panel h3{margin:0 0 10px;font-size:20px}.alert-panel ul{margin:0;padding-left:22px}.alert-panel li{line-height:1.55;margin:7px 0;font-weight:600}.alert-panel.verde{background:#eaf8ef;border-color:#48a56d}.alert-panel.naranja{background:#fff5e7;border-color:#eb9b2d}.alert-panel.rojo{background:#ffedf0;border-color:#db4454}
.question{border-bottom:1px solid var(--line);padding:14px 0}.question b{display:block;margin-bottom:8px}
.summary{white-space:pre-wrap;background:#f7f8fa;border:1px solid var(--line);padding:18px;border-radius:14px;line-height:1.5}.rich-summary{white-space:normal;background:#f7f8fa;padding:12px}
.history-tools{display:flex;gap:10px;margin-bottom:16px}.history-tools input{margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left;font-size:13px;vertical-align:top}th{background:#f0f2f5;font-size:12px;text-transform:uppercase;letter-spacing:.03em}.table-actions{display:flex;gap:8px;flex-wrap:wrap}
.badge{display:inline-block;padding:6px 10px;border-radius:20px;color:#fff;font-size:12px;font-weight:800}.badge.verde{background:var(--green)}.badge.naranja{background:var(--orange)}.badge.rojo{background:var(--danger)}
.status-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}.status-badge.pending{background:#fff4df;color:#8a4b00}.status-badge.done{background:#e8f7ee;color:#19633a}.status-badge.inactive{background:#eceff3;color:#4b5563}.status-badge.alert{background:#ffebed;color:#b41d2b}
.auth-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef1f5,#fff)}.auth-card{width:min(680px,92vw);background:#fff;border-radius:22px;padding:30px;box-shadow:0 20px 60px rgba(20,28,40,.15)}.auth-card.wide{width:min(820px,94vw)}.auth-card h1{margin:10px 0 6px}.subtitle{color:var(--muted);margin:0 0 18px}.auth-logo{width:250px;max-width:100%}.auth-logo.large{width:360px}.developed{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.developed img{width:240px;max-width:100%}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid hr{width:100%;border:0;border-top:1px solid var(--line)}
.modal{position:fixed;inset:0;background:rgba(16,20,28,.65);display:grid;place-items:center;z-index:30;padding:18px}.modal-box{background:#fff;max-width:980px;width:100%;max-height:92vh;overflow:auto;border-radius:18px;padding:24px}.modal-box.large{max-width:1120px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.modal-head button{border:0;background:#eee;border-radius:50%;width:36px;height:36px;cursor:pointer;font-size:22px;line-height:1}.modal-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.about-logos{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:18px 0}.about-logos img:first-child{width:300px;max-width:100%}.about-logos img:last-child{width:340px;max-width:100%}
.report-sheet{background:#fff}.report-header{display:flex;align-items:center;gap:18px;border-bottom:3px solid #e5e7eb;padding-bottom:16px;margin-bottom:16px}.report-header img{width:290px;max-width:42%;height:auto}.report-header h1{margin:0 0 6px;font-size:26px}.report-header p{margin:0;color:var(--muted)}.report-banner{border-radius:16px;padding:16px 18px;color:#fff;margin-bottom:16px;display:flex;gap:14px;align-items:flex-start}.report-banner.verde{background:linear-gradient(135deg,#15783d,#2da85c)}.report-banner.naranja{background:linear-gradient(135deg,#d76b00,#f19927)}.report-banner.rojo{background:linear-gradient(135deg,#a7111a,#de2a32)}.pill{display:inline-flex;align-items:center;justify-content:center;font-weight:700;background:rgba(255,255,255,.2);padding:8px 12px;border-radius:999px}.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:14px}.report-box{border:1px solid #d9dee6;border-radius:14px;padding:16px;margin-bottom:14px;background:#fff}.report-box h3{margin:0 0 10px;font-size:18px;color:#111827}.report-box p,.report-box li{font-size:14px;line-height:1.55;margin:0 0 8px}.report-box ul{margin:0;padding-left:20px}.report-list{display:grid;gap:14px}.report-list b{display:block;margin-bottom:6px}.report-list p{margin:0}.report-footer{text-align:center;font-size:12px;color:#6b7280;margin-top:20px;padding-top:12px;border-top:1px solid #e5e7eb}
.hidden{display:none!important}
@media(max-width:980px){.grid.three,.grid.two,.check-grid,.form-grid,.report-grid{grid-template-columns:1fr}.span-2,.span-3{grid-column:span 1}.topbar{align-items:flex-start;gap:12px;flex-direction:column}.brand img{height:54px}.brand span,.userbox span{display:none}.powered{display:none}.history-tools{flex-direction:column}.report-header{flex-direction:column;align-items:flex-start}.report-header img{max-width:100%;width:320px}}
@media print{.topbar,.nav,.actions,.no-print{display:none!important}body{background:#fff}main{margin:0;max-width:none}.card{box-shadow:none;border:0}.modal{position:static;background:#fff;padding:0}.modal-box{box-shadow:none;border:0;max-height:none;padding:0}}
.dashboard-hero{background:linear-gradient(135deg,#20242b,#343943);color:#fff;border-radius:22px;padding:24px 28px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 16px 35px rgba(20,25,35,.14)}.dashboard-hero h1{margin:0 0 7px;font-size:30px}.dashboard-hero p{margin:0;color:#d5dae2}.dashboard-hero img{width:260px;max-width:38%;background:#fff;border-radius:12px;padding:5px}.metric-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:12px;margin-bottom:20px}.metric-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 8px 20px rgba(23,31,46,.05);border-top:5px solid #7b8492}.metric-card span{display:block;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.metric-card strong{display:block;font-size:32px;margin-top:8px}.metric-card.verde{border-top-color:var(--green)}.metric-card.naranja{border-top-color:var(--orange)}.metric-card.rojo,.metric-card.alert{border-top-color:var(--danger)}.metric-card.pending{border-top-color:#d99922}.metric-card.done{border-top-color:#2d9f5a}.branch-bars{display:grid;gap:10px}.branch-bars div{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);background:#f8fafc;padding:12px 14px;border-radius:10px}.history-tools.advanced{display:grid;grid-template-columns:2fr repeat(3,1fr) 150px 150px auto;align-items:end}.compact{font-size:11px;color:var(--muted)}.compact input{margin-top:4px}code{font-size:11px;white-space:pre-wrap;word-break:break-word}@media(max-width:1180px){.metric-grid{grid-template-columns:repeat(4,1fr)}.history-tools.advanced{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.metric-grid{grid-template-columns:repeat(2,1fr)}.dashboard-hero{align-items:flex-start;flex-direction:column}.dashboard-hero img{max-width:100%;width:260px}.history-tools.advanced{grid-template-columns:1fr}}
.nav .nav-link{color:#dfe3e8;padding:20px 16px;font-weight:700;white-space:nowrap}.nav .nav-link:hover{color:#fff}

/* Identidad AltMed Soluciones sin la leyenda anterior */
.altmed-wordmark{display:inline-flex;align-items:center;gap:10px;min-width:170px}.altmed-mark{display:block;width:54px;height:50px;overflow:hidden;position:relative;flex:0 0 auto}.altmed-mark img{height:50px;width:auto;max-width:none;display:block}.altmed-name{display:flex;flex-direction:column;line-height:1}.altmed-name b{font-family:Georgia,'Times New Roman',serif;font-size:24px;letter-spacing:.13em;color:#23262d}.altmed-name small{font-size:9px;letter-spacing:.42em;color:#c61f26;font-weight:800;margin-top:7px}.altmed-wordmark-compact{background:#fff;border-radius:8px;padding:4px 10px;min-width:150px}.altmed-wordmark-compact .altmed-mark{width:38px;height:34px}.altmed-wordmark-compact .altmed-mark img{height:34px}.altmed-wordmark-compact .altmed-name b{font-size:17px}.altmed-wordmark-compact .altmed-name small{font-size:7px;margin-top:4px}.altmed-wordmark-large{min-width:340px}.altmed-wordmark-large .altmed-mark{width:92px;height:82px}.altmed-wordmark-large .altmed-mark img{height:82px}.altmed-wordmark-large .altmed-name b{font-size:42px}.altmed-wordmark-large .altmed-name small{font-size:12px;margin-top:10px}.altmed-wordmark-light{background:#fff;border-radius:14px;padding:12px 18px;min-width:290px}.dashboard-hero .altmed-wordmark-light{max-width:42%}.about-note{margin:16px 0 0;color:var(--muted);font-size:15px}.brand.altmed-brand{gap:18px}.brand.altmed-brand>.altmed-wordmark{min-width:160px}.powered .altmed-wordmark{margin:0}.about-logos{align-items:center}
@media(max-width:700px){.altmed-wordmark-large{min-width:260px}.altmed-wordmark-large .altmed-name b{font-size:30px}.dashboard-hero .altmed-wordmark-light{max-width:100%}}

/* Uso exclusivo del logotipo original de AltMed, sin composiciones adicionales */
.altmed-logo-main{width:210px;height:62px;object-fit:contain;object-position:left center;display:block}.altmed-logo-powered{width:165px;height:38px;object-fit:contain;display:block;background:#fff;border-radius:8px;padding:2px}.altmed-logo-auth{width:360px;max-width:100%;height:auto;display:block;margin-bottom:12px}.altmed-logo-dashboard{width:300px;max-width:42%;height:auto;background:#fff;border-radius:12px;padding:8px;object-fit:contain}.altmed-logo-about{width:340px!important;max-width:100%;height:auto;object-fit:contain}.about-logos img:first-child{width:340px!important}.brand.altmed-brand>.altmed-logo-main{flex:0 0 auto}.powered .altmed-logo-powered{margin:0}@media(max-width:700px){.altmed-logo-main{width:180px;height:54px}.altmed-logo-dashboard{max-width:100%;width:280px}}
