/* GO Transport — tema PROVISIONAL (reemplazable). Cambie las variables de :root para aplicar la marca definitiva. */
:root {
  --brand: #14163f; --brand-dark: #0c0e2c; --accent: #3d4aa8; --bg: #f4f6f8; --card: #fff; --text: #1d2733;
  --muted: #6b7785; --border: #dde3e9; --danger: #c0392b; --warn: #d68910; --ok: #1e8449; --info: #2471a3;
  --radius: 10px; font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
.logo { font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: .5rem; }
.logo .mark { background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 7px; }
.logo img.brand-logo { height: 34px; width: auto; display: block; }
.topbar .logo img.brand-logo { height: 30px; }
.auth .logo img.brand-logo { height: 72px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid transparent; background: var(--brand); color: #fff;
  padding: .55rem .95rem; border-radius: 8px; cursor: pointer; font-size: .95rem; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn.danger { background: var(--danger); } .btn.warn { background: var(--warn); }
.btn.sm { padding: .3rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 70px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .55rem 0 .2rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: .8rem; } .g2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); font-size: .88rem; }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 99px; font-size: .78rem; background: #e8ecef; color: #333; white-space: nowrap; }
.st-pending_confirmation, .st-pending_assignment { background: #fdebd0; color: #7e5109; }
.st-assigned { background: #d6eaf8; color: #1b4f72; }
.st-accepted, .st-en_route, .st-at_pickup, .st-in_progress, .st-at_destination { background: #d4efdf; color: #145a32; }
.st-pending_signature { background: #e8daef; color: #4a235a; }
.st-completed { background: #1e8449; color: #fff; }
.st-cancelled, .st-no_show { background: #e5e7e9; color: #555; }
.st-incident, .badge.alert { background: #fadbd8; color: #922b21; }
.placeholder { border: 2px dashed var(--warn); background: #fef9e7; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .55rem; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .9rem; }
th { background: #f0f3f5; font-weight: 600; }
tr.click { cursor: pointer; } tr.click:hover { background: #f7faf9; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.error { background: #fadbd8; color: #78281f; padding: .6rem .8rem; border-radius: 8px; margin: .5rem 0; }
.success { background: #d4efdf; color: #145a32; padding: .6rem .8rem; border-radius: 8px; margin: .5rem 0; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 99; max-width: 90vw; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
/* Layout app */
.topbar { background: var(--brand); color: #fff; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; position: sticky; top: 0; z-index: 10; }
.topbar .user { font-size: .85rem; opacity: .9; }
.layout { display: flex; min-height: calc(100vh - 50px); }
nav.side { width: 220px; background: #fff; border-right: 1px solid var(--border); padding: .6rem; }
nav.side a { display: flex; justify-content: space-between; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); margin-bottom: 2px; }
nav.side a.active, nav.side a:hover { background: #e9eaf5; color: var(--brand-dark); font-weight: 600; }
main { flex: 1; padding: 1.2rem; max-width: 1300px; min-width: 0; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; }
@media (max-width: 800px) {
  nav.side { position: fixed; top: 50px; left: 0; bottom: 0; z-index: 9; transform: translateX(-100%); transition: transform .2s; }
  nav.side.open { transform: none; box-shadow: 4px 0 20px rgba(0,0,0,.2); }
  .menu-btn { display: block; } main { padding: .8rem; }
  .hide-sm { display: none; }
}
/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; overflow-y: auto; padding: 2rem .5rem; }
.modal { background: #fff; border-radius: 12px; padding: 1.2rem; width: 100%; max-width: 640px; }
.stat { text-align: center; } .stat b { display: block; font-size: 1.8rem; color: var(--brand); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 3px solid var(--brand); padding: .2rem 0 .6rem .8rem; position: relative; }
/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { font-weight: 600; text-align: center; font-size: .8rem; color: var(--muted); }
.cal .d { background: #fff; border: 1px solid var(--border); border-radius: 6px; min-height: 88px; padding: 4px; font-size: .75rem; }
.cal .d.out { opacity: .4; } .cal .d.today { border-color: var(--brand); border-width: 2px; }
.cal .ev { display: block; border-radius: 4px; padding: 1px 4px; margin-top: 2px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Login */
.auth { max-width: 400px; margin: 8vh auto; padding: 0 1rem; }
.auth .logo { font-size: 1.8rem; justify-content: center; color: var(--brand); margin-bottom: 1rem; }
.sig-view { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .4rem; max-width: 420px; }
.sig-view img { display: block; width: 100%; height: auto; }
.stat.warn-stat b { color: var(--danger); }
/* Mapa en vivo */
.live-map { height: 62vh; min-height: 360px; border-radius: 12px; border: 1px solid var(--border); background: #eef0f7; margin-bottom: 1rem; overflow: hidden; }
.live-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; font-size: .9rem; }
.live-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
