:root { color-scheme: dark; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: #091327; color: #ecf5ff; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #091327; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .42; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #51d5ff; outline-offset: 2px; }
.topbar { position: relative; z-index: 3; min-height: 74px; padding: 14px 25px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #0e1d38; border-bottom: 1px solid #233957; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: grid; place-items: center; height: 45px; width: 45px; border-radius: 14px; background: linear-gradient(135deg,#b65aff,#7440df); font-size: 26px; font-weight: 900; box-shadow: 0 8px 25px #7c3aed55; }
.brand strong { font-size: 16px; letter-spacing: .035em; }
.brand strong span { color: #b98afa; }
.brand small { display: block; color: #8ba4c9; margin-top: 2px; font-size: 11px; letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.role-badge { color: #97f0cb; border: 1px solid #287a69; border-radius: 30px; background: #174339; padding: 8px 13px; font-size: 12px; font-weight: 700; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; color: #ebf3ff; font-weight: 700; font-size: 13px; transition: transform .14s, background .14s, border-color .14s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(115deg,#9250df,#bd4aea); color: white; box-shadow: 0 6px 20px #8c2cba30; }
.button.primary:hover { background: linear-gradient(115deg,#a467f3,#cf59fb); }
.button.outline { background: #192b46; border-color: #3a577b; }
.button.ghost { background: transparent; color: #bdd4f4; border-color: #314865; }
.button.danger { background: #441d35; border-color: #81415f; color: #ffbacf; }
.button.full { width: 100%; }
.access-screen { max-width: 1100px; margin: 5.5vh auto; display: grid; grid-template-columns: minmax(320px, 530px) 1fr; gap: 45px; padding: 24px; }
.access-card { background: linear-gradient(145deg,#162949,#101b33); border: 1px solid #344d70; border-radius: 24px; padding: 34px 38px 28px; box-shadow: 0 24px 70px #0005; }
.access-mark { display: inline-block; font-size: 12px; padding: 7px 11px; border-radius: 20px; background: #244469; color: #95e7ff; }
h1 { font-size: clamp(27px, 3.9vw, 42px); line-height: 1.13; letter-spacing: -.045em; margin: 23px 0 15px; }
h1 span { color: #ca92ff; }
.access-card > p { color: #a9bfdc; line-height: 1.55; font-size: 14px; margin-bottom: 22px; }
.access-divider { display: flex; align-items: center; color: #8aa2c4; gap: 12px; margin: 27px 0 19px; text-align: center; font-size: 12px; }
.access-divider::before,.access-divider::after { content: ""; flex: 1; height: 1px; background: #314561; }
.auth-form { display: grid; gap: 13px; }
.auth-form label { font-size: 12px; font-weight: 700; color: #c3d5eb; }
.auth-form input { display: block; width: 100%; margin-top: 6px; height: 45px; padding: 0 13px; border: 1px solid #526e91; border-radius: 10px; background: #eef5ff; color: #111f37; }
.access-card .footnote { font-size: 12px; margin: 15px 0 0; color: #839bbd; }
.error { color: #ffc7d4 !important; background: #492338; border: 1px solid #8b3951; padding: 12px; border-radius: 9px; }
.access-feature { align-self: center; text-align: left; padding: 35px; background: radial-gradient(circle at 40% 20%,#6432b280,#181e3100 65%); }
.access-feature > span { display: block; color: #bd84ff; font-size: 90px; text-shadow: 0 0 40px #a34efe99; }
.access-feature strong { display: block; font-size: 28px; }
.access-feature p { color: #aebdda; font-size: 15px; line-height: 1.6; }
.app-screen { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); min-height: calc(100vh - 74px); }
.sidebar { padding: 23px; background: #111e35; border-right: 1px solid #283a59; display: flex; flex-direction: column; gap: 13px; max-height: calc(100vh - 74px); overflow-y: auto; }
.pill { font-size: 10px; border: 1px solid #2c8c84; background: #123b3e; padding: 6px 9px; border-radius: 20px; color: #9cf3d5; font-weight: 800; letter-spacing: .1em; }
.side-intro h2 { font-size: 21px; margin: 13px 0 6px; }
.side-intro p { color: #95aac9; margin: 0 0 8px; font-size: 12px; }
.field-label { color: #aebfdb; font-size: 12px; font-weight: 700; margin-top: 7px; }
.sidebar input[type=search],.sidebar select { background: #e8f1ff; color: #0f1b31; border: 1px solid #7891af; border-radius: 9px; height: 43px; width: 100%; padding: 0 12px; }
.quick-title { font-size: 11px; color: #94a8c6; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; margin-top: 10px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-links button { color: #cbe0ff; background: #1e3150; border: 1px solid #344d6f; padding: 8px 10px; border-radius: 16px; font-weight: 650; font-size: 11px; }
.quick-links button:hover { border-color: #b66ce9; }
.route-card { border: 1px solid #38546f; border-radius: 14px; padding: 16px; background: linear-gradient(155deg,#213352,#172742); margin-top: 12px; }
.route-head { display: flex; justify-content: space-between; color: #99b5dd; font-weight: 700; font-size: 12px; }
.status-dot { width: 8px; height: 8px; background: #44cfa0; border-radius: 50%; box-shadow: 0 0 9px #44cfa0a0; }
.route-card h3 { font-size: 18px; margin: 12px 0 7px; }
.route-card p { font-size: 12px; color: #9fb3ce; line-height: 1.5; min-height: 35px; }
.route-stats { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0 14px; font-size: 11px; color: #b58df3; }
.route-stats.secondary { padding: 0 0 13px; color: #b9dff4; }
.origin-hint { margin: -5px 0 4px; }
.calibration-panel { display: grid; gap: 7px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #35445d; }
.calibration-panel input[type=number] { background: #e8f1ff; color: #0f1b31; border: 1px solid #7891af; border-radius: 9px; height: 42px; width: 100%; padding: 0 12px; }
.route-card button + button { margin-top: 6px; }
.admin-tools { border-top: 1px solid #35445d; margin-top: 3px; padding-top: 16px; }
.side-section-title { display: flex; justify-content: space-between; font-weight: 800; }
.side-section-title span { color: #d5a6ff; font-size: 10px; }
.hint { font-size: 11px; line-height: 1.5; color: #93abc9; }
.editor-buttons { display: flex; gap: 7px; margin: 9px 0; }
.editor-buttons .button { flex: 1; font-size: 11px; padding: 8px; }
.editor-tip { border-left: 3px solid #bc7cef; background: #273351; padding: 11px; margin-top: 12px; color: #ccdef8; font-size: 11px; line-height: 1.55; }
#editorPanel > .button { margin-top: 7px; }
.sidebar-bottom { color: #677f9f; font-size: 10px; line-height: 1.5; margin-top: auto; padding: 14px 0 0; }
.map-main { min-width: 0; height: calc(100vh - 74px); display: flex; flex-direction: column; background: #15233c; padding: 16px; gap: 12px; }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.map-heading strong { display: block; font-size: 18px; }
.map-heading span { display: block; font-size: 11px; color: #8ea9ce; margin-top: 3px; }
.map-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.map-controls button { min-width: 34px; height: 35px; background: #243a59; color: #eaf5ff; border: 1px solid #3a557a; border-radius: 9px; font-weight: 800; }
.check-control { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #c6d7ed; margin-right: 8px; }
.check-control input { accent-color: #9f39d7; }
.map-frame { position: relative; display: grid; place-items: center; border: 1px solid #3b5272; border-radius: 13px; background: #18263c; flex: 1; overflow: hidden; min-height: 0; }
#campusSvg { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; cursor: grab; user-select: none; touch-action: none; }
.map-frame.fit-all { display: grid; place-items: center; overflow: hidden; }
.map-frame.fit-all #campusSvg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
/* La versión pública siempre muestra el campus completo, sin barras dentro del mapa. */
#fitMapBtn, #restartBtn { display: none !important; }
#campusSvg.edit-mode { cursor: crosshair; }
#campusSvg.dragging { cursor: grabbing; }
.map-foot { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: #a1b8d7; padding-left: 5px; }
.map-foot span { display: inline-flex; gap: 6px; align-items: center; }
.foot-tip { margin-left: auto; color: #6e87a9; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend-dot.green { background: #00bc7f; }.legend-dot.blue { background: #0796c9; }.legend-dot.purple { background: #b732ec; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9; background: #e9f5ff; color: #162c43; border-radius: 12px; box-shadow: 0 10px 50px #0008; padding: 13px 20px; font-size: 13px; font-weight: 700; }
@media (max-width: 880px) { .app-screen { grid-template-columns: 1fr; }.sidebar { max-height: initial; overflow: visible; }.map-main { height: 76vh; min-height: 440px; }.access-screen { grid-template-columns: 1fr; }.access-feature { display: none; }.foot-tip { display: none !important; } }
@media (max-width: 550px) { .topbar { padding: 10px 12px; }.brand strong { font-size: 13px; }.brand small { font-size: 10px; }.role-badge { font-size: 10px; }.access-screen { padding: 10px; margin: 12px auto; }.access-card { padding: 25px 20px; }.map-main { padding: 8px; }.map-controls .check-control { margin-right: 2px; }.map-frame { border-radius: 7px; }.map-foot { gap: 8px; }.sidebar { padding: 15px; } }
