* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #000;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 32px;
}

@media (max-width: 600px) {
  body { padding: 10px; }
  .container { padding: 20px; }
}

/* ===== Top nav ===== */
.topnav {
  max-width: 800px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.nav-brand { color: #4a9eff; font-size: 20px; font-weight: 500; text-decoration: none; letter-spacing: 2px; }
.nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-links a { color: #999; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #fff; }
.nav-logout button { background: none; border: 1px solid #333; border-radius: 6px; color: #777; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.nav-logout button:hover { color: #fff; border-color: #555; }

/* ===== Pending move bar ===== */
.pending-move-bar {
  max-width: 800px;
  margin: 0 auto 16px;
  background: #1e3a5f;
  border: 1px solid #2a5a8a;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9cc7f5;
  font-size: 14px;
}
.pending-move-bar form { margin-left: auto; }
.pending-move-bar button { background: #2a5a8a; border: none; border-radius: 6px; color: #cfe5fb; padding: 6px 12px; cursor: pointer; font-size: 13px; }

/* ===== Headers / titles ===== */
.header-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.data-title { font-size: 32px; font-weight: 300; color: #4a9eff; letter-spacing: 1px; margin: 0; }
h1.editable { border: 1px solid transparent; padding: 5px; border-radius: 4px; }
h1.editable:focus { outline: none; border-color: #4a9eff; background-color: rgba(74,158,255,0.1); }
.page-title { font-size: 26px; font-weight: 300; color: #4a9eff; letter-spacing: 1px; margin-bottom: 20px; }
.section-title { color: #4a9eff; margin: 28px 0 14px; font-weight: 400; font-size: 19px; }

.condition-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

.muted { color: #777; font-size: 13px; }
.small { font-size: 13px; }

/* ===== Banners ===== */
.overdue-banner {
  background: #7f1d1d; border: 1px solid #991b1b; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.overdue-banner .overdue-text { flex: 1; color: #fca5a5; font-size: 14px; font-weight: 500; }
.overdue-banner button {
  background: #991b1b; border: 1px solid #b91c1c; border-radius: 6px;
  color: #fca5a5; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.info-banner {
  background: #1e3a5f; border: 1px solid #2a5a8a; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 20px; color: #9cc7f5; font-size: 14px;
}
.success-banner {
  background: #1a4d1a; border: 1px solid #2d7a2d; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 20px; color: #4eff4e; font-size: 14px;
}

/* ===== Quick actions ===== */
.quick-actions-section { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid #222; }
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .qa-grid { grid-template-columns: repeat(3, 1fr); } }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 8px; border: 1px solid; border-radius: 10px;
  cursor: pointer; font-family: 'Roboto', sans-serif; min-height: 72px;
  transition: all 0.15s ease;
}
.qa-btn:hover { transform: translateY(-2px); filter: brightness(1.2); }
.qa-btn:active { transform: scale(0.97); }
.qa-label { font-size: 13px; font-weight: 500; text-align: center; }

/* ===== Modal ===== */
.qa-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 2000; align-items: flex-end; justify-content: center;
}
.qa-modal-overlay.active { display: flex; }
.qa-modal {
  background: #1a1a1a; border: 1px solid #333; border-radius: 16px 16px 0 0;
  width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; padding: 24px;
  animation: slideUp 0.25s ease;
}
@media (min-width: 600px) {
  .qa-modal-overlay { align-items: center; }
  .qa-modal { border-radius: 16px; margin: 20px; }
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.qa-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.qa-modal-title { font-size: 20px; font-weight: 400; }
.qa-modal-close { background: none; border: none; color: #666; font-size: 28px; cursor: pointer; line-height: 1; }
.qa-modal-close:hover { color: #fff; }

.qa-form-group { margin-bottom: 16px; }
.qa-form-group label { display: block; margin-bottom: 6px; color: #999; font-size: 13px; }
.qa-form-group input, .qa-form-group select {
  width: 100%; padding: 12px; background: #0a0a0a; border: 1px solid #333;
  border-radius: 8px; color: #fff; font-size: 16px; font-family: 'Roboto', sans-serif;
}
.qa-form-group input:focus { outline: none; border-color: #4a9eff; background: #111; }

.qa-submit-btn {
  width: 100%; padding: 14px; border: none; border-radius: 10px; color: #fff;
  font-size: 16px; font-weight: 500; cursor: pointer; margin-top: 8px;
  background: linear-gradient(135deg, #4a9eff 0%, #3b7dd8 100%);
}
.qa-submit-btn:hover { filter: brightness(1.15); }
.qa-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.qa-cancel-btn {
  width: 100%; padding: 12px; border: 1px solid #333; border-radius: 10px;
  background: transparent; color: #999; font-size: 14px; cursor: pointer; margin-top: 8px;
}
.qa-cancel-btn:hover { border-color: #555; color: #fff; }
.qa-confirm-message { color: #ccc; font-size: 16px; line-height: 1.6; margin-bottom: 20px; text-align: center; }
.qa-select-option {
  display: block; width: 100%; padding: 14px 16px; background: #0a0a0a;
  border: 1px solid #333; border-radius: 10px; color: #fff; font-size: 16px;
  text-align: left; cursor: pointer; margin-bottom: 8px; font-family: 'Roboto', sans-serif;
}
.qa-select-option:hover { border-color: #4a9eff; background: #111; }
.qa-reminder-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #0a0a0a; border: 1px solid #333; border-radius: 10px;
  margin-bottom: 8px; cursor: pointer;
}
.qa-reminder-option:hover { border-color: #8b5cf6; }
.qa-reminder-option.selected { border-color: #8b5cf6; background: #8b5cf610; }
.qa-reminder-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #555;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.qa-reminder-option.selected .qa-reminder-radio { border-color: #8b5cf6; }
.qa-reminder-option.selected .qa-reminder-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #8b5cf6;
}

/* ===== Components / fields ===== */
.component-group { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid #222; }
.component-group:last-child { border-bottom: none; }
label { display: block; margin-bottom: 8px; color: #888; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
input.editable, textarea.editable, input.field-input, textarea.field-input, select.field-input {
  width: 100%; padding: 8px 12px; background-color: #1a1a1a; border: 1px solid #333;
  border-radius: 4px; color: #fff; font-size: 16px; font-family: 'Roboto', sans-serif;
}
input.editable:focus, textarea.editable:focus, input.field-input:focus, textarea.field-input:focus {
  outline: none; border-color: #4a9eff; background-color: #222;
}
textarea.editable, textarea.field-input { min-height: 80px; resize: vertical; }

.save-indicator {
  position: fixed; top: 20px; right: 20px; background: #2a5a8a; color: #fff;
  padding: 10px 20px; border-radius: 6px; display: none; z-index: 3000;
}
.save-indicator.show { display: block; }

/* ===== Log / events ===== */
.log-entry { background-color: #0a0a0a; border: 1px solid #222; border-radius: 6px; padding: 15px; margin-bottom: 12px; }
.entry-time { color: #666; font-size: 12px; margin-bottom: 6px; }
.entry-text { color: #fff; font-size: 14px; line-height: 1.5; }
.add-entry-form { background-color: #0a0a0a; border: 1px solid #222; border-radius: 6px; padding: 15px; margin-bottom: 20px; }
.add-entry-form textarea {
  width: 100%; padding: 12px; background-color: #1a1a1a; border: 1px solid #333;
  border-radius: 6px; color: #fff; font-family: 'Roboto', sans-serif; font-size: 14px;
  resize: vertical; min-height: 60px;
}
.add-entry-btn {
  background: linear-gradient(135deg, #2a5a8a 0%, #1e4570 100%); border: none;
  border-radius: 6px; color: #fff; padding: 10px 20px; font-size: 14px;
  cursor: pointer; margin-top: 10px; width: 100%;
}
.add-entry-btn:disabled { opacity: 0.5; }

/* ===== Buttons / misc ===== */
.btn {
  display: inline-block; background: linear-gradient(135deg, #4a9eff 0%, #3b7dd8 100%);
  border: none; border-radius: 8px; color: #fff; padding: 12px 22px; font-size: 15px;
  cursor: pointer; text-decoration: none; font-family: 'Roboto', sans-serif;
}
.btn:hover { filter: brightness(1.12); }
.btn.secondary { background: #1a1a1a; border: 1px solid #333; color: #ccc; }
.btn.secondary:hover { border-color: #555; color: #fff; }
.btn.danger { background: #7f1d1d; border: 1px solid #991b1b; color: #fca5a5; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

/* ===== Lists / cards ===== */
.card {
  background: #0a0a0a; border: 1px solid #222; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
}
.card a { color: #fff; text-decoration: none; }
.card a:hover { color: #4a9eff; }
.card .card-main { flex: 1; min-width: 0; }
.card .card-title { font-size: 15px; }
.card .card-sub { color: #777; font-size: 12px; margin-top: 3px; }

/* ===== Breadcrumb ===== */
.breadcrumb { color: #999; font-size: 13px; margin-bottom: 16px; }
.breadcrumb a { color: #4a9eff; text-decoration: none; }
.breadcrumb .sep { color: #444; margin: 0 5px; }

/* ===== Dashboard ===== */
.dash-section { margin-bottom: 26px; }
.dash-count { background: #222; border-radius: 10px; font-size: 12px; padding: 2px 9px; color: #aaa; margin-left: 8px; }

/* ===== Login ===== */
.login-box { max-width: 380px; margin: 60px auto; text-align: center; }
.login-box .brand { font-size: 34px; font-weight: 300; color: #4a9eff; letter-spacing: 4px; margin-bottom: 30px; }
.login-box input {
  width: 100%; padding: 14px; background: #0a0a0a; border: 1px solid #333;
  border-radius: 8px; color: #fff; font-size: 16px; margin-bottom: 12px;
}
.login-box input:focus { outline: none; border-color: #4a9eff; }

/* ===== Images ===== */
.item-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.item-photos img { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid #333; }
.upload-row { margin-bottom: 20px; }

/* ===== Tables ===== */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 8px; border-bottom: 1px solid #333; }
table.list td { padding: 10px 8px; border-bottom: 1px solid #1c1c1c; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }

/* ===== Scan FAB ===== */
.scan-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 1500;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #4a9eff 0%, #3b7dd8 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px rgba(74, 158, 255, 0.4); text-decoration: none;
  transition: transform 0.15s ease;
}
.scan-fab:hover { transform: scale(1.08); }
.scan-fab:active { transform: scale(0.95); }

/* ===== Checklist ===== */
.check-step { display: flex; align-items: center; gap: 12px; background: #0a0a0a; border: 1px solid #222; border-radius: 8px; padding: 13px 16px; margin-bottom: 8px; cursor: pointer; }
.check-step.done { opacity: 0.55; }
.check-step.done .step-title { text-decoration: line-through; }
.check-box { width: 22px; height: 22px; border: 2px solid #555; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #22c55e; font-weight: bold; }
.check-step.done .check-box { border-color: #22c55e; }
