* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.header h1 {
  font-size: 20px;
  color: #1a1a1a;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.shop-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-selector select {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
  cursor: pointer;
}
.status-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f5f5f5;
}
.status-light .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
}
.status-light.ok .dot { background: #52c41a; }
.status-light.ok { background: #f6ffed; color: #389e0d; }
.status-light.fail .dot { background: #ff4d4f; }
.status-light.fail { background: #fff2f0; color: #cf1322; }
.status-light.warn .dot { background: #faad14; }
.status-light.warn { background: #fffbe6; color: #d48806; }

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tab {
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  border: none;
  background: transparent;
}
.tab:hover { background: #f5f5f5; }
.tab.active {
  background: #1677ff;
  color: #fff;
}

/* Panel */
.panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
.panel-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a1a1a;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-item label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}
.form-item input,
.form-item textarea {
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.2s;
}
.form-item input:focus,
.form-item textarea:focus {
  outline: none;
  border-color: #1677ff;
}
.form-item textarea {
  min-height: 120px;
  resize: vertical;
  font-family: monospace;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary {
  background: #1677ff;
  color: #fff;
}
.btn-primary:hover { background: #4096ff; }
.btn-success {
  background: #52c41a;
  color: #fff;
}
.btn-success:hover { background: #73d13d; }
.btn-danger {
  background: #ff4d4f;
  color: #fff;
}
.btn-danger:hover { background: #ff7875; }
.btn-default {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #d9d9d9;
}
.btn-default:hover { background: #e8e8e8; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Quick Action */
.quick-box {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.quick-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quick-input label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}
.quick-input input {
  width: 140px;
  padding: 14px 16px;
  border: 2px solid #d9d9d9;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  transition: border 0.2s;
}
.quick-input input:focus {
  outline: none;
  border-color: #1677ff;
}
.pin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  font-size: 14px;
  color: #666;
}
.pin-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Result */
.result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  font-size: 14px;
  display: none;
}
.result-box.show { display: block; }
.result-box.success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}
.result-box.error {
  background: #fff2f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.data-table th {
  font-weight: 600;
  color: #666;
  background: #fafafa;
}
.data-table tr:hover { background: #fafafa; }

/* Logs */
.log-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  align-items: center;
}
.log-time { color: #999; min-width: 140px; }
.log-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  min-width: 60px;
  text-align: center;
}
.log-tag.success { background: #f6ffed; color: #389e0d; }
.log-tag.fail { background: #fff2f0; color: #cf1322; }
.log-content { flex: 1; }

/* Shop Cards */
.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.shop-card {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: box-shadow 0.2s;
}
.shop-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.shop-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.shop-card p {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}
.shop-card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Ext guide */
.ext-guide {
  background: #f6ffed;
  border: 1px dashed #b7eb8f;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #389e0d;
}
.ext-guide code {
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* Import area */
.import-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .import-area { grid-template-columns: 1fr; }
  .quick-box { flex-direction: column; align-items: stretch; }
  .quick-input input { width: 100%; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}
