/* =====================
   Reset & Base
===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f4;
  --color-bg-tertiary: #f0ede8;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #6b7280;
  --color-text-tertiary: #9ca3af;
  --color-border: rgba(0,0,0,0.12);
  --color-border-hover: rgba(0,0,0,0.28);
  --color-border-focus: rgba(0,0,0,0.4);
  --color-info-bg: #eff6ff;
  --color-info-text: #1d4ed8;
  --color-success-text: #16a34a;
  --color-success-border: #bbf7d0;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}



body {
  font-family: var(--font);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

/* =====================
   App Container
===================== */
.app {
  max-width: 680px;
  margin: 0 auto;
}

/* =====================
   Page Header
===================== */
.page-header {
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.page-sub {
  font-size: 15px;
  color: var(--color-text-secondary);
}

/* =====================
   Sections
===================== */
.sec {
  background: var(--color-bg);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.sec-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1.25rem;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--color-border);
}

/* =====================
   Fields
===================== */
.field {
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.opt {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.sub-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 7px;
}

/* =====================
   Inputs & Textareas
===================== */
input[type="text"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  font-size: 14px;
  font-family: var(--font);
  padding: 9px 12px;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-border-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-tertiary);
}

/* =====================
   Radio & Checkbox Groups
===================== */
.rg,
.cg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rg label,
.cg label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 7px 13px;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}

.rg label:hover,
.cg label:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-border-hover);
}

.rg label:has(input:checked),
.cg label:has(input:checked) {
  background: var(--color-bg-secondary);
  border-color: var(--color-border-focus);
}

.rg input,
.cg input {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--color-text-primary);
  cursor: pointer;
}

/* =====================
   Reveal Input
===================== */
.reveal-input {
  display: none;
  margin-top: 10px;
  width: 100%;
  font-size: 14px;
  font-family: var(--font);
  padding: 9px 12px;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}

.reveal-input:focus {
  border-color: var(--color-border-focus);
}

textarea.reveal-input {
  min-height: 500px;
  line-height: 1.6;
}

/* =====================
   Social Media Rows
===================== */
.soc-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.soc-row:last-child {
  margin-bottom: 0;
}

.soc-row span {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.soc-row input {
  font-size: 14px;
  padding: 8px 12px;
}

/* =====================
   Drive Box
===================== */
.drive-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drive-box input {
  flex: 1;
}

.drive-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--color-info-bg);
  color: var(--color-info-text);
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* =====================
   Pages Builder
===================== */
.pages-sel {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.pages-sel select {
  flex: 1;
  cursor: pointer;
}

.pages-sel button,
.cust-row button {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}

.pages-sel button:hover,
.cust-row button:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-border-hover);
}

.cust-row {
  display: flex;
  gap: 8px;
}

.cust-row input {
  flex: 1;
}

/* =====================
   Tags
===================== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  min-height: 28px;
}

.no-pages {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

.tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px;
  background: var(--color-bg-secondary);
  border: 0.5px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-primary);
}

.tag button {
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  width: auto;
  transition: color 0.12s;
}

.tag button:hover {
  color: var(--color-text-primary);
}

/* =====================
   Submit Button
===================== */
.sub-btn {
  width: 100%;
  padding: 18px !important;
  font-size: 18px !important;
  line-height: 28px !important;
  font-weight: 600 !important;
  font-family: var(--font);
  border-radius: 10px;
  background: #0840bc !important;
  color:#fff !important;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
  box-shadow: 0px 42px 72px rgba(10, 65, 188, 0) !important;


}

.sub-btn:hover {
 opacity: .9 !important;
}

/* =====================
   Document View
===================== */
#doc-view {
  display: none;
}

.back-btn {
  font-size: 13px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
  margin-bottom: 1.25rem;
  display: block;
  transition: color 0.12s;
}

.back-btn:hover {
  color: var(--color-text-primary);
}

.action-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.action-btn {
  flex: 1;
  padding: 11px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.action-btn:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-border-hover);
}

.action-btn.copied {
  color: var(--color-success-text);
  border-color: var(--color-success-border);
}

/* =====================
   Document Output Card
===================== */
.doc-wrap {
  background: var(--color-bg);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.doc-brand {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.doc-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 0.5px solid var(--color-border);
}

.doc-sec {
  margin-bottom: 1.5rem;
}

.doc-sec h2 {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}

.doc-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--color-border);
}

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

.doc-key {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.doc-val {
  font-size: 13px;
  color: var(--color-text-primary);
  word-break: break-word;
}

.doc-val.empty {
  color: var(--color-text-tertiary);
}

/* =====================
   Responsive
===================== */
@media (max-width: 520px) {
  body {
    padding: 1rem 0.75rem 3rem;
  }

  .sec {
    padding: 1.25rem;
  }

  .doc-row {
    grid-template-columns: 130px 1fr;
  }

  .soc-row {
    grid-template-columns: 90px 1fr;
  }

  .action-bar {
    flex-direction: column;
  }
}
