*{box-sizing:border-box}
:root{
  --gold:#c99b48;
  --bg:#f4f4f4;
  --text:#222;
  --muted:#6b7280;
  --line:#e5e7eb;
  --green:#15803d;
  --green-bg:#f0fdf4;
  --green-line:#bbf7d0;
  --orange:#9a5b00;
  --orange-bg:#fff7ed;
  --orange-line:#fed7aa;
  --red:#b42318;
  --red-bg:#fff1f2;
  --red-line:#fecdd3;
}
html,body{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
}
body{min-height:100vh}
button,input{font:inherit}
.page{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:0;
}
.shell{
  position:relative;
  width:min(100%,430px);
  min-height:100vh;
  background:#fff;
  box-shadow:0 1px 10px rgba(0,0,0,.05);
}
.top-actions{
  position:absolute;
  top:10px;
  right:12px;
  z-index:5;
}
.lang-btn{
  border:1px solid #e5e7eb;
  background:rgba(255,255,255,.94);
  color:#333;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  cursor:pointer;
}
.welcome{
  padding:58px 18px 24px;
  text-align:center;
}
.welcome h1{
  margin:0;
  color:var(--gold);
  font-size:clamp(34px,9vw,48px);
  line-height:1.02;
  font-weight:800;
  letter-spacing:-1.2px;
}
.welcome p{
  margin:24px 0 0;
  font-size:17px;
  line-height:1.45;
  color:#2f2f2f;
}
.state-section{
  border-top:1px solid var(--line);
  padding:22px 18px 28px;
}
.loader-section{
  text-align:center;
  color:var(--muted);
}
.spinner{
  width:42px;
  height:42px;
  margin:0 auto 12px;
  border:4px solid #eee;
  border-top-color:var(--gold);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.auth-media{
  margin:0 auto 16px;
  display:flex;
  justify-content:center;
}
.auth-media img{
  display:block;
  width:100%;
  max-width:390px;
  height:auto;
  object-fit:contain;
}
.status-card{
  border-radius:16px;
  padding:18px 16px;
  text-align:center;
}
.status-card.good{
  border:1px solid var(--green-line);
  background:var(--green-bg);
}
.status-card.warn{
  border:2px solid var(--orange-line);
  background:var(--orange-bg);
}
.status-card.bad{
  border:1px solid var(--red-line);
  background:var(--red-bg);
}
.status-card.neutral{
  border:1px solid #d1d5db;
  background:#f9fafb;
}
.status-icon{
  display:none;
  font-size:32px;
  line-height:1;
  margin-bottom:8px;
}
.status-card.warn .status-icon,
.status-card.bad .status-icon,
.status-card.neutral .status-icon{
  display:block;
}
.status-card h2{
  margin:0;
  font-size:25px;
  line-height:1.15;
  font-weight:800;
}
.status-card.good h2{color:#15803d}
.status-card.warn h2{color:#9a5b00}
.status-card.bad h2{color:#b42318}
.status-card.neutral h2{color:#374151}
.status-message{
  margin:10px auto 0;
  color:#4b5563;
  font-size:15px;
  line-height:1.5;
}
.details{
  margin-top:12px;
  display:grid;
  gap:7px;
}
.detail-line{
  display:flex;
  align-items:baseline;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  font-size:16px;
}
.status-card.good .detail-line:first-child{
  color:#16a34a;
}
.detail-line span{font-weight:400}
.detail-line strong{
  font-weight:700;
  overflow-wrap:anywhere;
}
.report{
  display:block;
  width:100%;
  margin-top:16px;
  padding:12px 14px;
  border-radius:12px;
  background:#ea580c;
  color:#fff;
  text-decoration:none;
  font-size:16px;
  font-weight:800;
}
.status-card.bad .report{background:#b42318}
.url-check{
  margin-top:14px;
  padding:14px 12px;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#f9fafb;
  text-align:center;
  color:#5b5b5b;
  font-size:16px;
  line-height:1.4;
}
.url-check strong{
  display:block;
  margin-top:5px;
  color:#222;
  font-size:18px;
}
.auth-footer{
  padding:22px 6px 0;
  text-align:center;
  color:#6b7280;
  font-size:14px;
}
.manual-intro{
  margin:0 0 14px;
  text-align:center;
  color:#6b7280;
}
.manual label{
  display:block;
  margin:12px 0 6px;
  color:#555;
  font-size:13px;
}
.manual input{
  width:100%;
  padding:13px 14px;
  border:1px solid #d1d5db;
  border-radius:12px;
  font-size:16px;
  text-transform:uppercase;
  outline:none;
}
.manual input:focus{border-color:#9ca3af}
.manual button{
  width:100%;
  margin-top:16px;
  border:0;
  border-radius:12px;
  padding:14px 16px;
  background:#111;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.config-error{
  margin:0 18px 20px;
  padding:12px;
  border-radius:10px;
  background:var(--red-bg);
  color:var(--red);
  font-size:13px;
  line-height:1.4;
}
.hidden{display:none!important}
[dir="rtl"] .top-actions{right:auto;left:12px}
[dir="rtl"] .manual{text-align:right}
@media(max-width:480px){
  .welcome{padding-top:54px}
  .welcome p{font-size:16px}
  .state-section{padding-left:16px;padding-right:16px}
}
