:root{
  --brand:#ffa500;
  --brand-dark:#ffcb6b;
  --text:#111827;
  --muted:#6b7280;
  --stroke:rgba(17,24,39,.08);
  --bg1:#fff6e3;
  --bg2:#fffaf1;
  --card:rgba(255,255,255,.92);
  --shadow:0 18px 45px rgba(17,24,39,.12);

  --success:#178a45;
  --danger:#b91c1c;
  --info:#374151;
}

*{ box-sizing:border-box; }

html, body{
  width:100%;
  min-height:100%;
  margin:0;
  color-scheme:light;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 50% 20%, rgba(255,165,0,.16), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

body{
  padding:14px;
}

.hidden{
  display:none !important;
}

.maWrap{
  width:100%;
  max-width:680px;
  min-height:calc(100vh - 28px);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.view{
  width:100%;
}

#pinView{
  width:100%;
}

#dashboardView,
#manualInView,
#manualOutView{
  width:100%;
  align-self:flex-start;
}

.maCard{
  width:100%;
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:20px;
}

.maBrand{
  display:flex;
  justify-content:center;
  margin-bottom:10px;
}

.maBrand img{
  width:240px;
  max-width:100%;
  height:auto;
  object-fit:contain;
}

.maPinTitle{
  margin:8px 0 4px;
  text-align:center;
  font-size:26px;
  font-weight:1000;
}

.maPinSubtitle{
  margin:0;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.maPinDots{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:24px 0 14px;
}

.maDot{
  width:16px;
  height:16px;
  border-radius:999px;
  background:rgba(17,24,39,.12);
}

.maDot.on{
  background:var(--brand);
  box-shadow:0 0 0 4px rgba(255,165,0,.18);
}

.maKeypad{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin-top:10px;
}

.maKey{
  padding:14px 0;
  border-radius:14px;
  text-align:center;
  font-size:16px;
  font-weight:800;
  color:#111827;
  background:#f3f4f6;
  border:1px solid rgba(17,24,39,.08);
  cursor:pointer;
  user-select:none;
  transition:transform .08s ease, background .12s ease, border .12s ease;
}

.maKey:hover{
  background:#fffaee;
  border-color:rgba(255,165,0,.35);
}

.maKey:active{
  transform:scale(.98);
}

.maKey.ok{
  background:var(--brand);
  border-color:rgba(255,165,0,.6);
  color:#fff;
  box-shadow:0 10px 22px rgba(255,165,0,.22);
}

.maFooterNote{
  margin-top:14px;
  padding-top:10px;
  border-top:1px solid rgba(17,24,39,.08);
  text-align:center;
  font-size:11px;
  color:var(--muted);
}

.maHeader{
  display:flex;
  align-items:flex-start;
  gap:15px;
  align-items: center;
  
}

.maTitle3{
  margin: 0;
  font-size:20px;
  font-weight:400;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
}

.maTitle{
  margin:0;
  font-size:30px;
  font-weight:1000;
}

.maSubtitle{
  margin:3px 0 0;
  font-size:13px;
  color:var(--muted);
  font-weight:700;
}

.maDivider{
  height:2px;
  width:100%;
  margin:16px 0 18px;
  border-radius:999px;
  background:var(--brand);
}

.maOfficerBox{
  display:flex;
  align-items:center;
  gap:12px;
}

.maOfficerPhoto{
  width:66px;
  height:66px;
  border-radius:16px;
  object-fit:cover;
  background:#f3f4f6;
}

.maOfficerName{
  font-size:24px;
  font-weight:1000;
  line-height:1.1;
}

.maOfficerId{
  margin-top:4px;
  font-size:15px;
  color:var(--muted);
  font-weight:800;
}

.maActionGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:18px;
}

.maBigActionBtn{
  min-height:72px;
  border-radius:20px;
  border:none;
  background:var(--brand);
  color:#fff;
  font-size:28px;
  font-weight:1000;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(255,165,0,.22);
}

.maBigActionBtn:hover{
  background:var(--brand-dark);
}

.maPanelHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.maSectionTitle{
  margin:0 0 12px;
  font-size:18px;
  font-weight:1000;
}

.no-margin{
  margin:0;
}

.maToolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.maToolbarTitle{
  margin:0;
  font-size:22px;
  font-weight:1000;
}

.maMiniOfficerRow{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.maMiniOfficerPhoto{
  width:46px;
  height:46px;
  border-radius:14px;
  object-fit:cover;
  background:#f3f4f6;
  border:1px solid rgba(0,0,0,.08);
}

.maMiniOfficerName{
  font-size:16px;
  font-weight:1000;
}

.maMiniOfficerId{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.maLabel{
  display:block;
  margin:14px 0 7px;
  font-size:13px;
  font-weight:900;
  color:rgba(0,0,0,.72);
}

.maInput,
.maSelect,
.maTextarea{
  width:100%;
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
  border-radius:16px;
  padding:13px 14px;
  font-size:15px;
  color:var(--text);
  outline:none;
}

.maInput:focus,
.maSelect:focus,
.maTextarea:focus{
  border-color:rgba(255,165,0,.45);
  box-shadow:0 0 0 4px rgba(255,165,0,.10);
}

.maTextarea{
  resize:none;
  min-height:92px;
}

.maFixedBox{
  width:100%;
  border:1px solid rgba(17,24,39,.10);
  background:#f9fafb;
  border-radius:16px;
  padding:13px 14px;
  font-size:15px;
  font-weight:800;
  color:#374151;
}

.maHelper{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  font-weight:800;
}

.maSearchRow{
  display:grid;
  grid-template-columns:1fr 110px;
  gap:10px;
}

.maCardList{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.maInfoCard,
.maResultCard,
.maActiveCard{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  padding:12px;
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.maInfoCard{
  align-items: center;
}

.maGuardThumb{
  width:60px;
  height:60px;
  border-radius:16px;
  object-fit:cover;
  background:#f3f4f6;
  flex-shrink:0;
}

.maInfoMain{
  flex:1;
  min-width:0;
}

.maInfoTitle{
  font-size:15px;
  font-weight:1000;
  line-height:1.25;
}

.maInfoSub{
  margin-top:4px;
  color:#4b5563;
  font-size:13px;
  font-weight:800;
  line-height:1.35;
}

.maMiniTitle{
  margin:0;
  margin-bottom: 7px;
  font-size:14px;
  font-weight:1000;
  color:#2a3140;
}

.maimage img{
  width: 80px;
  height: auto;
}

.maClearBtn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  font-size:18px;
  font-weight:1000;
  cursor:pointer;
  flex-shrink:0;
}

.maClearBtn:hover{
  background:#fff7f7;
  border-color:rgba(239,68,68,.25);
}

.maPrimaryBtn,
.maGhostBtn{
  min-height:48px;
  padding:0 16px;
  border-radius:16px;
  font-size:15px;
  font-weight:1000;
  cursor:pointer;
}

.maPrimaryBtn{
  border:none;
  background:var(--brand);
  color:#fff;
  box-shadow:0 12px 24px rgba(255,165,0,.22);
}

.maPrimaryBtn:hover{
  background:var(--brand-dark);
}

.maGhostBtn{
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.9);
  color:#111;
}

.maSmallBtn{
  min-height:40px;
  padding:0 12px;
  font-size:14px;
  border-radius:14px;
}

.maStatusText{
  font-weight:1000;
}

.maStatusText.active{
  color:#178a45;
}

.maStatusText.inactive{
  color:#c63838;
}

.maBlock{
  width:100%;
}

.maEmptyState{
  margin-top:16px;
  padding:18px;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  border:1px dashed rgba(0,0,0,.12);
  color:rgba(0,0,0,.55);
  font-size:14px;
  font-weight:800;
  text-align:center;
}

.maError,
.maInfo{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  font-size:13px;
  font-weight:800;
}

.maError{
  color:var(--danger);
  background:rgba(239,68,68,.10);
  border:1px solid rgba(239,68,68,.20);
}

.maInfo{
  color:var(--info);
  background:#f5f8fc;
  border:1px solid #dce7f5;
}

.maModalOverlay{
  position:fixed;
  inset:0;
  background:rgba(255,255,255,.10);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:99999;
}

.maModalCard{
  width:min(420px, 96vw);
  background:rgba(255,255,255,.97);
  border:1px solid rgba(255,255,255,.78);
  border-radius:24px;
  box-shadow:0 24px 70px rgba(0,0,0,.20);
  padding:18px;
  text-align:center;
}

.maSuccessIcon{
  width:64px;
  height:64px;
  border-radius:999px;
  margin:0 auto 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e9f7ef;
  color:var(--success);
  font-size:34px;
  font-weight:1000;
}

.maModalTitle{
  margin:0 0 12px;
  font-size:24px;
  font-weight:1000;
}

.maSuccessPhoto{
  width:110px;
  height:110px;
  border-radius:22px;
  object-fit:cover;
  background:#f3f4f6;
  border:1px solid rgba(0,0,0,.08);
  display:block;
  margin:0 auto 14px;
}

.maModalLine{
  margin-top:6px;
  font-size:14px;
  line-height:1.45;
  color:#313847;
  font-weight:800;
}

.maModalActions{
  display:flex;
  justify-content:center;
  margin-top:18px;
}

.mt12{ margin-top:12px; }
.mt18{ margin-top:18px; }

@media (max-width:760px){
  body{
    padding:10px;
  }

  .maCard{
    padding:16px;
    border-radius:20px;
  }

  .maTitle{
    font-size:24px;
  }

  .maSearchRow{
    grid-template-columns:1fr 96px;
  }

  .maBigActionBtn{
    font-size:24px;
    min-height:66px;
  }
}