:root{
  --brand:#1f6b55;
  --brand-dark:#174f40;
  --bg:#f3f4f6;
  --card:#ffffff;
  --line:#d9dde3;
  --text:#111827;
  --muted:#6b7280;
  --input-bg:#f5f6f8;
  --icon:#b4b7bf;
  --danger:#b42318;
  --shadow:0 18px 45px rgba(0,0,0,.08);
  --radius-xl:28px;
  --radius-lg:20px;
  --radius-md:14px;
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:Arial, Helvetica, sans-serif;
  min-height:100%;
}

body{
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{
  max-width:100%;
  display:block;
}

button,
input{
  font:inherit;
}

.app-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.app-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:14px 20px 4px;
  max-width:520px;
  width:100%;
  margin:0 auto;
}

.app-version{
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
}

.app-version-sub{
  margin-top:2px;
}

.app-info-btn{
  width:34px;
  height:34px;
  border:none;
  border-radius:50%;
  background:var(--brand);
  color:#fff;
  font-weight:700;
  font-size:18px;
  cursor:pointer;
  box-shadow:var(--shadow);
}

.login-hero{
  max-width:520px;
  width:100%;
  margin:0 auto;
  padding:8px 20px 14px;
  text-align:center;
}

.brand-logo-wrap{
  width:150px;
  max-width:52%;
  margin:18px auto 14px;
}

.brand-logo{
  width:100%;
  height:auto;
  object-fit:contain;
}

.login-hero h1{
  margin:0 0 6px;
  font-size:24px;
  line-height:1.08;
  font-weight:800;
}

.login-hero p{
  margin:0;
  color:var(--text);
  font-size:15px;
}

.login-card{
  width:100%;
  max-width:520px;
  margin:0 auto;
  background:var(--card);
  border-top:1px solid var(--line);
  box-shadow:0 -2px 10px rgba(0,0,0,.02);
}

.login-form{
  display:flex;
  flex-direction:column;
}

.field-row{
  border-bottom:1px solid var(--line);
}

.field-label{
  min-height:72px;
  display:grid;
  grid-template-columns:30px 1fr auto;
  align-items:center;
  gap:12px;
  padding:0 18px;
  background:var(--input-bg);
}

.field-icon{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--icon);
}

.field-icon svg{
  width:26px;
  height:26px;
  fill:currentColor;
}

.field-label input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:18px;
  min-width:0;
}

.field-label input::placeholder{
  color:#b7bac2;
}

.toggle-password{
  border:none;
  background:transparent;
  color:var(--icon);
  width:30px;
  height:30px;
  padding:0;
  cursor:pointer;
}

.toggle-password svg{
  width:26px;
  height:26px;
  fill:currentColor;
}

.remember-row{
  min-height:68px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:0 18px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.remember-left{
  display:flex;
  align-items:center;
  gap:12px;
  color:#8c8f97;
  font-size:16px;
}

.remember-icon{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--icon);
}

.remember-icon svg{
  width:26px;
  height:26px;
  fill:currentColor;
}

.switch{
  position:relative;
  width:64px;
  height:36px;
  display:inline-block;
  flex:0 0 auto;
}

.switch input{
  opacity:0;
  width:0;
  height:0;
}

.slider{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#d5d7dc;
  transition:.2s ease;
  cursor:pointer;
}

.slider::before{
  content:"";
  position:absolute;
  width:28px;
  height:28px;
  left:4px;
  top:4px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  transition:.2s ease;
}

.switch input:checked + .slider{
  background:var(--brand);
}

.switch input:checked + .slider::before{
  transform:translateX(28px);
}

.helper-text{
  margin:10px 18px 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.error-box{
  margin:10px 18px 0;
  padding:10px 12px;
  border-radius:12px;
  background:#fdecec;
  color:var(--danger);
  font-size:13px;
  line-height:1.35;
}

.submit-btn{
  margin-top:12px;
  width:100%;
  min-height:72px;
  border:none;
  border-radius:0;
  background:var(--brand);
  color:#fff;
  font-size:18px;
  font-weight:800;
  cursor:pointer;
}

.submit-btn:active{
  background:var(--brand-dark);
}

.info-modal[hidden]{
  display:none;
}

.info-modal{
  position:fixed;
  inset:0;
  z-index:9999;
}

.info-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.42);
}

.info-modal-box{
  position:relative;
  z-index:2;
  width:min(92vw,420px);
  margin:14vh auto 0;
  background:#fff;
  border-radius:24px;
  padding:22px;
  box-shadow:var(--shadow);
}

.info-modal-box h2{
  margin:0 0 12px;
}

.info-modal-box p{
  margin:0 0 10px;
  color:#374151;
  line-height:1.5;
}

.modal-close-btn{
  margin-top:10px;
  border:none;
  background:var(--brand);
  color:#fff;
  border-radius:12px;
  padding:12px 16px;
  font-weight:700;
  cursor:pointer;
}

@media (max-width:430px){
  .app-topbar{
    padding:12px 16px 2px;
  }

  .login-hero{
    padding:6px 16px 12px;
  }

  .brand-logo-wrap{
    width:132px;
    max-width:48%;
    margin:12px auto 10px;
  }

  .login-hero h1{
    font-size:22px;
  }

  .login-hero p{
    font-size:14px;
  }

  .field-label{
    min-height:66px;
    padding:0 16px;
  }

  .field-label input{
    font-size:17px;
  }

  .remember-row{
    min-height:62px;
    padding:0 16px;
  }

  .remember-left{
    font-size:15px;
  }

  .submit-btn{
    min-height:66px;
    font-size:17px;
  }
}

@media (min-width:768px){
  .app-shell{
    justify-content:center;
    padding:30px 0;
  }

  .app-topbar{
    padding-top:0;
  }

  .login-card{
    border:1px solid var(--line);
    border-radius:28px;
    overflow:hidden;
    box-shadow:var(--shadow);
  }

  .submit-btn{
    border-radius:0 0 28px 28px;
  }
}