/* ==========================================================================
   File: driver_login.css
   Location: C:\xampp\htdocs\taxi_app\assets\driver_css\driver_login.css
   Purpose:
     - Full-screen app-like login (NO scroll)
     - Default text BLACK
     - Language active = light green
     - Login button glassy like body + hover green
     - Eye icon always visible INSIDE password input
   Connected to:
     - /driver/driver_login.php
   ========================================================================== */

:root{
  --danger:#f72585;
  --danger-soft:#fdecea;
  --warn:#f8961e;
  --shell-w: clamp(320px, 94vw, 560px);
  --lang-active-bg: #55efc4;
  --lang-active-text: #064e3b;
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html, body{
  height:100%;
  height:100dvh;
  overflow:hidden;
}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,sans-serif;
  color:var(--text);
}
body[dir="rtl"]{font-family:Tahoma,Arial,sans-serif}

/* LANG SWITCH */
.lang-switch{
  position:fixed;
  top:calc(8px + env(safe-area-inset-top));
  z-index:50;
  display:flex;
  gap:8px;
  padding:6px;
  border-radius:999px;
  background:rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border:1px solid rgba(0,0,0,.12);
}
body[dir="ltr"] .lang-switch{right:10px}
body[dir="rtl"] .lang-switch{left:10px}

.lang-switch a{
  text-decoration:none;
  font-weight:950;
  font-size:12px;
  color:var(--text);
  padding:8px 14px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
}
.lang-switch a.active{
  background:var(--lang-active-bg);
  color:var(--lang-active-text);
}

/* TOAST */
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  top:calc(52px + env(safe-area-inset-top));
  z-index:60;
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(0,0,0,.12);
  border-radius:999px;
  padding:10px 14px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.toast.show{opacity:1}
.toast.error{background:rgba(253,236,234,.96);border-color:rgba(247,37,133,.35)}
.toast i{color:var(--primary)}
.toast.error i{color:var(--danger)}

/* MAIN LAYOUT */
.auth-shell{
  height:100%;
  height:100dvh;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:
    calc(84px + env(safe-area-inset-top))
    14px
    calc(14px + env(safe-area-inset-bottom));
}

/* BRAND */
.brand{
  width:var(--shell-w);
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-icon{
  width:52px;height:52px;
  border-radius:16px;
  display:grid;place-items:center;
  background:rgba(67,97,238,.14);
  color:var(--primary);
  font-size:24px;
  border:1px solid rgba(0,0,0,.10);
  cursor:pointer;
}
.brand-text h1{font-size:22px;font-weight:950;line-height:1.1;color:var(--text)}
.brand-text p{color:var(--muted);font-size:13px;margin-top:2px}

/* ALERT */
.alert{
  width:var(--shell-w);
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:14px;
  font-size:14px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.12);
}
.alert-error{
  background:rgba(253,236,234,.95);
  border-color:rgba(247,37,133,.35);
  color:#9f1239;
}

/* BUTTONS */
.btn{
  width:100%;
  border:none;
  border-radius:14px;
  padding:13px 14px;
  font-size:15px;
  font-weight:950;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.btn:disabled{opacity:.65;cursor:not-allowed}

/* Login glassy like body, text black; hover green */
.btn-primary{
  background:rgba(255,255,255,.80);
  color:var(--btn-primary-text);
  border:1px solid rgba(0,0,0,.12);
}
.btn-primary:hover{
  background:var(--btn-primary-hover);
  color:var(--btn-primary-hover-text);
  border-color:rgba(16,185,129,.45);
}
.btn-primary:active{background:var(--btn-primary-active);transform:scale(.98);} 

.btn-secondary{
  background:var(--btn-secondary-bg);
  color:var(--btn-secondary-text);
}
.btn-secondary:hover{background:var(--btn-secondary-hover)}
.btn-secondary:active{background:var(--btn-secondary-active);transform:scale(.98);}

.btn.loading{opacity:.92}

.spinner{
  width:18px;height:18px;
  border-radius:50%;
  border:3px solid rgba(0,0,0,.18);
  border-top-color:rgba(0,0,0,.55);
  animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* GPS PANEL */
.gps-panel{
  width:var(--shell-w);
  display:flex;
  flex-direction:column;
  gap:8px;
}

.coords{
  display:none;
  padding:8px 2px;
  border-top:1px solid rgba(0,0,0,.12);
  border-bottom:1px solid rgba(0,0,0,.12);
}
.coords .row{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--text);
  margin-bottom:6px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Courier New',monospace;
}
.coords .row:last-child{margin-bottom:0}

.warn{
  text-align:center;
  padding:4px 0;
}
.warn i{font-size:18px;margin-bottom:2px;color:var(--warn);display:block}
.warn strong{display:block;font-weight:950;margin-bottom:2px;color:var(--text)}
.warn p{color:rgba(0,0,0,.75);font-size:12.5px}
.warn .small{font-size:12px;opacity:.85;margin-top:4px}

/* FORM */
.login-form{
  width:var(--shell-w);
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-top:4px;
}

.field label{
  display:block;
  font-size:12.5px;
  font-weight:950;
  margin-bottom:6px;
  color:var(--text);
}

.control{position:relative}
.control i{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  color:rgba(0,0,0,.55);
  z-index:2;
}
body[dir="ltr"] .control i{left:12px}
body[dir="rtl"] .control i{right:12px}

.control input{
  width:100%;
  border-radius:14px;
  border:1.5px solid rgba(0,0,0,.14);
  background:var(--input-bg);
  padding:13px 14px;
  font-size:15px;
  color:var(--text);
  outline:none;
}
body[dir="ltr"] .control input{padding-left:40px;padding-right:54px}
body[dir="rtl"] .control input{padding-right:40px;padding-left:54px}

.control input:focus{
  border-color:rgba(85,239,196,.85);
  box-shadow:0 0 0 3px rgba(85,239,196,.18);
}

/* ✅ Eye ALWAYS on the RIGHT side (LTR + RTL) */
/* ✅ Eye moves with language direction */
.toggle{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:none;
  background:transparent;
  color:rgba(0,0,0,.70);
  cursor:pointer;
  border-radius:12px;
  z-index:3;
}

/* LTR (English): right side */
html[dir="ltr"] .toggle{
  right:6px;
  left:auto;
}

/* RTL (Arabic/Kurdish): left side */
html[dir="rtl"] .toggle{
  left:6px;
  right:auto;
}
body[dir="ltr"] .toggle{right:6px}
body[dir="rtl"] .toggle{left:6px}
.toggle:hover{background:rgba(0,0,0,.06)}

/* Back link */
.back{text-align:center}
.back a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:950;
  color:var(--link);
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(0,0,0,.12);
}
.back a:hover{color:var(--link-hover)}

/* compress for short screens */
@media (max-height: 720px){
  .auth-shell{gap:8px; padding-top: calc(74px + env(safe-area-inset-top));}
  .brand-text p{display:none;}
  .warn .small{display:none;}
}
input::placeholder, textarea::placeholder{color:#E8E8DC !important;opacity:1;}
body{padding:0;background:#dcfce7;}
.lang-switch{top:0;left:0;right:0;width:auto;margin:0;border-radius:0;padding:calc(env(safe-area-inset-top) + 6px) 10px 6px;}
