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

html, body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 55%, #dbeafe 100%);
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 16px 48px;
}

.container {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  padding: 20px;
}

.status-card, .error-card {
  text-align: center;
  padding: 36px 20px;
}

.error-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #dc2626;
}

.vehicle-card {
  text-align: center;
  padding: 24px 20px;
}

.top-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.plate-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1e3a8a;
  line-height: 1.15;
  word-break: break-word;
}

.brand-subtitle {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  color: #64748b;
}

.instruction-text {
  text-align: center;
  font-size: 0.96rem;
  color: #475569;
  margin: 14px 0 4px;
}

#vehicleSection {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.preset-text {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}

.message-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.98rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.message-input:focus {
  border-color: #60a5fa;
  background: #ffffff;
}

.message-input::placeholder {
  color: #94a3b8;
}

.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #bae6fd;
  color: #0f172a;
  border: 1px solid #7dd3fc;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.send-btn:hover:not(:disabled) {
  background-color: #7dd3fc;
}

.send-btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

.send-icon {
  width: 16px;
  height: 16px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-box {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 26px 22px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 28px;
  height: 28px;
}

.success-icon {
  background: #dcfce7;
  color: #16a34a;
}

.error-icon {
  background: #fee2e2;
  color: #dc2626;
}

.incoming-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e3a8a;
}

.modal-message {
  font-size: 1.05rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.modal-btn {
  margin-top: 6px;
  width: 100%;
  background-color: #bae6fd;
  color: #0f172a;
  border: 1px solid #7dd3fc;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.modal-btn:hover {
  background-color: #7dd3fc;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .plate-title {
    font-size: 1.95rem;
  }
  .action-card {
    flex-direction: column;
    align-items: stretch;
  }
  .send-btn {
    width: 100%;
  }
}
