@charset "UTF-8";

/* ====== Base ====== */
:root{
  --card-bg: rgba(255,255,255,.35);
  --card-border: rgba(255,255,255,.55);
  --text: #0b1b2a;
  --muted: rgba(11, 27, 42, .62);
  --shadow: 0 20px 60px rgba(2, 18, 38, .22);
  --ring: 0 0 0 4px rgba(13,110,253,.18);
}


html, body { height: 100%; }
body{
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

/* Bạn đang set background trong <style> của login.php rồi,
   CSS này chỉ thêm overlay để "hơi trong mờ nhẹ" */
.bg-overlay{
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.28));

  pointer-events: none;
  z-index: 0;
}

/* noise nhẹ cho “pro” hơn */
.bg-noise{
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}

.auth-wrap{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 14px;
}

/* ====== Card ====== */
.auth-card{
  width: min(450px, 94vw);
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 28px 26px 18px;
  position: relative;
  animation: showIn .55s cubic-bezier(.2,.8,.2,1);
}

@keyframes showIn{
  from{ opacity:0; transform: translateY(18px) scale(.98); }
  to{ opacity:1; transform: none; }
}

/* viền sáng góc */
.auth-card:before{
  content:"";
  position:absolute; inset:0;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(120deg,
    rgba(255,255,255,.85),
    rgba(255,255,255,.25),
    rgba(255,255,255,.55)
  );

  /* Standard (Firefox + spec) */
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;

  /* WebKit (Chrome/Safari) */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;

  pointer-events:none;
}


.brand{
  display:flex;
  align-items:center;
  gap: 14px;
}

.brand-logo{
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  display:grid;
  place-items:center;
  overflow:hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  margin: 0 auto;
}

.brand-logo img{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}

.brand-title{
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 1.20rem;
  line-height: 1.25;
  color: rgba(21, 24, 133, 0.92); 
  text-transform: uppercase;
}

.brand-sub{
  margin-top: 2px;
  font-size: 1.05rem;
  color: rgba(27, 24, 124, 0.68); 
}

.divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.36), transparent);
  margin: 16px 0 14px;
}

.auth-title{
  margin: 0;
  font-weight: 800;
  font-size: 1.40rem;
  color: rgba(165, 6, 6, 0.92);

  /* Stroke trắng */
  -webkit-text-stroke: 0.2px #fff;

  /* Fallback + shadow nhẹ */
  text-shadow:
    -0.5px -0.5px 0 #fff,
     0.5px -0.5px 0 #fff,
    -0.5px  0.5px 0 #fff,
     0.5px  0.5px 0 #fff,
     0 1px 2px rgba(0,0,0,0.28);
}

.auth-desc{
  margin: 6px 0 14px;
  font-weight: 600;
  font-size: .98rem;
  color: rgba(161, 5, 5, 0.82);

  /* Stroke trắng mỏng */
  -webkit-text-stroke: 0.3px #211c58;

  /* Fallback + shadow nhẹ */
  text-shadow:
    -0.4px -0.4px 0 #c6c4c4,
     0.4px -0.4px 0 #fff,
    -0.4px  0.4px 0 #fff,
     0.4px  0.4px 0 #fff,
     0 1px 1px rgba(0,0,0,0.22);
}

/* ====== Form ====== */
.auth-form{ margin-top: 6px; }

.field{ display:block; margin-bottom: 12px; }

.field-label{
  display:block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: .98rem;
  color: rgba(0, 45, 86, 0.78); 
}

.field-control{
  position: relative;
  display:flex;
  align-items:center;
}

.field-icon{
  position:absolute;
  left: 12px;
  opacity: .75;
  transform: translateY(-1px);
}

.auth-card .form-control{
  height: 46px;
  border-radius: 14px;
  padding-left: 42px;
  padding-right: 44px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(11,27,42,.10);
  color: rgba(11,27,42,.88);
  box-shadow: none;
}

.auth-card .form-control::placeholder{
  color: rgba(11,27,42,.45);
}


.auth-card .form-control:focus{
  border-color: rgba(13,110,253,.55);
  box-shadow: var(--ring);
  background: rgba(255,255,255,.22);
  color: rgba(27, 3, 100, 0.96);
}

.toggle-pass{
  position:absolute;
  right: 10px;
  border: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: rgba(11,27,42,.70);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease;
}
.toggle-pass:hover{
  background: rgba(11,27,42,.06); 
  transform: translateY(-1px);
}

/* Button */
.btn-login{
  height: 46px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .6px;
  margin-top: 6px;
  box-shadow: 0 14px 30px rgba(13,110,253,.28);
}
.btn-login:active{ transform: translateY(1px); }

/* Footer */
.auth-footer{
  margin-top: 14px;
  padding-top: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap: 8px;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
  line-height: 1.35;
  text-align:center;
}

.auth-footer .footer-text{
  display:inline-flex;
  align-items:center;
}

.auth-footer .dot{
  opacity: .7;
  line-height: 1;
}

.auth-footer .muted{ opacity: .85; }

.footer-qr-btn{
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #ffc107;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background .2s ease, transform .2s ease;
}

.footer-qr-btn:hover{
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

/* Bootstrap alert nhìn hợp nền tối */
.alert{
  border-radius: 14px;
}

/* ====== Mobile ====== */
@media (max-width: 520px){
  .auth-card{ padding: 22px 18px 14px; border-radius: 18px; }
  .auth-card:before{ border-radius: 18px; }
  .brand-title{ font-size: .98rem; }
  .auth-title{ font-size: 1.22rem; }
  .brand-logo{ width: 56px; height: 56px; border-radius: 16px; }
  .brand-logo img{ width: 42px; height: 42px; }
    .auth-footer{
    gap: 6px;
    font-size: .95rem;
  }

  .auth-footer .dot{
    display:none;
  }
}

.auth-header{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.brand-text{
  text-align: center;
}

/* New styles for the login page OTP/Ghi nhớ password */

    /* ===== Driver OTP login mode ===== */
    .driver-login-note{
      font-size:.92rem;
      border-radius:12px;
    }
    .driver-login-note b{
      font-weight:800;
    }
    .driver-otp-wrap{
  display:none;
}
.driver-otp-wrap.show{
  display:block !important;
}
    .driver-fullinfo-wrap.is-disabled{
      opacity:.38;
      pointer-events:none;
      filter:grayscale(.12);
      transition:all .2s ease;
    }
    .driver-mode-chip{
      display:inline-flex;
      align-items:center;
      gap:.35rem;
      padding:.28rem .6rem;
      border-radius:999px;
      font-size:.82rem;
      font-weight:700;
      border:1px solid #dbeafe;
      background:#eff6ff;
      color:#1d4ed8;
    }
    .driver-mode-chip.is-normal{
      border-color:#e5e7eb;
      background:#f8fafc;
      color:#475569;
    }
    .mono{
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }
    body.login-success{
  animation: loginFlash .6s ease;
}

@keyframes loginFlash{
  0%{filter:brightness(1)}
  50%{filter:brightness(1.3)}
  100%{filter:brightness(1)}
}
/* Fallback: never show mobile PWA card on desktop */
@media (min-width: 992px){
  #loginPwaCard{
    display:none !important;
  }
}
#loginIosPwaHint .alert{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(13,110,253,.14);
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}

#loginIosPwaHint b{
  font-weight: 800;
}
.remember-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  margin-top:12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:rgba(255,255,255,.72);
  backdrop-filter: blur(6px);
}

.remember-box .form-check{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:auto;
}

.remember-box .form-check-input{
  margin:0;
  width:1.08rem;
  height:1.08rem;
  cursor:pointer;
}

.remember-box .form-check-label{
  margin:0;
  cursor:pointer;
  font-weight:600;
  color:#1f2937;
  user-select:none;
}

.remember-box .remember-note{
  font-size:.82rem;
  color:#64748b;
  line-height:1.35;
  text-align:right;
}

.driver-remember-box{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  margin-top:10px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#f8fafc;
}

.driver-remember-box .form-check{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:auto;
}

.driver-remember-box .form-check-input{
  margin:0;
  width:1.08rem;
  height:1.08rem;
  cursor:pointer;
}

.driver-remember-box .form-check-label{
  margin:0;
  cursor:pointer;
  font-weight:600;
  color:#0f172a;
  user-select:none;
}

.driver-remember-box .driver-remember-note{
  font-size:.82rem;
  color:#64748b;
  line-height:1.35;
  text-align:right;
}

@media (max-width: 575.98px){
  .remember-box,
  .driver-remember-box{
    flex-direction:column;
    align-items:flex-start;
  }

  .remember-box .remember-note,
  .driver-remember-box .driver-remember-note{
    text-align:left;
  }
}
.form-check {
  display:flex;
  align-items:center;
  gap:6px;
}

.form-check-input {
  width:18px;
  height:18px;
  cursor:pointer;
}

.form-check-label {
  cursor:pointer;
  user-select:none;
}

/* =========================================================
   APP CHOOSER PAGING — Glass / iOS style
   4 app / row, 2 rows / page
========================================================= */
.app-chooser-pager{
  --glass-bg: rgba(255,255,255,.16);
  --glass-bg-hover: rgba(255,255,255,.22);
  --glass-border: rgba(255,255,255,.30);
  --glass-highlight: rgba(255,255,255,.42);
  --glass-shadow: 0 18px 34px rgba(16, 24, 40, .16);
  --glass-shadow-hover: 0 22px 40px rgba(16, 24, 40, .20);
  --nav-icon: rgba(255,255,255,.96);

  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0 26px;
}

.app-chooser-viewport{
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 24px;
}

.app-chooser-viewport::-webkit-scrollbar{
  display: none;
}

.app-chooser-track{
  display: flex;
  align-items: stretch;
  width: 100%;
}

.app-chooser-page{
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  padding: 2px 2px 24px;
}

/* bóng mềm tách xa khỏi hàng app thứ 2 */
.app-chooser-page::after{
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 2px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center,
      rgba(16,24,40,.16) 0%,
      rgba(16,24,40,.09) 36%,
      rgba(16,24,40,.04) 62%,
      rgba(16,24,40,0) 100%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.chooser-page-grid{
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
  width: min(100%, 960px);
  max-width: 960px !important;
  margin-inline: auto;
}

.chooser-page-grid > .app-tile{
  flex: 0 1 220px;
}

.app-chooser-pager.single-page .app-chooser-viewport{
  overflow: visible;
}

/* ===== Glass nav buttons ===== */
.app-chooser-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.24) 0%,
      rgba(255,255,255,.10) 100%);
  color: var(--nav-icon);
  font-size: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -10px 18px rgba(255,255,255,.03);
  backdrop-filter: blur(16px) saturate(165%);
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  transition:
    transform .24s ease,
    box-shadow .24s ease,
    background .24s ease,
    border-color .24s ease,
    opacity .24s ease;
  overflow: hidden;
}

/* highlight kính */
.app-chooser-nav::after{
  content:"";
  position:absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.24) 0%,
      rgba(255,255,255,0) 42%);
  pointer-events:none;
}

/* arrow */
.app-chooser-nav::before{
  content:"";
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  display:block;
  border-top: 2.4px solid currentColor;
  border-right: 2.4px solid currentColor;
  opacity: .76;
}

.app-chooser-nav.prev::before{
  transform: rotate(-135deg);
  margin-left: 4px;
}

.app-chooser-nav.next::before{
  transform: rotate(45deg);
  margin-right: 4px;
}

.app-chooser-nav:hover{
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.30) 0%,
      rgba(255,255,255,.14) 100%);
  border-color: rgba(255,255,255,.38);
  box-shadow:
    var(--glass-shadow-hover),
    inset 0 1px 0 rgba(255,255,255,.50),
    inset 0 -10px 18px rgba(255,255,255,.04);
  transform: translateY(-50%) scale(1.045);
}

.app-chooser-nav:active{
  transform: translateY(-50%) scale(.985);
  box-shadow:
    0 12px 24px rgba(16,24,40,.14),
    inset 0 1px 0 rgba(255,255,255,.38);
}

.app-chooser-nav:disabled{
  opacity: .28;
  cursor: default;
  transform: translateY(-50%);
  box-shadow:
    0 10px 18px rgba(16,24,40,.08),
    inset 0 1px 0 rgba(255,255,255,.22);
}

/* vị trí cân đối, không đè card */
.app-chooser-nav.prev{
  left: -4px;
}

.app-chooser-nav.next{
  right: -4px;
}

/* ===== Dots iOS style ===== */
.app-chooser-dots{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.app-chooser-dot{
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 1px 2px rgba(16,24,40,.08);
  transition:
    width .24s ease,
    background .24s ease,
    transform .24s ease,
    box-shadow .24s ease;
}

.app-chooser-dot:hover{
  transform: scale(1.05);
  background: rgba(255,255,255,.48);
}

.app-chooser-dot.active{
  width: 26px;
  background:
    linear-gradient(90deg,
      rgba(63,133,255,.96) 0%,
      rgba(52,120,255,.92) 100%);
  box-shadow:
    0 6px 16px rgba(52,120,255,.22),
    inset 0 1px 0 rgba(255,255,255,.30);
}

/* touch devices: ẩn nút, giữ swipe */
@media (hover: none) and (pointer: coarse){
  .app-chooser-nav{
    display: none !important;
  }
}

@media (max-width: 1199.98px){
  .chooser-page-grid{
    gap: 16px;
  }

  .app-chooser-nav{
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 991.98px){
  .app-chooser-pager{
    padding: 0 10px;
  }

  .chooser-page-grid{
    width: min(100%, 680px);
    max-width: 680px !important;
  }

  .chooser-page-grid > .app-tile{
    flex-basis: min(100%, 260px);
  }

  .app-chooser-page{
    padding-bottom: 18px;
  }

  .app-chooser-page::after{
    left: 10%;
    right: 10%;
    height: 20px;
    bottom: 1px;
    filter: blur(10px);
  }

  .app-chooser-nav.prev{
    left: -1px;
  }

  .app-chooser-nav.next{
    right: -1px;
  }
}

@media (max-width: 575.98px){
  .app-chooser-nav{
    display: none !important;
  }

  .app-chooser-dots{
    margin-top: 8px;
  }

  .app-chooser-page{
    padding-bottom: 14px;
  }

  .app-chooser-page::after{
    left: 12%;
    right: 12%;
    height: 16px;
    bottom: 0;
    filter: blur(8px);
  }

  .chooser-page-grid{
    width: 100%;
    max-width: 100% !important;
  }

  .chooser-page-grid > .app-tile{
    flex-basis: min(100%, 230px);
  }
}
