/* ================================
   SISTEM DOKUMEN ONLINE v1.7F
   Full Release Template Override
   ================================ */

:root {
  --pad: 14px;
  --line: #ddd;
  --main: #e60000;
  --main-dark: #a40000;
  --bg: #fff;
  --text: #222;
  --muted: #666;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #f7f7f7;
  color: var(--text);
  font-size: 14px;
}

/* HEADER */
header#topbar {
  display: flex;
  align-items: center;
  background: var(--main);
  color: #fff;
  padding: 8px 14px;
  gap: 10px;
}
header img#headerLogo {
  height: 40px;
  object-fit: contain;
}
header .btn {
  background: #fff;
  color: var(--main-dark);
  border: none;
  font-weight: 600;
}

/* WRAPPER */
.wrap {
  max-width: 900px;
  margin: 20px auto;
  background: var(--bg);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* CARD STYLING */
.card {
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}
.card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  padding: 10px var(--pad);
  font-weight: bold;
}
.card-hd h1 {
  font-size: 16px;
  margin: 0;
}
.badge {
  font-size: 12px;
  background: #eee;
  padding: 3px 8px;
  border-radius: 6px;
}

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}
table th, table td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
}
table th {
  background: #fafafa;
}
.right {
  text-align: right !important;
}

/* BUTTONS */
.btn {
  display: inline-block;
  background: var(--main);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover { opacity: 0.9; }
.btn-soft {
  background: #eee;
  color: #333;
}
.btn-danger {
  background: #b40000;
}

/* INPUTS */
input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}
textarea {
  resize: vertical;
}

/* MUTED TEXT */
.muted {
  color: var(--muted);
  font-size: 12px;
}

/* PAGES */
.page {
  display: none;
  padding: var(--pad);
}
.page.show {
  display: block;
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
}
.modal.show {
  display: flex;
}
.modal .box {
  background: #fff;
  border-radius: 8px;
  width: 480px;
  max-width: 95%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.box-hd {
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
  font-weight: bold;
}
.box-bd {
  padding: var(--pad);
}

/* GRID */
.grid {
  display: grid;
  gap: 10px;
}
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }

/* DOCUMENT TEMPLATES */
.doc {
  background: #fff;
  padding: 30px;
  font-size: 14px;
  color: #000;
}
.doc .header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--main);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.doc .header .brand .name {
  font-weight: 700;
  font-size: 16px;
  color: var(--main-dark);
}
.doc .brand img {
  height: 50px;
  object-fit: contain;
}

/* TEMPLATE A (EZ COMPUTER) */
.doc.A .name {
  color: var(--main);
  font-size: 18px;
  font-weight: 700;
}

/* TEMPLATE B (BERKAT NIAGA - ENGLISH) */
.doc.B .titlewrap {
  text-align: center;
  margin: 10px 0;
}
.doc.B .title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--main);
}
.doc.B .divider {
  height: 2px;
  width: 100%;
  background: var(--main);
  margin-top: 6px;
}

/* TEMPLATE C (PERTECH SOLUTION - FOLLOW SAMPLE) */
.doc.C .header {
  text-align: center;
  border-bottom: 2px solid #000;
}
.doc.C .header .name {
  font-size: 18px;
  font-weight: 700;
  color: #081a35 !important;
}
.doc.C table th {
  background: #f0f2f6;
  font-weight: 600;
}
.doc.C .sum {
  font-weight: 700;
  font-size: 15px;
}
.doc.C .signs {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
}
.doc.C .signs .lbl {
  font-weight: 600;
}

/* SIGN AREA */
.signs {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}
.sign .lbl {
  font-weight: 600;
  margin-bottom: 4px;
}
.sign .box {
  min-height: 70px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

/* RESPONSIVE */
@media print {
  body { background: #fff; }
  .wrap, header, .btn, .modal { display: none !important; }
  .doc { box-shadow: none; border: none; }
}
