/* CricLive admin panel — app ki hi "Paper" theme, taaki dono ek parivaar lagein. */

:root {
  --paper:   #F7F5F0;
  --surface: #FFFFFF;
  --alt:     #EFEDE6;
  --border:  #E5E1D8;
  --ink:     #16211B;
  --soft:    #7C8580;
  --red:     #CE1A26;
  --red-dim: #FBEAEA;
  --green:   #1F6B45;
  --green-dim: #E7F0EA;
  --amber:   #B4741A;
  --amber-dim: #FAF0DF;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(22,33,27,.04), 0 6px 20px rgba(22,33,27,.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- shell ---------- */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 58px;
  flex-wrap: wrap;
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand span { color: var(--red); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.nav a:hover { background: var(--alt); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--red-dim); color: var(--red); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 26px 20px 70px; }

h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
h2 { font-size: 16px; font-weight: 750; margin-bottom: 12px; }
.sub { color: var(--soft); font-size: 14px; margin-bottom: 24px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.grid { display: grid; gap: 14px; margin-bottom: 22px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 17px 18px; box-shadow: var(--shadow); }
.stat-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.stat-v { font-size: 27px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-note { font-size: 12px; color: var(--soft); margin-top: 3px; }

/* API meter */
.meter { height: 8px; background: var(--alt); border-radius: 5px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.meter.warn i { background: var(--amber); }
.meter.hot  i { background: var(--red); }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--soft); font-weight: 400; margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%;
  font: 14px var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.55; resize: vertical; }

.field { margin-bottom: 18px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }

.check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 16px; }
.check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--red); flex: 0 0 auto; }
.check label { margin: 0; }

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 22px;
  font: 650 14px var(--sans);
  cursor: pointer;
}
.btn:hover { opacity: .9; text-decoration: none; }
.btn-soft { background: var(--alt); color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

/* ---------- messages ---------- */
.msg { border-radius: 10px; padding: 13px 16px; margin-bottom: 20px; font-size: 14px; }
.msg-ok  { background: var(--green-dim); color: var(--green); border: 1px solid #CFE3D7; }
.msg-bad { background: var(--red-dim); color: var(--red); border: 1px solid #F2D3D3; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
th { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); background: var(--alt); }
tbody tr:last-child td { border-bottom: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- pills / tabs ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.pills a {
  font-size: 13px;
  font-weight: 650;
  color: var(--soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 15px;
  text-decoration: none;
}
.pills a:hover { text-decoration: none; border-color: var(--soft); }
.pills a.on { background: var(--red-dim); border-color: var(--red); color: var(--red); }

.tag { display: inline-block; font: 700 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; }
.tag-live { background: var(--red); color: #fff; }
.tag-up   { background: var(--alt); color: var(--soft); }
.tag-done { background: var(--green-dim); color: var(--green); }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 11vh auto; padding: 0 20px; }
.login .brand { font-size: 30px; text-align: center; margin-bottom: 6px; }
.login .sub { text-align: center; }
