* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, Arial, sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; }
.hidden { display: none !important; }

.view { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card.mini { padding: 14px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.topbar h1 { font-size: 20px; }
.muted { color: #64748b; font-size: 13px; }
.num { font-size: 24px; font-weight: 800; color: #0f172a; }
.lbl { font-size: 12px; color: #64748b; }

h2 { font-size: 15px; margin: 16px 0 6px; color: #334155; }

/* mesin */
.machine { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); border-left: 5px solid #94a3b8; }
.machine.idle { border-left-color: #22c55e; }
.machine.active { border-left-color: #f59e0b; background: #fffbeb; }
.machine .mname { font-weight: 700; font-size: 15px; }
.machine .mstat { font-size: 12px; margin: 4px 0; }
.machine.idle .mstat { color: #16a34a; }
.machine.active .mstat { color: #b45309; }
.machine .mtimer { font-size: 13px; font-weight: 700; color: #0f172a; }
.machine .mcount { font-size: 12px; color: #64748b; margin-top: 6px; }
.machine button { margin-top: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: #7c3aed; color: #fff; font-weight: 700; cursor: pointer; }
.machine button:disabled { background: #c4b5fd; cursor: not-allowed; }

/* list transaksi */
.list { display: flex; flex-direction: column; gap: 8px; }
.tx { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; justify-content: space-between; align-items: center; }
.tx .tl { font-size: 13px; }
.tx .tr { font-size: 13px; font-weight: 700; text-align: right; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; margin-top: 4px; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.active { background: #fed7aa; color: #9a3412; }
.pill.done { background: #dcfce7; color: #166534; }

/* form login */
#view-login .card { max-width: 380px; margin: 8vh auto; }
input { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; margin: 6px 0 14px; font-size: 16px; }
label { font-size: 13px; font-weight: 600; color: #334155; }
button { border: 0; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
button[type=submit] { width: 100%; background: #7c3aed; color: #fff; }
button.ghost { background: transparent; color: #64748b; font-weight: 600; }
.err { color: #b91c1c; font-size: 13px; margin-top: 8px; min-height: 18px; }
