:root{
  --green:#25ef3f;
  --green2:#0fb52d;
  --black:#030503;
  --panel:rgba(0,0,0,.84);
  --white:#f8f8f8;
}

*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

html,body{
  width:1280px;
  height:800px;
  margin:0;
  padding:0;
  overflow:hidden;
  background:#000;
}

body{
  color:var(--white);
  font-family:Arial,Helvetica,sans-serif;
  user-select:none;
}

button,input{
  font-family:Arial,Helvetica,sans-serif;
  touch-action:manipulation;
}

.app-shell{
  width:1280px;
  height:800px;
  display:grid;
  grid-template-columns:520px 700px;
  gap:20px;
  padding:18px 20px;
  background:radial-gradient(circle at 50% 50%,rgba(26,255,64,.18),#000 68%);
}

.brand-panel{
  width:520px;
  height:764px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-logo{
  width:500px;
  height:740px;
  object-fit:contain;
  object-position:center;
  display:block;
  filter:drop-shadow(0 0 26px rgba(37,239,63,.62));
}

.kiosk-panel{
  width:700px;
  height:764px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
}

.title-block{
  text-align:center;
}

.welcome{
  letter-spacing:8px;
  font-weight:900;
  font-size:18px;
}

h1{
  margin:5px 0 3px;
  color:var(--green);
  font-size:56px;
  line-height:1;
  text-shadow:0 0 22px rgba(37,239,63,.78);
}

.title-block p{
  margin:3px 0 0;
  letter-spacing:4px;
  font-weight:900;
  font-size:16px;
}

.screen{
  display:none;
  border:3px solid var(--green);
  border-radius:22px;
  background:var(--panel);
  box-shadow:0 0 26px rgba(37,239,63,.35);
  padding:20px 34px;
  text-align:center;
}

.screen.active{
  display:block;
}

.label{
  display:block;
  color:var(--green);
  font-weight:900;
  letter-spacing:1px;
  font-size:24px;
  margin-bottom:12px;
}

.phone-input,
.name-input{
  width:100%;
  height:88px;
  background:#030303;
  border:3px solid var(--green);
  border-radius:18px;
  color:white;
  text-align:center;
  font-weight:900;
  outline:none;
  box-shadow:inset 0 0 18px rgba(37,239,63,.30);
  font-size:50px;
  padding:8px 12px;
  letter-spacing:5px;
  cursor:pointer;
}

.name-input{
  font-size:42px;
  letter-spacing:1px;
}

.submit-btn,
.back-btn{
  display:block;
  width:100%;
  border:0;
  border-radius:18px;
  background:linear-gradient(180deg,#45fa4b,#12c832);
  color:#000;
  font-weight:900;
  font-size:26px;
  padding:16px 30px;
  margin-top:22px;
  cursor:pointer;
  box-shadow:0 0 20px rgba(37,239,63,.50);
}

.back-btn{
  background:#111;
  color:var(--green);
  border:3px solid var(--green);
}

.small-note{
  margin-top:12px;
  color:#e8e8e8;
  font-size:17px;
}

h2{
  font-size:44px;
  color:var(--green);
  margin:0 0 10px;
}

.screen-text{
  font-size:23px;
  margin:8px;
}

.visit-counter{
  font-size:82px;
  font-weight:900;
  color:var(--green);
  text-shadow:0 0 24px rgba(37,239,63,.65);
}

.free-text{
  font-size:56px;
  font-weight:900;
  color:var(--green);
  text-shadow:0 0 24px var(--green);
}

.address{
  border:2px solid var(--green);
  background:rgba(0,0,0,.76);
  border-radius:16px;
  padding:10px 14px;
  text-align:center;
  font-size:17px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.hidden{
  display:none !important;
}

/* Touch keyboard - old design, fixed for WebView */
/* Full-screen backdrop: swallows accidental taps outside the keys
   so the keyboard only closes via SUBMIT / REGISTER / CANCEL */
.keyboard-wrap{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  left:0;
  width:100%;
  height:100%;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.55);
  z-index:99999;
  touch-action:manipulation;
}

.keyboard-wrap.active{
  display:flex;
}

.keyboard-panel{
  width:860px;            /* fallback for old Android WebView */
  width:min(860px,97vw);
  max-width:97vw;
  max-height:96vh;
  overflow:hidden;
  padding:20px;
  background:rgba(0,0,0,.97);
  border:4px solid var(--green);
  border-radius:24px;
  box-shadow:0 0 70px rgba(37,239,63,.70);
}

.keyboard-display{
  min-height:68px;
  border:3px solid var(--green);
  border-radius:16px;
  background:#050505;
  color:#fff;
  font-size:42px;
  font-weight:900;
  letter-spacing:.12em;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 0 24px rgba(37,239,63,.24),0 0 20px rgba(37,239,63,.22);
  margin-bottom:12px;
  text-align:center;
  overflow:hidden;
  white-space:nowrap;
}

.key-grid{
  display:grid;
  gap:14px;
}

.key-grid-num{
  grid-template-columns:repeat(3,1fr);
}

.key-grid-abc{
  grid-template-columns:repeat(10,minmax(0,1fr));
  gap:12px;
}

/* Letters keyboard needs the wide panel */
.keyboard-panel:has(.key-grid-abc:not(.hidden)),
.keyboard-wrap.abc-mode .keyboard-panel{
  width:1240px;           /* fallback for old Android WebView */
  width:min(1240px,98vw);
  max-width:98vw;
}

.key{
  min-height:82px;
  border:3px solid var(--green);
  border-radius:16px;
  background:#101010;
  color:#fff;
  font-size:40px;
  font-weight:900;
  box-shadow:inset 0 0 16px rgba(37,239,63,.20);
  cursor:pointer;
  white-space:nowrap;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}

.key.pressed{
  transform:scale(.95);
  background:#1d3a22;
}

.key:active,
.submit-btn:active,
.back-btn:active{
  transform:scale(.97);
}

.key.action{
  background:var(--green);
  color:#000;
}

.key.cancel{
  background:var(--green);
  color:#000;
}

.key.wide{
  grid-column:span 3;
  min-height:74px;
  font-size:28px;
}

.key.space{
  grid-column:span 3;
}

.key-grid-abc .key{
  min-width:0;
  min-height:74px;
  font-size:32px;
  padding:4px;
  border-radius:14px;
}

.key-grid-abc .span2{
  grid-column:span 4;
}

.key-grid-abc .span5{
  grid-column:span 5;
  min-height:72px;
  font-size:26px;
  letter-spacing:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Bottom buttons (Appointments / Charge) */
.bottom-actions{
  display:flex;
  justify-content:center;
  gap:20px;
}

.bottom-btn{
  border:0;
  border-radius:16px;
  background:linear-gradient(180deg,#45fa4b,#12c832);
  color:#000;
  font-weight:900;
  font-size:22px;
  padding:14px 34px;
  cursor:pointer;
  box-shadow:0 0 18px rgba(37,239,63,.5);
  touch-action:manipulation;
}

.bottom-btn:active{
  transform:scale(.97);
}

/* Charge modal (same full-screen layer as the keyboard) */
.pay-panel{
  width:560px;
  width:min(560px,96vw);
  max-width:96vw;
  text-align:center;
}

.pay-title{
  color:var(--green);
  font-size:30px;
  margin:0 0 8px;
}

.pay-lines{
  border:2px solid var(--green);
  border-radius:14px;
  background:#050505;
  padding:10px 16px;
  margin-bottom:12px;
  text-align:left;
}

.pay-line{
  font-size:22px;
  font-weight:900;
  display:flex;
  justify-content:space-between;
  padding:2px 0;
}

.pay-total{
  color:var(--green);
  font-size:30px;
  border-top:2px solid #143a19;
  margin-top:4px;
  padding-top:6px;
}

.pay-pad .key{
  min-height:68px;
  font-size:32px;
}

.pay-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.pay-btn{
  border:0;
  border-radius:14px;
  background:linear-gradient(180deg,#45fa4b,#12c832);
  color:#000;
  font-weight:900;
  font-size:20px;
  padding:14px 10px;
  cursor:pointer;
  touch-action:manipulation;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pay-btn.alt{
  background:#111;
  color:var(--green);
  border:3px solid var(--green);
}

.pay-btn.cancel{
  background:#111;
  color:#ff5a5a;
  border:3px solid #ff5a5a;
}

#cardBox{
  margin-top:12px;
}

#card-container{
  background:#fff;
  border-radius:12px;
  padding:8px;
  min-height:86px;
}

#cardBox .pay-btn{
  width:100%;
  margin-top:10px;
}

.pay-status{
  min-height:26px;
  margin-top:10px;
  font-weight:900;
  font-size:19px;
}

.pay-status.ok{color:var(--green);}
.pay-status.err{color:#ff5a5a;}

/* Diagnostics */
.diagnostic{
  position:fixed;
  right:20px;
  bottom:20px;
  width:420px;
  background:#050505;
  color:#fff;
  border:3px solid var(--green);
  border-radius:16px;
  padding:18px;
  z-index:100000;
  box-shadow:0 0 40px rgba(37,239,63,.55);
}

.diagnostic h3{
  margin:0 0 10px;
  color:var(--green);
  font-size:24px;
}

.diagnostic pre{
  font-size:16px;
  line-height:1.35;
  white-space:pre-wrap;
}

.diagnostic button{
  width:100%;
  padding:12px;
  font-weight:900;
  background:var(--green);
  border:0;
  border-radius:10px;
}
