/* ================= BASE ================= */
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto;
  padding:8px;
  margin:0;
  background:#f4f6fb;
  color:#222;
}

h2{
  text-align:center;
  margin:6px 0 8px;
  font-size:18px;
  font-weight:600;
}

/* ================= CONTROLS ================= */
.controls{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:420px;
  margin:0 auto 8px;
}

.controls input{
  flex:1;
  height:36px;
  padding:6px 8px;
  font-size:14px;
  border:1px solid #ccc;
  border-radius:4px;
}

.controls button{
  width:96px;
  height:36px;
  font-size:14px;
  background:#243c8f;
  color:#fff;
  border:none;
  border-radius:4px;
  cursor:pointer;
}

.controls button:active{
  transform:scale(0.97);
}

/* ================= INFO ================= */
#info{
  margin:6px 0;
  font-weight:600;
  text-align:center;
  font-size:13px;
}

/* ================= TABLE ================= */
table{
  width:100%;
  border-collapse:collapse;
  margin-top:4px;
  font-size:12px;
  background:#fff;
}

th, td{
  border:1px solid #ccc;
  padding:4px 5px;
  text-align:center;
  line-height:1.2;
  white-space:nowrap;
}

th{
  background:#243c8f;
  color:#fff;
  font-weight:600;
}

/* ================= MOBILE TUNING ================= */
@media (max-width:480px){

  h2{
    font-size:16px;
  }

  .controls{
    gap:6px;
  }

  .controls input{
    font-size:13px;
  }

  .controls button{
    width:80px;
    font-size:13px;
  }

  table{
    font-size:13px;
  }

  th, td{
     padding:5px 6px;     /* ⬆ more row height */
    line-height:1.35;   /* ⬆ better readability */
  }
}
/* ===== LOADING SPINNER ===== */
.loader{
  width:16px;
  height:16px;
  border:3px solid #fff;
  border-top:3px solid transparent;
  border-radius:50%;
  animation:spin 0.8s linear infinite;
  display:inline-block;
  vertical-align:middle;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}

button.loading{
  pointer-events:none;
  opacity:0.85;
}

.loading-row{
  font-weight:600;
  color:#555;
}
