/* ===== ParkNotify v2.0 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --bg: #f0f4ff;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

/* ===== Header ===== */
.header {
  text-align: center;
  padding: 20px 16px 12px;
}

.header .logo { font-size: 44px; margin-bottom: 4px; }

.header h1 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

/* ===== Card ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-header {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #f8fafc;
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.form-group .hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-group .hint a { color: var(--primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { width: auto; padding: 8px 16px; font-size: 13px; }

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

/* ===== QR Code ===== */
.qr-container { text-align: center; padding: 12px 0; }
.qr-container img { max-width: 220px; height: auto; border-radius: 8px; border: 2px solid var(--border); }
.qr-actions { display: flex; gap: 10px; margin-top: 14px; }
.qr-actions .btn { flex: 1; }

/* ===== Notification List ===== */
.notification-list { list-style: none; }

.notification-item {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.notification-item:last-child { border-bottom: none; }
.notification-item.new { background: #eff6ff; animation: fadeIn 0.5s ease; }

.notification-item .notify-msg {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.notification-item .notify-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.notification-item .notify-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #dbeafe;
  color: var(--primary);
}

.notification-item .notify-phone {
  background: #dcfce7;
  color: #166534;
}

/* Empty */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* ===== Status ===== */
.status-banner {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-banner.success { background: #dcfce7; color: #166534; }
.status-banner.error { background: #fef2f2; color: #991b1b; }
.status-banner.info { background: #dbeafe; color: #1e40af; }
.status-banner.warn { background: #fffbeb; color: #92400e; }

/* ===== Steps ===== */
.steps { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.step-text h3 { font-size: 15px; margin-bottom: 2px; }
.step-text p { font-size: 13px; color: var(--text-secondary); }

/* Feature grid */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.feature-item {
  padding: 12px; background: #f8fafc; border-radius: 10px;
  font-size: 13px; text-align: center;
}
.feature-item .feat-icon { font-size: 24px; margin-bottom: 4px; }
.feature-item strong { display: block; margin-bottom: 2px; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 10px; color: white;
  font-weight: 600; font-size: 14px; z-index: 9999;
  box-shadow: var(--shadow-lg); animation: slideDown 0.35s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 16px;
  color: var(--text-secondary); font-size: 12px;
}
.footer a { color: var(--primary); text-decoration: none; }

/* ===== Pulse animation for live indicator ===== */
.pulse {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Responsive */
@media (max-width: 360px) {
  .container { padding: 10px; }
  .card { padding: 14px; }
  .features { grid-template-columns: 1fr; }
}
