:root {
  --bg0: #0b1220;
  --bg1: #0f1a31;
  --card: #0f1a2a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eefc;
  --muted: rgba(232, 238, 252, 0.68);
  --primary: #5aa0ff;
  --danger: #ff5a7b;
  --success: #4be1a8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --glow1: rgba(90, 160, 255, 0.2);
  --glow2: rgba(75, 225, 168, 0.1);
  --glow3: rgba(160, 90, 255, 0.15);
  --sel-bg: #0b1220;
  --sel-fg: #e8eefc;
  --radius: 18px;
  --radius2: 12px;
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --sans:
    ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: linear-gradient(160deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(1000px 700px at 10% 0%, var(--glow1), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, var(--glow2), transparent 55%),
    radial-gradient(1200px 800px at 50% 100%, var(--glow3), transparent 60%);
  z-index: -1;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 18px 70px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 600px) {
  .top {
    flex-direction: column;
    align-items: stretch;
  }
  .brand h1 {
    justify-content: center;
  }
  .lang {
    width: 100%;
  }
  .langbtn {
    width: 100%;
    min-width: 0;
  }
  .wrap {
    padding: 24px 16px 40px;
  }
}
.announce {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(40, 168, 234, 0.2),
    rgba(40, 168, 234, 0.1)
  );
  border: 1px solid rgba(40, 168, 234, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  animation: announceFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.announce:hover {
  background: linear-gradient(
    90deg,
    rgba(40, 168, 234, 0.3),
    rgba(40, 168, 234, 0.15)
  );
  border-color: rgba(40, 168, 234, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(40, 168, 234, 0.15);
}
@keyframes announceFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.announce .ico {
  color: #28a8ea; /* Telegram blue-ish */
}
.announce .ico:last-child {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
}
.ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.brand h1 .ico {
  margin-right: 10px;
  opacity: 0.95;
}
.card .hd h2 .ico {
  margin-right: 10px;
  opacity: 0.95;
}
.btn .ico {
  margin-right: 8px;
}
.flag {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
}
.lang {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
}
.langbtn {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(232, 238, 252, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 190px;
  justify-content: space-between;
}
.langbtntext {
  font-size: 13px;
  letter-spacing: 0.1px;
  flex: 1 1 auto;
  text-align: left;
}
.langpop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.95);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 50;
}
.langsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}
.langsearchico {
  color: rgba(232, 238, 252, 0.72);
}
.langsearchinp {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 10px 10px;
  color: var(--text);
  font-size: 13px;
}
.langlist {
  max-height: 320px;
  overflow: auto;
  padding: 6px;
}
.langitem {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(232, 238, 252, 0.9);
  border-radius: 12px;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.langitem:hover {
  background: rgba(90, 160, 255, 0.1);
  border-color: rgba(90, 160, 255, 0.25);
}
.langname {
  font-size: 13px;
}
.card {
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.015)
  );
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card .hd {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(0, 0, 0, 0)
  );
}
.card .hd h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(232, 238, 252, 0.82);
  display: flex;
  align-items: center;
}
.card .bd {
  padding: 18px;
}
.flash {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 18px;
}
.alert {
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  color: rgba(232, 238, 252, 0.9);
  font-size: 13px;
}
.alert.error {
  border-color: rgba(255, 90, 123, 0.35);
  background: rgba(255, 90, 123, 0.1);
}
.alert.success {
  border-color: rgba(75, 225, 168, 0.35);
  background: rgba(75, 225, 168, 0.1);
}
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.row3 {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
}
@media (max-width: 720px) {
  .row,
  .row3 {
    grid-template-columns: 1fr;
  }
}
label {
  display: block;
  font-size: 12px;
  color: rgba(232, 238, 252, 0.74);
  margin-bottom: 7px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  outline: none;
}
select option,
select optgroup {
  color: var(--sel-fg);
  background-color: var(--sel-bg);
}
.themebtn {
  display: none;
}
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 600px) {
  .controls {
    width: 100%;
  }
  .lang {
    flex: 1;
    width: auto;
  }
}
textarea {
  min-height: 140px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(90, 160, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(90, 160, 255, 0.1);
}
.hint {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(232, 238, 252, 0.55);
}
.btns {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid rgba(90, 160, 255, 0.45);
  background: linear-gradient(
    180deg,
    rgba(90, 160, 255, 0.3),
    rgba(90, 160, 255, 0.12)
  );
  color: rgba(240, 247, 255, 0.96);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn:active {
  transform: translateY(1px);
}
.btn.secondary {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.14);
  color: rgba(232, 238, 252, 0.88);
}
.kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.kpi .box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
  padding: 12px 12px;
}
.kpi .box .t {
  font-size: 12px;
  color: rgba(232, 238, 252, 0.6);
}
.kpi .box .v {
  font-size: 18px;
  margin-top: 6px;
  font-family: var(--mono);
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.1);
}
.table th,
.table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 12px;
  line-height: 1.35;
}
.table th {
  color: rgba(232, 238, 252, 0.72);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}
.table tr:last-child td {
  border-bottom: none;
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: rgba(232, 238, 252, 0.75);
  display: inline-block;
}
.muted {
  color: var(--muted);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.pager .pages {
  font-size: 12px;
  color: rgba(232, 238, 252, 0.65);
}
.note {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
  border-radius: 14px;
  padding: 12px;
  line-height: 1.6;
  font-size: 13px;
  color: rgba(232, 238, 252, 0.86);
}
.sp10 {
  height: 10px;
}
.sp12 {
  height: 12px;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}
.btn.success {
  border-color: rgba(75, 225, 168, 0.45);
  background: linear-gradient(
    180deg,
    rgba(75, 225, 168, 0.2),
    rgba(75, 225, 168, 0.08)
  );
  color: #4be1a8;
}
.btn.danger {
  border-color: rgba(255, 90, 123, 0.45);
  background: linear-gradient(
    180deg,
    rgba(255, 90, 123, 0.2),
    rgba(255, 90, 123, 0.08)
  );
  color: #ff5a7b;
}
.row-completed {
  opacity: 0.6;
  background: rgba(0, 0, 0, 0.25) !important;
}
.kpi-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.action-form {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 4px;
}
.btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}
.td-nowrap {
  white-space: nowrap;
}
