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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1c1e21;
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

header { text-align: center; margin-bottom: 24px; }
h1 { font-size: 2rem; color: #1a73e8; }
.subtitle { color: #606770; }

fieldset {
  background: #fff;
  border: 1px solid #dddfe2;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

legend {
  font-weight: 700;
  padding: 0 8px;
  color: #1a73e8;
}

label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

.required { color: #e41e3f; }

input[type="text"], input[type="tel"], textarea, select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 400;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid #1a73e8;
  border-color: transparent;
}

input[type="color"] {
  margin-top: 4px;
  width: 64px;
  height: 36px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  cursor: pointer;
}

input[type="file"] { margin-top: 6px; font-weight: 400; }

.hint { font-size: 0.85rem; color: #606770; margin-top: -8px; }

button {
  display: block;
  width: 100%;
  padding: 14px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: #1557b0; }
button:disabled { background: #8ab4f8; cursor: not-allowed; }

button.secondary {
  background: #e4e6eb;
  color: #1c1e21;
  margin-top: 16px;
}
button.secondary:hover { background: #d8dadf; }

#status-panel {
  background: #fff;
  border: 1px solid #dddfe2;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

#status-panel h2 { margin-bottom: 12px; font-size: 1.3rem; }

code {
  background: #f0f2f5;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.status { font-size: 1.1rem; font-weight: 600; margin: 12px 0; }

.spinner {
  width: 36px;
  height: 36px;
  margin: 12px auto;
  border: 4px solid #e4e6eb;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.download-btn {
  display: inline-block;
  margin: 12px 0;
  padding: 14px 32px;
  background: #34a853;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.download-btn:hover { background: #2d8e47; }

.error { color: #e41e3f; font-weight: 600; }

/* Chọn gói dịch vụ */
.tier-list { display: grid; gap: 10px; }

.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.tier-card {
  display: block;
  border: 2px solid #ccd0d5;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.tier-option input:checked + .tier-card {
  border-color: #1a73e8;
  background: #eaf1fd;
}

.tier-name { font-weight: 700; font-size: 1.05rem; }

.tier-price {
  float: right;
  font-weight: 800;
  color: #1a73e8;
}

.tier-desc {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: #606770;
  margin-top: 4px;
}

.payment-warning {
  background: #fff4e5;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0 0;
  text-align: left;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.center { text-align: center; margin-top: 10px; }

.tier-tag {
  display: inline-block;
  background: #eaf1fd;
  color: #1a56b0;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: 8px;
}

/* Thanh tiến trình 4 bước */
.steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 20px 0 8px;
  padding: 0;
  counter-reset: step;
}

.steps li {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  color: #90949c;
  position: relative;
  padding-top: 34px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: #e4e6eb;
  color: #90949c;
  font-weight: 700;
}

.steps li.active {
  color: #1a73e8;
  font-weight: 700;
}

.steps li.active::before {
  background: #1a73e8;
  color: #fff;
}

.steps li.done-step { color: #34a853; }

.steps li.done-step::before {
  content: "✓";
  background: #34a853;
  color: #fff;
}

.revision-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #dddfe2;
  text-align: left;
}

.revision-box h3 { font-size: 1.05rem; margin-bottom: 8px; }

.revision-box textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 10px;
}

.file-summary { display: block; margin-top: 4px; color: #1a73e8; font-weight: 600; }

.guide-box {
  background: #eaf1fd;
  border: 1px solid #a9c8f5;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.guide-box ul { margin: 8px 0 0 20px; }
.guide-box li { margin-bottom: 4px; }

.lookup-link { text-align: center; margin-bottom: 16px; font-size: 0.92rem; }
.lookup-link a { color: #1a73e8; font-weight: 600; }

.lookup-box {
  background: #fff;
  border: 1px solid #dddfe2;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.lookup-box input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 10px;
  font-family: monospace;
}

.copy-btn {
  display: inline-block;
  width: auto;
  padding: 4px 12px;
  font-size: 0.8rem;
  background: #e4e6eb;
  color: #1c1e21;
  border-radius: 6px;
  vertical-align: middle;
}
.copy-btn:hover { background: #d8dadf; }

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 16px 10px 48px; }
  h1 { font-size: 1.6rem; }
  fieldset { padding: 14px; }
  .two-col { grid-template-columns: 1fr; }
  .steps li { font-size: 0.7rem; }
  .tier-price { float: none; display: block; margin-top: 2px; }
}

.hidden { display: none !important; }
