:root{
  --ylp:#0a2063;
  --ylp2:#061134;
  --ylp3:#4c5d9a;
  --bg:#f5f7fb;
  --card:#ffffff;
  --line:#e6e9f2;
  --muted:#6b7280;
  --ok:#067d2b;
  --err:#b00020;
  --shadow:0 14px 28px rgba(10,32,99,.10);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:#111827;
}
.hidden{display:none !important}
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:linear-gradient(135deg,var(--ylp),var(--ylp2));
  color:#fff;
  box-shadow:0 10px 22px rgba(0,0,0,.14);
}
.topbar .wrap{
  max-width:1100px;
  margin:0 auto;
  padding:14px;
  display:flex;
  align-items:center;
  gap:12px;
}
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.logoWrap{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 10px 18px rgba(0,0,0,.18);
}
.logoWrap img{height:32px;width:auto;display:block}
.brand .title{min-width:0}
.brand .title .h{font-size:15px;font-weight:700;line-height:1.1}
.brand .title .s{font-size:12px;opacity:.88;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill{
  margin-left:auto;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.25);
}
.main{max-width:1100px;margin:0 auto;padding:14px 14px 72px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}
.hero{background:linear-gradient(180deg,#ffffff,#fbfcff)}
.kicker{
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-weight:700;
  font-size:12px;
  color:var(--ylp);
  background:#eef3ff;
  border:1px solid #dae4ff;
  padding:6px 10px;
  border-radius:999px;
}
.kicker.small{font-size:11px;padding:5px 9px}
.h1{margin:12px 0 6px;font-size:22px;font-weight:800;color:#0b163a}
.p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.sectionHeader{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;margin-bottom:12px}
.sectionHeader h2{margin:0;font-size:16px;color:var(--ylp)}
.sectionHeader p{margin:0;font-size:12px;color:var(--muted);max-width:520px;line-height:1.45}
label{display:block;font-size:12px;color:#111827;opacity:.85;margin:10px 0 6px;font-weight:600}
input,select,textarea{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  padding:12px;
  font-size:15px;
  background:#fff;
  outline:none;
  font-family:inherit;
}
input:focus,select:focus,textarea:focus{
  border-color:#cbd5ff;
  box-shadow:0 0 0 4px rgba(10,32,99,.08);
}
textarea{resize:vertical;min-height:120px}
.bigText{min-height:150px}
.grid2x2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.grid1{display:grid;grid-template-columns:1fr;gap:12px}
@media (max-width:760px){
  .grid2x2,.grid3{grid-template-columns:1fr}
  .topbar .wrap{align-items:flex-start;flex-wrap:wrap}
  .pill{margin-left:0}
}
.btnRow{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.noTopMargin{margin-top:0}
.btn{
  border:0;
  border-radius:14px;
  padding:12px 14px;
  font-weight:800;
  cursor:pointer;
  font-size:14px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.btn-primary{background:var(--ylp);color:#fff}
.btn-ghost{background:#eef3ff;color:var(--ylp);border:1px solid #dae4ff}
.btn-link{background:transparent;color:var(--ylp);padding:0;font-weight:800}
.btn-block{width:100%}
.btn[disabled]{opacity:.65;cursor:not-allowed}
.muted{font-size:12px;color:var(--muted);line-height:1.45}
.chipRow,.feedInfoRow{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.miniChip{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  background:#f7f9ff;
  border:1px solid var(--line);
  color:#334155;
}
.servicesGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
@media (max-width:760px){.servicesGrid{grid-template-columns:1fr}}
.serviceCard{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:linear-gradient(180deg,#fff,#fbfcff);
  box-shadow:0 8px 16px rgba(10,32,99,.05);
}
.serviceCard.isActive{border-color:#b8c7ff;box-shadow:0 12px 22px rgba(10,32,99,.12)}
.serviceHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.serviceId{font-size:16px;font-weight:800;color:#0b163a}
.serviceDatetime{font-size:12px;color:var(--muted);margin-top:3px}
.serviceBadge{
  font-size:11px;
  font-weight:800;
  padding:6px 9px;
  border-radius:999px;
  background:#eef3ff;
  color:var(--ylp);
  border:1px solid #dae4ff;
}
.serviceAddress{font-size:14px;font-weight:600;line-height:1.45;color:#111827;margin-bottom:10px}
.serviceMetaList{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.serviceMetaList span{background:#f8fafc;border:1px solid var(--line);padding:6px 9px;border-radius:999px}
.serviceActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
@media (max-width:520px){.serviceActions{grid-template-columns:1fr}}
.serviceEmpty{
  border:1px dashed #cbd5e1;
  border-radius:18px;
  background:#fcfdff;
  padding:24px;
  text-align:center;
}
.serviceEmptyIcon{font-size:34px;margin-bottom:8px}
.serviceEmpty h3{margin:0 0 8px;color:#0b163a}
.serviceEmpty p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.currentServiceCard{background:linear-gradient(180deg,#fff,#f8fbff)}
.currentServiceMain{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.currentServiceTitle{font-size:24px;font-weight:800;color:#0b163a;margin-top:8px}
.currentServiceMeta{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.45}
.tableWrap{overflow:auto}
.materialTable{width:100%;border-collapse:collapse;min-width:760px}
.materialTable thead{background:#f3f6ff}
.materialTable th,.materialTable td{padding:10px;border-bottom:1px solid #eceff6;text-align:left;vertical-align:middle}
.materialTable th{font-size:12px;text-transform:uppercase;color:var(--muted)}
.materialTable tbody tr:hover{background:#f8faff}
.imgbox{
  width:54px;
  height:54px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fafafa;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.imgbox img{width:100%;height:100%;object-fit:contain;display:none}
.imgph{font-size:18px;color:#9ca3af;user-select:none}
.iconBtn{
  width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:20px;line-height:1;
}
.iconBtn.danger{color:var(--err);background:#fff4f5}
.photoGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
@media (max-width:760px){.photoGrid{grid-template-columns:1fr}}
.photoCard{border:1px solid var(--line);border-radius:18px;padding:12px;background:#fbfcff}
.photoCard img{width:100%;height:220px;object-fit:cover;border-radius:14px;border:1px solid var(--line);background:#fff}
.photoMeta{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:8px;font-size:12px;color:var(--muted)}
.signatureWrap{
  width:100%;
  min-height:210px;
  border-radius:16px;
  border:1px dashed #c7d2fe;
  background:linear-gradient(180deg,#fff,#f8faff);
  overflow:hidden;
}
#signatureCanvas{width:100%;height:210px;display:block;touch-action:none;background:transparent}
.summaryGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:760px){.summaryGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.statCard{border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px}
.statLabel{font-size:12px;color:var(--muted);margin-bottom:6px}
.statValue{font-size:24px;font-weight:800;color:#0b163a;line-height:1.1}
.statValue.small{font-size:16px}
.toast{
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-size:13px;
}
.toast.ok{border-color:rgba(6,125,43,.25);background:rgba(6,125,43,.06);color:var(--ok);font-weight:700}
.toast.err{border-color:rgba(176,0,32,.25);background:rgba(176,0,32,.06);color:var(--err);font-weight:700}
.stickyActions{
  position:sticky;
  bottom:10px;
  background:rgba(255,255,255,.96);
  border-top:1px solid var(--line);
  padding-top:12px;
  backdrop-filter:blur(6px);
}
.summaryCard{margin-bottom:18px}
.successIcon{
  width:78px;height:78px;border-radius:999px;display:flex;align-items:center;justify-content:center;
  background:rgba(6,125,43,.12);color:var(--ok);font-size:36px;font-weight:800;margin:0 auto 14px;
}
#successCard{text-align:center}
.successText{max-width:620px;margin:0 auto;color:var(--muted);line-height:1.55}
.center{justify-content:center}

#pendingSourceLabel:empty{display:none}
