/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
   BODY
========================= */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f1f3f4;
}

/* =========================
   HEADER
========================= */
.appbar {
  background: linear-gradient(135deg, #660300, #d3002a);
  color: white;
  padding: 15px;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* LOGO */
.logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 37%;
  background: #660300;
  padding: 5px;
  cursor: pointer;
}

/* TEXT */
.title h1 {
  font-size: 18px;
}

.title p {
  font-size: 12px;
  margin: 2px 0;
}

.title span {
  font-size: 11px;
  opacity: 0.9;
}

/* =========================
   CONTAINER
========================= */
.container {
  max-width: 420px;
  margin: 10px auto;
  padding: 15px;
}

/* =========================
   CARD
========================= */
.card {
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================
   INPUT
========================= */
.input-group {
  position: relative;
  margin-top: 15px;
}

.input-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.input-group label {
  position: absolute;
  left: 12px;
  top: 14px;
  background: white;
  padding: 0 5px;
  color: #777;
  transition: 0.2s;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #660300;
}

/* =========================
   BUTTON
========================= */
button {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
  background: #660300;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: #8a0400;
}

/* =========================
   CAMERA
========================= */
video, #preview {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

/* =========================
   STATUS
========================= */
.status {
  text-align: center;
  margin-top: 10px;
  color: rgb(207, 0, 0);
  font-weight: bold;
}

/* =========================
   DATETIME
========================= */
.datetime {
  text-align: center;
  font-size: 13px;
  color: #333;
  margin-top: 10px;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  background: #660300;
  overflow-x: hidden;
  transition: 0.3s;
  padding-top: 60px;
  z-index: 999;
}

.sidebar a {
  padding: 12px 20px;
  display: block;
  color: white;
  text-decoration: none;
  font-size: 16px;
}

.sidebar a:hover {
  background: #d30700;
}

.closebtn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
}

/* =========================
   TABEL LAPORAN
========================= */
table {
  border-collapse: collapse;
  font-size: 13px;
}

th {
  background: #660300;
  color: white;
  padding: 8px;
}

td {
  padding: 6px;
  text-align: center;
}

tr:nth-child(even) {
  background: #f9f9f9;
}

/* RESPONSIVE TABLE */
@media (max-width: 768px) {
  table {
    font-size: 10px;
  }

  th, td {
    padding: 4px;
  }
}

/* =========================
   FOTO THUMBNAIL
========================= */
.foto-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

/* =========================
   MODAL FOTO
========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
}

.modal img {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80%;
}

.modal span {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* =========================
   SUMMARY BOX
========================= */
.summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.summary p {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  font-size: 13px;
}

/* =========================
   CHART
========================= */
canvas {
  max-width: 100%;
}

/* =========================
   SCROLL TABLE
========================= */
div[style*="overflow-x"] {
  border-radius: 10px;
  overflow: hidden;
}