/* app.css — shared UI base (Style B) */

:root{
  --bg:#111;
  --panel:#1b1b1b;
  --panel2:#151515;
  --border:#2a2a2a;
  --text:#eee;
  --muted:rgba(255,255,255,.78);
  --link:#7fb3ff;
  --ok:#72f7a3;
  --bad:#ff6b6b;
  --warn:#ffd166;
  --btn:#2a72ff;
  --btn2:#3a3a3a;
  --btnDanger:#b13a3a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  margin:0;
}

a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}

header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  background:var(--panel);
  border-bottom:1px solid var(--border);
}
header .small{opacity:.85;font-size:.92em}

.wrap,.container{
  max-width:1200px;
  margin:0 auto;
  padding:16px;
}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  margin:14px 0;
}

.small{opacity:.85;font-size:.92em}
.ok{color:var(--ok)}
.bad{color:var(--bad)}
.warn{color:var(--warn)}

.pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:.8em;
  border:1px solid #333;
  background:rgba(0,0,0,.12);
}

label{display:block;margin:10px 0 6px;font-weight:650}
.help{display:block;margin-top:6px;color:var(--muted);font-size:.9em;line-height:1.35}

input,select,textarea{
  width:100%;
  max-width:100%;
  background:#101010;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
}
input[type="checkbox"]{width:auto}

button,.btn{
  background:var(--btn);
  border:0;
  color:white;
  border-radius:10px;
  padding:10px 14px;
  font-weight:750;
  cursor:pointer;
}
button:hover,.btn:hover{filter:brightness(1.06)}
button[disabled],.btn[disabled]{opacity:.45;cursor:not-allowed}

.btnsm{padding:6px 10px;border-radius:10px;font-weight:750}
.gray{background:var(--btn2)}
.red{background:var(--btnDanger)}

.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
@media (max-width:980px){
  .row2,.row3{grid-template-columns:1fr}
  header{flex-wrap:wrap;gap:10px}
}

table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  table-layout:fixed; /* helps prevent overflow */
}
th,td{
  padding:10px 8px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
  overflow-wrap:anywhere;
}
th{font-weight:800;color:rgba(255,255,255,.9)}

.table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--border);
  border-radius:12px;
  padding:4px;
  background:var(--panel2);
}
.table-wrap table{margin-top:0}

code,kbd,pre{
  background:#0e0e0e;
  border:1px solid var(--border);
  border-radius:10px;
  padding:2px 6px;
}

hr{
  border:0;
  border-top:1px solid var(--border);
  margin:14px 0;
}

/* switch */
.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  vertical-align: middle;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #444;
  border-radius: 999px;
  transition: 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.slider:before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.switch input:checked + .slider {
  background: #1f6feb;
}
.switch input:checked + .slider:before {
  transform: translateX(24px);
}
.toggle-help {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 10px;
}
