/* Invoice Registration Page */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.inv-page {
  min-height: 100vh;
  background: #f0f2f5;
  padding: 40px 16px;
  font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
  color: #111827;
}

.inv-container {
  max-width: 672px;
  margin: 0 auto;
}

/* ---- Header ---- */
.inv-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.inv-header-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.inv-header-icon svg {
  color: #fff;
}

.inv-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  margin: 0;
}

.inv-header p {
  font-size: 14px;
  color: #64748b;
  margin: 2px 0 0;
}

/* ---- Form layout ---- */
.inv-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Section card ---- */
.inv-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.inv-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.inv-card-accent {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.inv-card-accent.blue {
  background: #3b82f6;
}

.inv-card-accent.amber {
  background: #fbbf24;
}

.inv-card-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-card-header-inner svg {
  color: #64748b;
}

.inv-card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.inv-card-body {
  padding: 24px;
}

/* ---- Field groups ---- */
.inv-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inv-row {
  display: grid;
  gap: 16px;
}

.inv-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.inv-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
  .inv-row-2,
  .inv-row-3 {
    grid-template-columns: 1fr;
  }
}

/* ---- Individual field ---- */
.inv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
}

.inv-required-star {
  color: #2563eb;
  margin-left: 2px;
}

.inv-input,
.inv-select {
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

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

.inv-input:hover,
.inv-select:hover {
  border-color: #cbd5e1;
}

.inv-input:focus,
.inv-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px #dbeafe;
}

.inv-combobox {
  position: relative;
}

.inv-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  padding: 4px 0;
  list-style: none;
  margin: 0;
}

.inv-combobox-item {
  padding: 8px 12px;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
}

.inv-combobox-item:hover,
.inv-combobox-item.is-active {
  background: #f1f5f9;
}

/* ---- Tax note ---- */
.inv-tax-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.inv-tax-note svg {
  flex-shrink: 0;
}

.inv-field-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

/* ---- Privacy note ---- */
.inv-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px 16px;
}

.inv-note svg {
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 1px;
}

.inv-note p {
  font-size: 12px;
  color: #1d4ed8;
  line-height: 1.6;
  margin: 0;
}

/* ---- Form footer ---- */
.inv-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 16px;
}

.inv-required-note {
  font-size: 12px;
  color: #94a3b8;
}

.inv-required-note .star {
  color: #2563eb;
  font-weight: 600;
}

.inv-submit-btn {
  padding: 10px 28px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  line-height: 1.5;
}

.inv-submit-btn:hover {
  background: #1d4ed8;
}

.inv-submit-btn:active {
  background: #1e40af;
}

.inv-submit-btn:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.inv-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .inv-form-footer {
    flex-direction: column;
    align-items: center;
  }

  .inv-submit-btn {
    width: 100%;
    text-align: center;
  }
}

/* ---- Hidden utility ---- */
.inv-hidden {
  display: none;
}

/* ============================================================
   CONFIRMATION PAGE
   ============================================================ */

/* Success banner */
.inv-success-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

.inv-success-banner svg {
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 1px;
}

.inv-success-title {
  font-size: 14px;
  font-weight: 600;
  color: #166534;
  margin: 0;
}

.inv-success-subtitle {
  font-size: 12px;
  color: #16a34a;
  margin: 2px 0 0;
}

/* Invoice ID card */
.inv-id-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inv-id-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin: 0 0 4px;
}

.inv-id-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  margin: 0;
}

.inv-id-date {
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0 0;
}

.inv-id-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}

.inv-action-btn:hover {
  background: #f8fafc;
}

.inv-action-btn svg {
  color: #64748b;
}

.inv-action-btn svg.copied {
  color: #22c55e;
}

/* Wholesale next-step card (DM the Registration ID) */
.inv-next-step {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  border-radius: 12px;
  padding: 20px 24px;
}

.inv-next-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #9d174d;
  margin: 0 0 8px;
}

.inv-next-step-text {
  font-size: 13px;
  color: #831843;
  line-height: 1.6;
  margin: 0 0 14px;
}

.inv-next-step-id {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}

.inv-instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}

.inv-instagram-btn:hover {
  opacity: 0.9;
}

.inv-instagram-btn svg {
  flex-shrink: 0;
}

.inv-next-step-credit {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 13px;
  line-height: 1.6;
}

.inv-next-step-alt {
  font-size: 12px;
  color: #9d174d;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* Summary cards */
.inv-summary-body {
  padding: 8px 24px;
}

.inv-summary-row {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.inv-summary-row:last-child {
  border-bottom: none;
}

.inv-summary-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inv-summary-value {
  font-size: 14px;
  color: #1e293b;
  margin-top: 2px;
}

@media (min-width: 640px) {
  .inv-summary-row {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
  }

  .inv-summary-label {
    width: 160px;
    flex-shrink: 0;
  }

  .inv-summary-value {
    margin-top: 0;
  }
}

/* Confirmation footer */
.inv-confirm-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 24px;
}

@media (min-width: 640px) {
  .inv-confirm-footer {
    flex-direction: row;
  }
}

.inv-ref-note {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

@media (min-width: 640px) {
  .inv-ref-note {
    text-align: right;
  }
}

/* ---- Minimal footer ---- */
.inv-footer-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  font-size: 12px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.inv-footer-minimal a {
  color: #64748b;
  text-decoration: none;
}

.inv-footer-minimal a:hover {
  text-decoration: underline;
}

.inv-footer-copy {
  width: 100%;
  text-align: center;
}

@media (min-width: 640px) {
  .inv-footer-copy {
    width: auto;
  }
}

/* Stack of cards with gap */
.inv-confirm-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
