:root {
  --g: #00ae4c; --g2: #00913f; --g3: #e7f7ee; --ink: #15211a; --mut: #6b7a71; --line: #e3e9e5;
  --bg: #f3f6f4; --red: #d63a3a; --red2: #fdeeee; --amb: #b7791f; --amb2: #fff6e0; --r: 14px;
}
* { box-sizing: border-box }
html, body { margin: 0 }
body { font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--bg); color: var(--ink) }
a { color: var(--g2) }
button, input, select, textarea { font: inherit; color: inherit }

/* --- yuqori panel --- */
.top { background: var(--g); color: #fff; box-shadow: 0 2px 10px rgba(0,80,30,.18); position: sticky; top: 0; z-index: 20 }
.top .in { max-width: 1320px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none }
.brand img { height: 40px; display: block }
.brand b { font-size: 17px; font-weight: 700; letter-spacing: .2px; border-left: 1px solid rgba(255,255,255,.4); padding-left: 12px }
.nav { display: flex; gap: 4px; flex-wrap: wrap }
.nav a { color: #fff; text-decoration: none; padding: 8px 13px; border-radius: 10px; font-weight: 600; opacity: .9 }
.nav a:hover { background: rgba(255,255,255,.14); opacity: 1 }
.nav a.on { background: #fff; color: var(--g2); opacity: 1 }
.pills { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap }
.pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(0,0,0,.16); color: #fff; padding: 6px 12px;
  border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: #ffb4b4; box-shadow: 0 0 0 3px rgba(255,180,180,.25) }
.pill.ok i { background: #b9ffd4; box-shadow: 0 0 0 3px rgba(185,255,212,.3) }
.pill.bad { background: var(--red) }

.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 18px 60px }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03) }
.card h2 { margin: 0 0 14px; font-size: 18px }
.card h2 small { color: var(--mut); font-weight: 500; font-size: 14px }
.grid { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr } .pills { margin-left: 0 } }
.sticky { position: sticky; top: 84px }

/* --- forma --- */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 14px }
.f { margin-bottom: 16px }
.inp { width: 100%; padding: 12px 14px; border: 1.5px solid #cfdad3; border-radius: 12px; background: #fff; outline: none; transition: .15s }
.inp:focus { border-color: var(--g); box-shadow: 0 0 0 4px rgba(0,174,76,.14) }
.inp.big { font-size: 21px; padding: 14px 16px; font-weight: 600 }
.inp.err { border-color: var(--red); box-shadow: 0 0 0 4px rgba(214,58,58,.1) }
.ph { display: flex }
.ph span { display: flex; align-items: center; padding: 0 14px; background: var(--g3); border: 1.5px solid #cfdad3; border-right: 0;
  border-radius: 12px 0 0 12px; font-size: 21px; font-weight: 700; color: var(--g2) }
.ph .inp { border-radius: 0 12px 12px 0 }
.e { color: var(--red); font-size: 13px; margin-top: 5px; min-height: 0 }
.hint { color: var(--mut); font-size: 13px; margin-top: 5px }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 18px;
  font-weight: 700; cursor: pointer; background: var(--g); color: #fff; text-decoration: none; transition: .15s; white-space: nowrap }
.btn:hover { background: var(--g2) }
.btn:disabled { opacity: .6; cursor: default }
.btn.big { width: 100%; padding: 16px; font-size: 18px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,174,76,.28) }
.btn.w { background: #fff; color: var(--ink); border: 1.5px solid var(--line) }
.btn.w:hover { background: #f4f7f5; border-color: #cfdad3 }
.btn.red { background: var(--red) }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }

.next { display: flex; justify-content: space-between; align-items: center; background: var(--g3); border-radius: 12px; padding: 10px 14px;
  margin-bottom: 18px; color: var(--g2); font-weight: 600 }
.next b { font-size: 26px; font-weight: 800 }
.done { margin-top: 16px; border-radius: 14px; background: linear-gradient(135deg, #00ae4c, #00913f); color: #fff; padding: 16px 18px;
  display: none; align-items: center; gap: 16px; animation: pop .35s ease }
.done.show { display: flex }
.done .n { font-size: 46px; font-weight: 900; line-height: 1; min-width: 64px; text-align: center; background: rgba(255,255,255,.16);
  border-radius: 12px; padding: 8px 12px }
.done .t b { display: block; font-size: 18px }
.done .t span { opacity: .9; font-size: 14px }
@keyframes pop { from { transform: scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px }
.stat { background: #f7faf8; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px }
.stat b { display: block; font-size: 22px; font-weight: 800 }
.stat span { color: var(--mut); font-size: 12px; font-weight: 600 }

/* --- jadval --- */
.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap }
.tools .inp { flex: 1; min-width: 200px; padding: 10px 14px }
.tw { overflow-x: auto; margin: 0 -20px; padding: 0 20px }
table { width: 100%; border-collapse: collapse }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--mut); font-weight: 700;
  padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap }
td { padding: 10px; border-bottom: 1px solid #eef2ef; vertical-align: middle }
tr.new td { animation: flash 2.5s ease }
@keyframes flash { 0% { background: #c9f2da } 100% { background: transparent } }
td.num { font-size: 20px; font-weight: 800; width: 64px }
td.num a { color: var(--ink); text-decoration: none; border-bottom: 2px dotted #b8c7bd }
td.nm { font-weight: 600; font-size: 16px }
td.ph2 { white-space: nowrap; font-variant-numeric: tabular-nums }
td.tm { color: var(--mut); white-space: nowrap }
td.act { white-space: nowrap; text-align: right }
.ic { border: 0; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 8px; color: var(--mut); font-size: 15px }
.ic:hover { background: #eef3f0; color: var(--ink) }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap }
.tag.tg { background: #e6f3fc; color: #1d7fbf }
.tag.web { background: #eef0f3; color: #4f5b66 }
.tag.ok { background: var(--g3); color: var(--g2) }
.tag.wait { background: var(--amb2); color: var(--amb) }
.tag.err { background: var(--red2); color: var(--red) }
.tag.dup { background: #fff1e6; color: #c25a00; margin-left: 6px }
.empty { text-align: center; color: var(--mut); padding: 50px 10px }
.empty b { display: block; font-size: 40px; margin-bottom: 6px }

/* --- toast, modal --- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60 }
.toast { background: #1d2a22; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-weight: 600; max-width: 360px; animation: pop .25s ease }
.toast.err { background: var(--red) }
.modal { position: fixed; inset: 0; background: rgba(10,25,15,.45); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px }
.modal.show { display: flex }
.modal .box { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25) }
.modal .box.rc { max-width: 380px; text-align: center }
.modal .box.rc img { width: 100%; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.1) }
.modal h3 { margin: 0 0 14px }

/* --- sozlamalar --- */
.cols { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr } }
.stack > * + * { margin-top: 20px }
.msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600 }
.msg.ok { background: var(--g3); color: var(--g2) }
.msg.bad { background: var(--red2); color: var(--red) }
.preview { background: #e9edea; border-radius: var(--r); padding: 18px; text-align: center }
.preview img { width: 100%; max-width: 320px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); border-radius: 4px }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 600 }
.chk input { width: 18px; height: 18px; accent-color: var(--g) }
.key { font-family: Consolas, monospace; background: #f4f7f5; border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; word-break: break-all }
.status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 14px }
.status.ok { background: var(--g3); color: var(--g2) }
.status.bad { background: var(--red2); color: var(--red) }
.status.wait { background: var(--amb2); color: var(--amb) }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 }
.steps li { counter-increment: s; position: relative; padding: 2px 0 16px 46px }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--g);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center }
.steps li b { display: block }
.dl { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, #00ae4c, #00913f); color: #fff; border-radius: 16px;
  padding: 20px 22px; margin-bottom: 20px; flex-wrap: wrap }
.dl .btn { background: #fff; color: var(--g2); font-size: 17px; padding: 14px 22px }
.dl p { margin: 4px 0 0; opacity: .9 }
table.mini td, table.mini th { padding: 7px 8px; font-size: 14px }

/* --- kirish --- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--g); padding: 20px }
.login .card { width: 100%; max-width: 380px; padding: 28px }
.login .logo { background: var(--g); border-radius: 14px; padding: 18px; text-align: center; margin: -8px -8px 22px }
.login .logo img { height: 80px }

/* --- kichik ekranlar --- */
.grid > *, .cols > * { min-width: 0 }
@media (max-width: 980px) {
  .grid, .cols { grid-template-columns: minmax(0, 1fr) }
  .sticky { position: static }
  .top { position: static }
}
@media (max-width: 600px) {
  .top .in { gap: 10px; padding: 10px 12px }
  .brand img { height: 32px }
  .brand b { font-size: 15px }
  .nav a { padding: 6px 9px; font-size: 14px }
  .wrap { padding: 12px 10px 50px }
  .card { padding: 16px }
  .tw { margin: 0 -16px; padding: 0 16px }
  .stats { grid-template-columns: repeat(2, 1fr) }
  .btn.big { font-size: 16px }
  td.act .btn { padding: 7px 9px }
  td.act .btn span { display: none }
}
.done.dup { background: linear-gradient(135deg, #d88a12, #b7701b) }

.pill.warn { background: #f0a020; color: #fff }
.pill.warn i { background: #fff3c4; box-shadow: 0 0 0 3px rgba(255,243,196,.35) }
.req { background: #fff8e6; border: 1.5px solid #f3d08a; border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; color: #6b4b00 }
.req-row { display: flex; align-items: center; gap: 10px; padding: 8px 0 0; flex-wrap: wrap }
.req-row span { flex: 1; min-width: 180px; color: var(--ink) }
