/* ============================================================
   base.css — reset, tipografía, colores y componentes compartidos
   por TODA la app (login, chofer y dueño). No poner acá nada que
   sea específico de una sola pantalla.
   ============================================================ */

html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
*{ box-sizing:border-box; }
html, body{
  margin:0; padding:0; min-height:100%;
  font-family:'Inter',sans-serif;
  background:#d8d6ce;
  overflow-x:hidden;
}

/* ---------------------------------- */
/* shell general de pantalla           */
/* ---------------------------------- */
.screen{
  width:100%; max-width:480px; min-height:100vh; min-height:100dvh; margin:0 auto;
  background:linear-gradient(155deg, #e4e4e1 0%, #ecdfa9 55%, #f3d24e 100%);
  position:relative; overflow:hidden;
  display:none;
}
.screen.active{ display:block; }
.content{ padding:18px 18px 100px; }

@media (max-width: 360px){
  .content{ padding:14px 14px 100px; }
  .title{ font-size:28px; }
}

.top-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:26px; }
.nav-pill{
  background:#eceae0; border:none; border-radius:999px; height:42px; padding:0 16px;
  display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:#4a4a47; cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.04); white-space:nowrap;
}
.nav-pill i{ font-size:15px; }
.icon-circle{
  width:42px; height:42px; border-radius:50%; background:#fff;
  display:flex; align-items:center; justify-content:center; font-size:16px; color:#1c1c1c;
  box-shadow:0 4px 10px rgba(0,0,0,0.06); border:none; cursor:pointer; flex-shrink:0;
}
.logout-pill{
  background:#fdeceb; color:#c9483d; border:1.5px solid #f1b8b3; border-radius:999px;
  height:42px; padding:0 14px; display:flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:700; cursor:pointer; box-shadow:0 4px 10px rgba(0,0,0,0.05); white-space:nowrap;
}
.logout-pill svg{ width:16px; height:16px; flex-shrink:0; }
.logout-pill:active{ transform:scale(0.97); }
.right-icons{ display:flex; align-items:center; gap:10px; }
.export-pill{
  background:#1c1c1c; border-radius:999px; padding:0 16px; height:42px;
  display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,0.06); border:none; cursor:pointer; white-space:nowrap;
}

.title{ font-family:'Poppins',sans-serif; font-weight:500; font-size:32px; color:#1c1c1c; margin:0 0 4px; }
.subtitle{ font-size:13px; color:#6b6b68; margin:0 0 18px; }
.section-lbl{ font-size:13px; font-weight:600; margin:4px 2px 10px; color:#1c1c1c; }

.discount-toggle{ font-size:12px; font-weight:600; color:#4d64d9; margin:0 2px 14px; cursor:pointer; display:inline-block; }
.discount-box{ display:none; margin:-6px 0 16px; }
.discount-box.open{ display:block; }
.discount-box input{
  width:100%; border:none; border-radius:16px; background:#fff; padding:12px 14px; font-size:16px; font-weight:500; color:#c9483d;
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
}

/* ---------------------------------- */
/* aviso de cookies                    */
/* ---------------------------------- */
#cookie-banner{
  position:fixed; left:0; right:0; top:0; z-index:300;
  background:#1c1c1c; color:#fff; padding:14px 18px;
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  box-shadow:0 4px 16px rgba(0,0,0,0.2);
}
#cookie-banner p{ flex:1 1 220px; font-size:12px; line-height:1.5; margin:0; color:rgba(255,255,255,0.85); }
#cookie-banner button{
  border:none; border-radius:12px; background:#f3d24e; color:#1c1c1c;
  font-weight:700; font-size:12.5px; padding:9px 16px; cursor:pointer; flex-shrink:0;
}

/* ---------------------------------- */
/* modal genérico (login, chofer, dueño) */
/* ---------------------------------- */
.modal-overlay{
  display:none; position:fixed; inset:0; background:rgba(28,28,28,0.55);
  align-items:center; justify-content:center; z-index:100; padding:24px;
}
.modal-overlay.active{ display:flex; }
.modal-card{
  background:#faf7ee; border-radius:24px; padding:24px 22px; width:100%; max-width:300px;
  box-shadow:0 16px 40px rgba(0,0,0,0.3);
  max-height:85vh; display:flex; flex-direction:column;
}
.modal-scroll-area{ overflow-y:auto; flex:1; min-height:0; margin:0 -6px; padding:0 6px; }
.modal-title{ font-family:'Poppins'; font-weight:600; font-size:17px; color:#1c1c1c; margin:0 0 16px; flex-shrink:0; }
.modal-row{ display:flex; justify-content:space-between; font-size:13px; color:#6b6b68; padding:8px 0; border-bottom:1px solid rgba(0,0,0,0.06); }
.modal-row:last-child{ border-bottom:none; }
.modal-row b{ color:#1c1c1c; font-weight:700; }
.modal-row-block{ padding:8px 0; border-bottom:1px solid rgba(0,0,0,0.06); }
.modal-row-block .modal-row{ padding:0; border:none; }
.modal-row-block .modal-subrow{ font-size:11px; color:#9a9a96; margin:4px 0 0; }
.modal-actions{ display:flex; gap:10px; margin-top:16px; flex-shrink:0; }
.modal-btn{
  flex:1; border:none; border-radius:14px; padding:12px 0; font-weight:600; font-size:13.5px; cursor:pointer;
}
.modal-btn.secondary{ background:rgba(0,0,0,0.06); color:#4a4a47; }
.modal-btn.primary{ background:#1c1c1c; color:#fff; }
.modal-input{
  width:100%; border:none; border-radius:14px; background:rgba(0,0,0,0.05); padding:14px 16px;
  font-size:16px; font-family:'Inter'; color:#1c1c1c; margin-top:2px;
}
select.modal-input{
  -webkit-appearance:none; appearance:none; padding-right:40px; cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6b68' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat; background-position:right 14px center;
}
.modal-hint{ font-size:11.5px; color:#9a9a96; margin:6px 2px 0; }
.modal-hint:empty{ display:none; }
.modal-error{ display:none; font-size:11.5px; color:#c9483d; margin:8px 2px 0; }
.modal-error.show{ display:block; }

.modal-mini-filter{ display:flex; gap:6px; margin-bottom:14px; flex-shrink:0; }
.modal-mini-filter button{
  flex:1; border:none; border-radius:10px; padding:7px 0; font-size:12px; font-weight:600;
  background:rgba(0,0,0,0.05); color:#6b6b68; cursor:pointer;
}
.modal-mini-filter button.active{ background:#1c1c1c; color:#fff; }
.modal-back-link{ font-size:12px; font-weight:600; color:#4d64d9; margin:0 0 10px; cursor:pointer; display:inline-block; flex-shrink:0; }
.modal-list-row{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid rgba(0,0,0,0.06); cursor:pointer; }
.modal-list-row:last-child{ border-bottom:none; }
.modal-list-row .row-avatar{ width:34px; height:34px; border-radius:50%; background:rgba(0,0,0,0.08); flex-shrink:0; object-fit:cover; }
.modal-list-row .row-avatar.square{ border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#6b6b68; }
.modal-list-row .row-info{ flex:1; min-width:0; }
.modal-list-row .row-info .row-name{ font-size:13px; font-weight:600; color:#1c1c1c; margin:0; }
.modal-list-row .row-info .row-sub{ font-size:11px; color:#9a9a96; margin:2px 0 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.modal-list-row .row-val{ font-size:14px; font-weight:700; color:#2fa85a; flex-shrink:0; text-align:right; }
.modal-list-row .row-chev{ color:#9a9a96; font-size:16px; flex-shrink:0; }
.service-entry{ padding:10px 0; border-bottom:1px solid rgba(0,0,0,0.06); }
.service-entry:last-child{ border-bottom:none; }
.service-entry .service-entry-date{ font-size:12px; font-weight:600; color:#1c1c1c; margin:0 0 2px; }
.service-entry .service-entry-text{ font-size:12px; color:#6b6b68; margin:0; }
.comprobantes-strip{ display:flex; gap:6px; margin:8px 0 0; }
.comprobantes-strip .strip-thumb{ width:40px; height:40px; border-radius:8px; background:rgba(255,255,255,0.12); flex-shrink:0; }

/* ---------------------------------- */
/* pantalla de login                   */
/* ---------------------------------- */
#screen-login .content{
  min-height:100vh; min-height:100dvh; padding:40px 28px; display:flex; flex-direction:column;
}
.login-top{ flex:1; display:flex; flex-direction:column; justify-content:center; }
.login-badge{
  width:64px; height:64px; border-radius:50%; overflow:hidden;
  display:flex; align-items:center; justify-content:center; margin-bottom:26px;
  box-shadow:0 8px 20px rgba(0,0,0,0.15);
}
.login-badge img{ width:100%; height:100%; object-fit:cover; display:block; }
.login-title{ font-family:'Poppins'; font-weight:600; font-size:34px; color:#1c1c1c; margin:0 0 8px; line-height:1.1; }
.login-subtitle{ font-size:14px; color:#6b6b68; margin:0 0 40px; line-height:1.5; }
.login-form-label{ font-size:12px; font-weight:600; color:#6b6b68; text-transform:uppercase; letter-spacing:0.06em; margin:0 0 12px; }
.login-input{
  width:100%; border:none; border-radius:18px; background:#faf7ee; padding:16px 18px;
  font-size:16px; font-family:'Inter'; color:#1c1c1c; margin-bottom:14px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
}
.login-input::placeholder{ color:#9a9a96; }
.login-pass-wrap{ position:relative; }
.login-pass-wrap .login-input{ padding-right:54px; }
.login-pass-ojo{
  position:absolute; right:6px; top:6px; width:42px; height:42px; border:none; background:transparent;
  color:#6b6b68; font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.login-remember{
  display:flex; align-items:center; gap:9px; margin:-2px 0 16px 2px;
  font-size:13px; font-weight:500; color:rgba(255,255,255,0.82); cursor:pointer; user-select:none;
}
.login-remember input{ width:17px; height:17px; accent-color:#f3d24e; cursor:pointer; flex-shrink:0; }
.login-submit-btn{
  width:100%; border:none; border-radius:18px; padding:18px 22px; margin-top:4px;
  background:#1c1c1c; color:#fff; font-family:'Poppins'; font-weight:600; font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:10px;
  box-shadow:0 8px 20px rgba(0,0,0,0.15);
}
.login-submit-btn:active{ transform:scale(0.98); }
.login-submit-btn:disabled{ opacity:0.6; cursor:default; }
.login-error{
  display:none; font-size:12.5px; color:#c9483d; background:#fdeceb; border:1px solid #f1b8b3;
  border-radius:14px; padding:12px 14px; margin-bottom:14px;
}
.login-error.show{ display:block; }
.login-footer{ text-align:center; font-size:11.5px; color:#8a8a86; margin-top:10px; }
.login-footer a{ color:inherit; text-decoration:underline; }

/* Fondo con foto (solo login) — una capa oscura semitransparente
   arriba de la imagen para que el texto siga siendo legible sin
   importar qué haya en la foto. Foto de celular (vertical) por
   defecto; en escritorio se usa la versión horizontal. */
#screen-login{
  background-image:
    linear-gradient(180deg, rgba(15,15,15,0.35) 0%, rgba(15,15,15,0.8) 100%),
    url('../img/login-fondo-movil.jpg');
  background-size: cover;
  background-position: center;
}
#screen-login .login-title{ color:#fff; }
#screen-login .login-subtitle{ color:rgba(255,255,255,0.82); }
#screen-login .login-form-label{ color:rgba(255,255,255,0.75); }
#screen-login .login-footer{ color:rgba(255,255,255,0.6); }

@media (min-width: 1024px){
  #screen-login{
    background-image:
      linear-gradient(100deg, rgba(15,15,15,0.75) 0%, rgba(15,15,15,0.25) 55%, rgba(15,15,15,0.7) 100%),
      url('../img/login-fondo-escritorio.jpg');
  }
  #screen-login{ max-width:none; width:100%; }
  #screen-login .content{
    max-width:1180px; margin:0 auto; padding:0 48px;
    min-height:100vh; min-height:100dvh;
  }
  #screen-login .login-top{
    flex:1; display:flex; flex-direction:row; align-items:center; justify-content:center; gap:100px;
  }
  #screen-login .login-brand{ flex:1 1 0; max-width:480px; }
  #screen-login .login-actions{ flex:1 1 0; max-width:420px; }
  #screen-login .login-badge{ width:84px; height:84px; border-radius:50%; margin-bottom:32px; }
  #screen-login .login-title{ font-size:54px; }
  #screen-login .login-subtitle{ font-size:16px; margin-bottom:0; }
  #screen-login .login-footer{ margin-top:0; padding-bottom:36px; }
}

/* ---------------------------------- */
/* aviso emergente (toast)             */
/* ---------------------------------- */
#aviso-toast{
  position:fixed; left:50%; top:16px; transform:translate(-50%, -140%);
  z-index:400; max-width:min(92vw, 420px);
  background:#1c1c1c; color:#fff; font-size:13px; font-weight:600; line-height:1.4;
  padding:12px 18px; border-radius:16px; text-align:center;
  box-shadow:0 10px 28px rgba(0,0,0,0.3);
  transition:transform 0.3s ease; pointer-events:none;
}
#aviso-toast.visible{ transform:translate(-50%, 0); }

/* ---- ventanita de avisos (reemplaza al alert del navegador) ---- */
.dialogo-texto{ font-size:13.5px; line-height:1.5; color:#4a4a47; margin:0 0 10px; }
.dialogo-cred{ background:rgba(0,0,0,0.05); border-radius:14px; padding:10px 14px; margin:0 0 10px; }
.dialogo-cred .lbl{ font-size:10.5px; color:#9a9a96; display:block; margin-bottom:3px; }
.dialogo-cred p{ margin:0; font-size:14px; font-weight:600; color:#1c1c1c; word-break:break-all; }
.dialogo-cred p.clave{ font-family:ui-monospace, Menlo, monospace; font-size:17px; letter-spacing:0.03em; }

/* ojito dentro de los campos de contraseña de los modales */
.pass-wrap-modal{ position:relative; margin-top:10px; }
.pass-wrap-modal:first-child{ margin-top:0; }
.pass-wrap-modal .modal-input{ margin-top:0 !important; padding-right:52px; }
.pass-wrap-modal .login-pass-ojo{ top:50%; transform:translateY(-50%); right:4px; }

/* cuadro de cifras dentro de la ventanita de avisos */
.dialogo-filas{ background:rgba(0,0,0,0.05); border-radius:14px; padding:4px 14px; margin:0 0 10px; }
.dialogo-fila{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:9px 0; font-size:13.5px; border-bottom:1px solid rgba(0,0,0,0.07); }
.dialogo-fila:last-child{ border-bottom:none; }
.dialogo-fila span{ color:#6b6b68; }
.dialogo-fila b{ color:#1c1c1c; font-size:15px; }
