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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6fb;
  color: #222;
}

/* NAV */
.navbar {
  display: flex;
  align-items: center;
  gap: 32px;
  background: #1e293b;
  padding: 0 32px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  flex: 1;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: #334155;
  color: #fff;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-start {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-start:hover:not(:disabled) {
  background: #16a34a;
}

.btn-start:disabled {
  background: #4ade80;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-stop {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-stop:hover:not(:disabled) {
  background: #dc2626;
}

.btn-stop:disabled {
  background: #f87171;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-snap {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-snap:hover:not(:disabled) {
  background: #d97706;
}

.btn-snap:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


.capture-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.capture-status.running {
  background: #dcfce7;
  color: #16a34a;
}

.capture-status.stopped {
  background: #f1f5f9;
  color: #64748b;
}

.btn-capture-log {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-capture-log:hover {
  background: #2563eb;
}

/* PAGES */
.page {
  display: none;
  min-height: calc(100vh - 60px);
}

.page.active {
  display: block;
}

.page-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px;
}

.page-inner h1 {
  font-size: 36px;
  margin-bottom: 16px;
  color: #1e293b;
}

.page-inner p {
  font-size: 16px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.product-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1e293b;
}

.product-card p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 12px;
}

.price {
  font-size: 16px;
  font-weight: 700;
  color: #3b82f6;
}

/* SERVICE LIST */
.service-list {
  list-style: none;
  margin-bottom: 36px;
}

.service-list li {
  font-size: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

/* CONTACT FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #3b82f6;
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
}

/* BUTTONS */
.btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn-primary:hover {
  background: #2563eb;
}

/* CAPTURE LOG PANEL */
.capture-log {
  position: fixed;
  top: 60px;
  right: 0;
  width: 420px;
  height: calc(100vh - 60px);
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s;
}

.capture-log.hidden {
  transform: translateX(100%);
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.log-header h2 {
  font-size: 16px;
  color: #1e293b;
}

.log-actions {
  display: flex;
  gap: 8px;
}

.btn-download-all {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-download-all:hover {
  background: #16a34a;
}

.btn-clear {
  background: #f1f5f9;
  color: #475569;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-clear:hover {
  background: #e2e8f0;
}

.btn-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  padding: 4px 8px;
}

.btn-close:hover {
  color: #334155;
}

.log-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-msg {
  color: #94a3b8;
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
}

/* CAPTURE ITEM */
.capture-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.capture-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
}

.capture-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.capture-item-time {
  font-size: 11px;
  color: #94a3b8;
}

.capture-item img {
  width: 100%;
  display: block;
  cursor: pointer;
}

.capture-item-footer {
  padding: 8px 14px;
  display: flex;
  justify-content: flex-end;
}

.btn-dl {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-dl:hover {
  background: #2563eb;
}

/* GUIDE BANNER */
.guide-banner {
  background: #fef9c3;
  color: #854d0e;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  border-bottom: 1px solid #fde68a;
}

.guide-banner.hidden {
  display: none;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  transition: opacity 0.3s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}
