/* Polat UI v2 (single-file HTML + external CSS) */
:root{
  --bg:#07131c;
  --bg2:#061018;
  --card:#0b1f2c;
  --card2:#0e2636;
  --text:#e9f1f7;
  --muted:#9bb0bf;
  --line: rgba(255,255,255,.09);
  --line2: rgba(255,255,255,.06);
  --primary:#2aa8ff;
  --danger:#ff5a66;
  --ok:#5ee7a2;
  --shadow: 0 16px 55px rgba(0,0,0,.45);
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 900px at 35% -10%, #123a53 0%, var(--bg) 55%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}

a{ color:inherit; text-decoration:none; }
.wrap{ max-width:1280px; margin:0 auto; padding:18px; }

.top{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.top h1{ margin:0; font-size:18px; font-weight:900; letter-spacing:.2px; }
.muted{ color:var(--muted); font-size:12px; }

.grid{ display:grid; gap:14px; margin-top:14px; }

.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.02) 100%), var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.mh{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  flex-wrap:wrap;
}
.mh h2{ margin:0; font-size:16px; font-weight:900; }
.mh .muted{ margin-top:4px; }

.row, .row3, .row4{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}

input, select, textarea{
  border:1px solid var(--line);
  background: rgba(0,0,0,.20);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  outline:none;
}
textarea{ min-height:90px; resize:vertical; }

.btn, .btn2, .btnD, .btn-ghost{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(19,53,72,.95) 0%, rgba(15,45,63,.95) 100%);
  color:var(--text);
  padding:10px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:800;
}
.btn-ghost{
  background: rgba(0,0,0,.16);
}
.btn2{
  background: linear-gradient(180deg, rgba(42,168,255,.18) 0%, rgba(42,168,255,.10) 100%);
  border-color: rgba(42,168,255,.25);
}
.btnD{
  background: linear-gradient(180deg, rgba(255,90,102,.22) 0%, rgba(255,90,102,.10) 100%);
  border-color: rgba(255,90,102,.25);
}
.btn:disabled, .btn2:disabled, .btnD:disabled{
  opacity:.55; cursor:not-allowed;
}

.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.16);
  font-size:12px;
  font-weight:900;
}
.pill.ok{ border-color: rgba(94,231,162,.25); }
.pill.bad{ border-color: rgba(255,90,102,.25); }

.scroll{ overflow:auto; }
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:1020px;
}
th, td{
  padding:14px 14px;
  border-bottom:1px solid var(--line2);
  vertical-align:middle;
}
th{
  color:var(--muted);
  font-size:12px;
  text-align:left;
  position:sticky; top:0;
  background: rgba(10,25,35,.92);
  backdrop-filter: blur(8px);
  z-index:1;
}

.thumb{
  width:54px; height:54px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}
.thumb img{ width:100%; height:100%; object-fit:cover; }

.mb{ padding:12px 16px; border-top:1px solid var(--line); background: rgba(0,0,0,.12); }
.mf{ padding:12px 16px; border-top:1px solid var(--line); background: rgba(0,0,0,.08); display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }

.money{ font-weight:950; }
.money.neg{ color: var(--danger); }
.money.pos{ color: var(--ok); }

.modalBg, .modal__backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  z-index:50;
}
.modal, .modal__card{
  width: min(860px, 100%);
  border:1px solid var(--line);
  border-radius:20px;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%), var(--card2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal .mh, .modal__card .mh{ border-bottom:1px solid var(--line); }
.modal .mb, .modal__card .mb{ border-top:none; background: transparent; padding:14px 16px; }
.modal .mf, .modal__card .mf{ background: transparent; }

@media (max-width: 980px){
  table{ min-width: 860px; }
}
@media (max-width: 520px){
  .wrap{ padding:12px; }
  .top{ padding:12px; }
  .thumb{ width:46px; height:46px; border-radius:14px; }
  table{ min-width: 820px; }
}
