* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f8;
  color: #1f2933;
}
.hidden { display: none !important; }

nav {
  display: flex; align-items: center; gap: 8px;
  background: #1f3a5f; color: #fff; padding: 10px 20px;
}
nav .brand { font-weight: 700; margin-right: 16px; }
nav .spacer { flex: 1; }
nav button {
  background: transparent; color: #cfd8e3; border: 1px solid #3b5a86;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
nav button:hover { background: #2c4d7c; color: #fff; }
.badge {
  background: #e0245e; color: #fff; border-radius: 10px;
  padding: 1px 7px; font-size: 12px; margin-left: 4px;
}

main { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 20px; margin-bottom: 16px;
}
h2 { margin-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f0f4f8; }

.status { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.status.PENDING { background: #fef3c7; color: #92400e; }
.status.APPROVED { background: #d1fae5; color: #065f46; }
.status.REJECTED { background: #fee2e2; color: #991b1b; }
.status.PENDING_TASK { background: #dbeafe; color: #1e40af; }
.status.SKIPPED { background: #e5e7eb; color: #4b5563; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1;
  border-radius: 6px; font-size: 14px; font-family: inherit;
}
button.primary {
  background: #1f3a5f; color: #fff; border: none; padding: 9px 18px;
  border-radius: 6px; cursor: pointer; font-size: 14px; margin-top: 16px;
}
button.primary:hover { background: #2c4d7c; }
button.small {
  padding: 4px 10px; font-size: 13px; border-radius: 5px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff;
}
button.approve { background: #059669; color: #fff; border-color: #059669; margin-right: 6px; }
button.reject { background: #dc2626; color: #fff; border-color: #dc2626; }
button.danger { color: #dc2626; }

.login-box { max-width: 380px; margin: 80px auto; }
.muted { color: #6b7280; font-size: 13px; }

.modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow-y: auto;
}
.modal-box {
  background: #fff; border-radius: 12px; max-width: 760px; width: 100%;
  padding: 24px; position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 14px; border: none; background: none;
  font-size: 24px; cursor: pointer; color: #6b7280;
}
.timeline { border-left: 3px solid #e2e8f0; margin-left: 8px; padding-left: 16px; }
.timeline .ev { margin-bottom: 12px; font-size: 14px; }
.timeline .ev .t { color: #6b7280; font-size: 12px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; font-size: 14px; }
.actions { margin: 16px 0; }
.error { color: #dc2626; font-size: 14px; margin-top: 8px; }
