:root{
  --primary-blue: #1a73e8;
  --primary-blue-hover: #1557b0;
  --primary-blue-light: #e8f0fe;
  --secondary-gray: #5f6368;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-disabled: #9aa0a6;
  --background: #f8f9fa;
  --surface: #ffffff;
  --border: #dadce0;
  --border-focus: #1a73e8;
  --success: #137333;
  --success-light: #e6f4ea;
  --error: #d93025;
  --error-light: #fce8e6;
  --warning: #f9ab00;
  --warning-light: #fef7e0;
  --shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-hover: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Google Sans', 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-header h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

.app-header h1:before {
  content: '📄';
  margin-right: 12px;
  font-size: 20px;
}
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar {
  width: 240px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-blue);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

#exportBtn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

#exportBtn:hover {
  background: var(--primary-blue-hover);
  box-shadow: var(--shadow-hover);
}
button, .import-label {
  background: var(--primary-blue);
  color: #fff;
  border: 0;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  font-weight: 500;
  font-size: 14px;
  font-family: inherit;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover, .import-label:hover {
  background: var(--primary-blue-hover);
  box-shadow: var(--shadow-hover);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.danger {
  background: var(--error);
}

.danger:hover {
  background: #b52d20;
}
#saveBtn {
  background: var(--success);
  transition: all 0.3s ease;
}

#saveBtn:hover {
  background: #0d652d;
}

#saveBtn.saving {
  background: var(--warning);
  transform: scale(0.95);
  animation: pulse 1s infinite;
}

#saveBtn.saved {
  background: var(--success);
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(19, 115, 51, 0.4);
}

#saveBtn.error {
  background: var(--error);
  animation: shake 0.5s ease-in-out;
}

#saveBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--text-disabled);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
#printBtn {
  background: var(--secondary-gray);
}

#printBtn:hover {
  background: #4a4a4a;
}

#skipToEmptyBtn {
  background: var(--primary-blue);
}

#skipToEmptyBtn:hover {
  background: var(--primary-blue-hover);
}

#resetBtn {
  background: var(--error);
}

#resetBtn:hover {
  background: #b52d20;
}

#exportBtn {
  background: var(--secondary-gray);
}

#exportBtn:hover {
  background: #4a4a4a;
}

#shortcutsBtn {
  background: var(--secondary-gray);
}

#shortcutsBtn:hover {
  background: #4a4a4a;
}

/* Export Dropdown */
.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  min-width: 160px;
  margin-top: 4px;
  overflow: hidden;
}

.export-dropdown.active .export-menu {
  display: block;
}

.export-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-primary);
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 0;
  box-shadow: none;
  transition: background-color 0.15s ease;
  min-height: auto;
  justify-content: flex-start;
}

.export-menu button:hover {
  background: var(--primary-blue-light);
  transform: none;
  box-shadow: none;
}

.export-menu button:first-child {
  border-radius: 0;
}

.export-menu button:last-child {
  border-radius: 0;
}
.firebase-status{background:rgba(0,0,0,0.2);color:#fff;padding:8px 12px;border-radius:8px;font-size:12px;font-weight:500;white-space:nowrap}
.firebase-status.connected{background:rgba(5,150,105,0.2);color:#10b981}
.firebase-status.error{background:rgba(220,38,38,0.2);color:#ef4444}

/* User Authentication Styles */
.user-section{display:flex;align-items:center;gap:12px}
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-blue-light);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.user-info:hover {
  background: #e1eaf7;
  box-shadow: var(--shadow);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--primary-blue);
}

.user-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  min-width: 120px;
  display: none;
  overflow: hidden;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown button {
  width: 100%;
  background: none;
  color: var(--text-primary);
  border: none;
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  border-radius: 0;
  box-shadow: none;
  min-height: auto;
  justify-content: flex-start;
}

.user-dropdown button:hover {
  background: var(--background);
  box-shadow: none;
}
.auth-buttons{display:flex;gap:8px}
#signInBtn{background:linear-gradient(135deg, #4285f4 0%, #34a853 100%);color:white;font-size:12px;padding:8px 12px}
#signInBtn:hover{background:linear-gradient(135deg, #3367d6 0%, #137333 100%)}
#signOutBtn{background:rgba(220,38,38,0.8);color:white;font-size:12px;padding:8px 12px}
#signOutBtn:hover{background:rgba(185,28,28,0.9)}

.user-dropdown #signOutBtn {
  background: none;
  color: var(--error);
  font-size: 13px;
  padding: 10px 16px;
  text-align: left;
  border-radius: 0;
  box-shadow: none;
  min-height: auto;
  justify-content: flex-start;
}

.user-dropdown #signOutBtn:hover {
  background: var(--error-light);
  color: var(--error);
  box-shadow: none;
}
#shareBtn{background:linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);color:white}
#shareBtn:hover{background:linear-gradient(135deg, #0891b2 0%, #0e7490 100%)}

/* Shared Form Banner */
.shared-form-banner{background:linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);border-bottom:2px solid #3b82f6;padding:12px 20px;color:#1e40af;font-weight:500;position:sticky;top:0;z-index:25;box-shadow:0 2px 8px rgba(59,130,246,0.2)}
.shared-info{display:flex;justify-content:space-between;align-items:center;max-width:1200px;margin:0 auto}
.close-banner{background:none;border:none;color:#1e40af;font-size:20px;cursor:pointer;padding:0;width:24px;height:24px;border-radius:4px}
.close-banner:hover{background:rgba(59,130,246,0.1)}
.container {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.sidebar {
  width: 280px;
  margin-right: 0;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: sticky;
  top: 80px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  margin: 0;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 400;
  position: relative;
  min-height: 56px;
  gap: 0;
  justify-content: flex-start;
}


.nav-btn:hover {
  background: var(--primary-blue-light);
  color: var(--text-primary);
  transform: none;
}

.nav-btn.active {
  background: var(--primary-blue-light);
  color: var(--primary-blue);
  border-left: 4px solid var(--primary-blue);
  font-weight: 500;
}

.nav-btn.active:before {
  background: var(--primary-blue);
  color: white;
}

.nav-btn:last-child {
  border-bottom: none;
}
.nav-btn .nav-text {
  flex: 1;
  min-width: 0;
}

.completion-indicator {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--border);
  color: var(--text-primary);
  border: 1px solid var(--border);
  min-width: 45px;
  text-align: center;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-btn.section-empty .completion-indicator {
  background: var(--error-light);
  color: var(--error);
  border-color: var(--error);
}

.nav-btn.section-partial .completion-indicator {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning);
}

.nav-btn.section-complete .completion-indicator {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}

.nav-btn.section-complete:before {
  content: '✓';
  background: var(--success);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.nav-btn.section-complete .completion-indicator {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.nav-btn:before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  width: 28px;
  height: 28px;
  min-width: 28px;
  text-align: center;
  color: white;
  background: var(--text-secondary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 16px;
}

/* Navigation icons - using text instead of emojis */
.nav-btn[data-target="personal1"]:before{content:'1'}
.nav-btn[data-target="personal2"]:before{content:'2'}
.nav-btn[data-target="travel"]:before{content:'3'}
.nav-btn[data-target="companions"]:before{content:'4'}
.nav-btn[data-target="addrphone"]:before{content:'5'}
.nav-btn[data-target="passport"]:before{content:'6'}
.nav-btn[data-target="uscontact"]:before{content:'7'}
.nav-btn[data-target="family"]:before{content:'8'}
.nav-btn[data-target="workpresent"]:before{content:'9'}
.nav-btn[data-target="workprevious"]:before{content:'10'}
.nav-btn[data-target="workadditional"]:before{content:'11'}
.nav-btn[data-target="security1"]:before{content:'12'}
.nav-btn[data-target="security2"]:before{content:'13'}
.nav-btn[data-target="security3"]:before{content:'14'}
.nav-btn[data-target="security4"]:before{content:'15'}
.nav-btn[data-target="security5"]:before{content:'16'}
.nav-btn[data-target="student"]:before{content:'17'}
.nav-btn[data-target="location"]:before{content:'18'}
.nav-btn[data-target="preview"]:before{content:'19'}
.content {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-section {
  display: none;
  padding: 32px;
  min-height: 500px;
}

.form-section.active {
  display: block;
}

.form-section h2 {
  background: var(--surface);
  margin: -32px -32px 32px -32px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  position: relative;
}

.form-section h2:before {
  margin-right: 16px;
  font-size: 18px;
  color: var(--primary-blue);
  font-weight: 500;
}
/* Section-specific icons - using text instead of emojis */
.form-section[data-section="personal1"] h2:before{content:'1'}
.form-section[data-section="personal2"] h2:before{content:'2'}
.form-section[data-section="travel"] h2:before{content:'3'}
.form-section[data-section="companions"] h2:before{content:'4'}
.form-section[data-section="addrphone"] h2:before{content:'5'}
.form-section[data-section="passport"] h2:before{content:'6'}
.form-section[data-section="uscontact"] h2:before{content:'7'}
.form-section[data-section="family"] h2:before{content:'8'}
.form-section[data-section="workpresent"] h2:before{content:'9'}
.form-section[data-section="workprevious"] h2:before{content:'10'}
.form-section[data-section="workadditional"] h2:before{content:'11'}
.form-section[data-section="security1"] h2:before{content:'12'}
.form-section[data-section="security2"] h2:before{content:'13'}
.form-section[data-section="security3"] h2:before{content:'14'}
.form-section[data-section="security4"] h2:before{content:'15'}
.form-section[data-section="security5"] h2:before{content:'16'}
.form-section[data-section="student"] h2:before{content:'17'}
.form-section[data-section="location"] h2:before{content:'18'}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.grid .full {
  grid-column: 1/-1;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 8px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 16px;
}

label .label-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

label .help-tooltip {
  display: inline-block;
  margin-left: 0;
  vertical-align: middle;
  position: relative;
}

label .help-tooltip .help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--primary-blue);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  user-select: none;
  vertical-align: middle;
}

label:hover {
  color: var(--text-primary);
}

input, select, textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: var(--surface);
  transition: all 0.2s ease;
  box-shadow: none;
  font-family: inherit;
  color: var(--text-primary);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.1);
}

input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

input[required], select[required], textarea[required] {
  border-left: 3px solid var(--warning);
}

input.valid {
  border-left: 3px solid var(--success);
  background-color: var(--success-light);
}

input.invalid {
  border-left: 3px solid var(--error);
  background-color: var(--error-light);
}
.validation-message {
  font-size: 12px;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  font-weight: 400;
}

.validation-message.valid {
  color: var(--success);
  background: var(--success-light);
}

.validation-message.invalid {
  color: var(--error);
  background: var(--error-light);
}

/* Tooltip System */
.help-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  user-select: none;
}

.help-icon:hover {
  background: #2563eb;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  width: 280px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

.help-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

.tooltip-example {
  background: #374151;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 6px;
  font-family: monospace;
  font-size: 12px;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  background: var(--surface);
  box-shadow: none;
  margin-bottom: 24px;
}

fieldset:hover {
  border-color: var(--primary-blue);
}

legend {
  padding: 0 12px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border-radius: 4px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.inline {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.inline label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
  margin-bottom: 0;
}

.inline label:hover {
  background: var(--primary-blue-light);
}

.dob {
  display: flex;
  gap: 16px;
  align-items: end;
}

.dob label {
  flex: 1;
  min-width: 100px;
}
.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nav .next {
  background: var(--primary-blue);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: none;
  min-height: 40px;
}

.nav .next:hover {
  background: var(--primary-blue-hover);
  box-shadow: var(--shadow-hover);
}

.nav .back {
  background: var(--secondary-gray);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: none;
  min-height: 40px;
}

.nav .back:hover {
  background: #4a4a4a;
  box-shadow: var(--shadow-hover);
}
h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}

h3 {
  margin: 24px 0 16px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}
.preview-header {
  margin-bottom: 32px;
  text-align: center;
  padding: 24px;
  background: var(--primary-blue-light);
  border-radius: 8px;
  border: 1px solid var(--primary-blue);
}

.preview-header h2 {
  color: var(--primary-blue);
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 400;
}

.preview-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}
.preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
  align-items: stretch;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 8px;
  font-family: 'Google Sans', sans-serif;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-filled {
  color: var(--success);
}

.stat-empty {
  color: var(--error);
}

.stat-confirmed {
  color: var(--primary-blue);
}
.json-section {
  margin-top: 32px;
}

.json-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.json-details summary {
  padding: 16px 20px;
  background: var(--primary-blue-light);
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--primary-blue);
}

.json-details summary h3 {
  margin: 0;
  color: var(--primary-blue);
  font-size: 16px;
  font-weight: 500;
}

.json-details[open] summary {
  border-bottom: 1px solid var(--border);
}
.summary {
  background: #1a1a1a;
  color: #e8eaed;
  padding: 20px;
  border-radius: 0;
  max-height: 400px;
  overflow: auto;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-family: 'Roboto Mono', monospace;
}

.kv-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.group .kv-list {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.kv-row {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
  transition: background-color 0.15s ease;
}

.group .kv-row {
  padding: 16px 20px;
}

.group .kv-row:first-child {
  border-top: none;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-row:hover {
  background-color: var(--primary-blue-light);
}
.kv-row.empty-value {
  background-color: var(--error-light);
  border-left: 4px solid var(--error);
}

.kv-row.has-value.kv-row:hover {
  background-color: var(--primary-blue-light);
}

.kv-key {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 2px;
}

.kv-val {
  word-break: break-word;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  padding-top: 2px;
}

.empty-text {
  color: var(--text-disabled);
  font-style: italic;
  font-size: 13px;
}
.kv-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-confirmed {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  min-height: auto;
}

.btn-confirmed:hover {
  background: #0d652d;
  transform: translateY(-1px);
}

.btn-correct {
  background: var(--primary-blue);
  color: white;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  min-height: auto;
}

.btn-correct:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-1px);
}

.btn-edit {
  background: var(--primary-blue);
  color: white;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  min-height: auto;
}

.btn-edit:hover {
  background: var(--primary-blue-hover);
}

.copy-one {
  background: var(--secondary-gray);
  color: white;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  min-height: auto;
}

.copy-one:hover {
  background: #4a4a4a;
}
.summary-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.group {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}

.group > h4 {
  margin: 0;
  padding: 16px 20px;
  background: var(--primary-blue-light);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 50px;
}

.group > h4:before {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--primary-blue);
  border-radius: 50%;
  flex-shrink: 0;
}
.group:first-child > h4:before{content:'1'}
.group:nth-child(2) > h4:before{content:'2'}
.group:nth-child(3) > h4:before{content:'3'}
.group:nth-child(4) > h4:before{content:'4'}
.group:nth-child(5) > h4:before{content:'5'}
.group:nth-child(6) > h4:before{content:'6'}
.group:nth-child(7) > h4:before{content:'7'}
.group:nth-child(8) > h4:before{content:'8'}
.group:nth-child(9) > h4:before{content:'9'}
.group:nth-child(10) > h4:before{content:'10'}
.group:nth-child(11) > h4:before{content:'11'}
.group:nth-child(12) > h4:before{content:'12'}
.group:nth-child(13) > h4:before{content:'13'}
.group:nth-child(14) > h4:before{content:'14'}
.group:nth-child(15) > h4:before{content:'15'}
.group:nth-child(16) > h4:before{content:'16'}
.group:nth-child(17) > h4:before{content:'17'}
.group:nth-child(18) > h4:before{content:'18'}
.repeat {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.repeat .items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.repeat .item {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  transition: all 0.2s ease;
  position: relative;
}

.repeat .item:hover {
  border-color: var(--primary-blue);
  background: var(--primary-blue-light);
  box-shadow: var(--shadow);
}

.remove-row {
  background: var(--error);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: auto;
}

.add-row {
  align-self: flex-start;
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
  box-shadow: var(--shadow);
  margin-top: 12px;
  min-height: 40px;
}

.remove-row:hover {
  background: #b52d20;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.add-row:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.add-row:before {
  content: '+ ';
  margin-right: 4px;
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  
  .sidebar {
    width: 100%;
    margin-right: 0;
  }
  
  .sidebar ul {
    display: flex;
    overflow: auto;
    gap: 0;
    padding-bottom: 0;
    border-radius: 8px;
    flex-wrap: nowrap;
  }
  
  .nav-btn {
    white-space: nowrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 12px;
    min-height: 48px;
  }
  
  .nav-btn:before {
    width: 24px;
    height: 24px;
    font-size: 11px;
    margin-right: 12px;
  }
  
  .nav-btn:last-child {
    border-right: none;
  }
  
  .nav-btn:hover {
    transform: none;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-section {
    padding: 24px;
    min-height: 400px;
  }
  
  .form-section h2 {
    margin: -24px -24px 24px -24px;
    padding: 20px 24px;
    font-size: 20px;
  }
  
  .kv-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    align-items: stretch;
  }
  
  .kv-key {
    font-size: 12px;
    margin-bottom: 6px;
    padding-top: 0;
  }
  
  .kv-val {
    padding-top: 0;
    margin-bottom: 8px;
  }
  
  .kv-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  
  .preview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .preview-header {
    padding: 20px;
  }
  
  .group {
    margin: 16px 0;
  }
  
  .group > h4 {
    padding: 14px 16px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .group > h4:before {
    width: 20px;
    height: 20px;
    font-size: 11px;
    margin-right: 10px;
  }
  
  .group .kv-row {
    padding: 12px 16px;
  }
  
  .repeat .item {
    padding: 16px;
    padding-top: 48px;
  }
  
  .dob {
    flex-direction: column;
    gap: 12px;
  }
  
  .inline {
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 8px 12px;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .app-header-left {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .app-header h1 {
    font-size: 18px;
    text-align: center;
  }
  
  .progress-container {
    align-items: center;
  }
  
  .progress-bar {
    width: 200px;
  }
  
  .progress-text {
    font-size: 12px;
    text-align: center;
  }
  
  .actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  
  .user-section {
    order: -1;
    align-self: center;
  }
  
  .user-info {
    font-size: 14px;
  }
  
  .user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  button, .import-label {
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  .export-dropdown .export-menu {
    right: 0;
    left: auto;
    min-width: 120px;
  }
  
  /* Stack sidebar navigation horizontally on mobile */
  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .sidebar ul li {
    flex: 1;
    min-width: 120px;
  }
  
  .sidebar .nav-btn {
    padding: 8px 4px;
    font-size: 11px;
    text-align: center;
  }
  
  /* Form improvements for mobile */
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .dob {
    flex-direction: column;
    gap: 8px;
  }
  
  .dob label {
    flex: 1;
  }
  
  input, select, textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .inline {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav button {
    width: 100%;
  }
  
  /* Better touch targets for mobile */
  .repeat .add-row,
  .repeat .remove-row {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
  }
  
  /* Conditional containers */
  .conditional-container {
    padding: 12px;
    margin-top: 12px;
  }
  
  /* Preview section mobile improvements */
  .kv-section {
    margin-bottom: 20px;
  }
  
  .kv-section h3 {
    font-size: 16px;
    padding: 8px 0;
  }
  
  .kv-item {
    padding: 8px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .kv-key {
    font-size: 13px;
    min-width: auto;
  }
  
  .kv-value {
    font-size: 14px;
    word-break: break-word;
  }
  
  .kv-actions {
    margin-top: 8px;
  }
  
  .copy-one {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Form field improvements */
  fieldset {
    padding: 12px;
  }
  
  legend {
    font-size: 14px;
    padding: 0 8px;
  }
  
  /* Radio button and checkbox improvements */
  .inline label {
    padding: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  input[type="radio"],
  input[type="checkbox"] {
    min-width: 18px;
    min-height: 18px;
  }
  
  /* Dropdown improvements */
  .export-dropdown {
    position: relative;
  }
  
  .export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    min-width: 140px;
  }
  
  .export-menu button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
  }
  
  .export-menu button:hover {
    background: var(--background);
  }
  
  /* Hide keyboard shortcuts on mobile */
  .shortcut-hint {
    display: none;
  }
}

/* Bottom-right shortcuts hint */
.shortcut-hint {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--text-primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--warning);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}

.shortcut-info {
  opacity: 0.95;
  display: none;
}

.shortcut-hint.active .shortcut-info {
  display: inline;
}

/* Sign-in Page Styles */
.sign-in-page {
  min-height: 100vh;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sign-in-container {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sign-in-header {
  text-align: center;
  padding: 40px 40px 20px;
  background: var(--primary-blue-light);
  border-bottom: 1px solid var(--border);
}

.sign-in-header h1 {
  font-size: 32px;
  margin: 0 0 10px;
  color: var(--primary-blue);
  font-weight: 500;
  font-family: 'Google Sans', sans-serif;
}

.sign-in-header p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.sign-in-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 500px;
}

.feature-list {
  padding: 40px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-icon {
  font-size: 24px;
  background: var(--primary-blue);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  font-family: 'Google Sans', sans-serif;
}

.feature-item h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 6px;
  font-family: 'Google Sans', sans-serif;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.sign-in-actions {
  padding: 40px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sign-in-actions h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
  text-align: center;
}

.sign-in-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 32px;
  text-align: center;
}

.sign-in-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.sign-in-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sign-in-btn.primary {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
}

.sign-in-btn.primary:hover {
  background: linear-gradient(135deg, #3367d6 0%, #137333 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(66,133,244,0.3);
}

.sign-in-btn.secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

.sign-in-btn.secondary:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(107,114,128,0.3);
}

.btn-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.btn-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.btn-subtitle {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 400;
}

/* Email Sign-in Styles */
.email-signin-section {
  margin-top: 20px;
}

.signin-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  z-index: 1;
}

.signin-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
  z-index: 1;
}

.signin-divider span {
  position: relative;
  background: white;
  padding: 0 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  z-index: 2;
  display: inline-block;
}

.email-signin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.password-help {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.forgot-password-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.forgot-password-link {
  background: none;
  border: none;
  color: var(--primary-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  font-family: inherit;
}

.forgot-password-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: none;
  background: none;
}

.email-auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-radius: 8px;
  background: #f1f5f9;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.auth-tab.active {
  background: white;
  color: var(--primary-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.email-signin-form input {
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: white;
  transition: all 0.2s ease;
}

.email-signin-form input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.email-signin-form input::placeholder {
  color: #94a3b8;
}

.email-btn {
  margin-top: 8px;
}

.auth-toggle {
  text-align: center;
  margin-top: 16px;
}

.auth-toggle p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin: 0;
  font-family: inherit;
}

.link-btn:hover {
  color: var(--primary-blue-hover);
  text-decoration: none;
}

/* Conditional Field Styles */
.conditional-container {
  margin-top: 16px;
  padding: 16px;
  background: var(--primary-blue-light);
  border-radius: 6px;
  border-left: 4px solid var(--primary-blue);
  transition: all 0.3s ease;
}

.conditional-container.show {
  display: block !important;
}

.conditional-container.hide {
  display: none !important;
}

.privacy-note {
  text-align: center;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.privacy-note p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}


/* Hide app header when sign-in page is visible */
body:has(.sign-in-page:not([style*="display: none"])) .app-header {
  display: none !important;
}

/* Mobile responsive for sign-in page */
@media (max-width: 768px) {
  .sign-in-content {
    grid-template-columns: 1fr;
  }
  
  .feature-list {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 30px 20px;
  }
  
  .sign-in-actions {
    padding: 30px 20px;
  }
  
  .sign-in-header {
    padding: 30px 20px 20px;
  }
  
  .sign-in-header h1 {
    font-size: 26px;
  }
  
  .feature-item {
    margin-bottom: 20px;
  }
  
  .sign-in-container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
  
  .sign-in-page {
    padding: 15px;
  }
  
  .sign-in-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .btn-title {
    font-size: 14px;
  }
  
  .btn-subtitle {
    font-size: 12px;
  }
  
  .email-signin-form input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .password-help {
    font-size: 11px;
  }
  
  .email-auth-tabs {
    margin-bottom: 16px;
  }
  
  .auth-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .signin-divider {
    margin: 20px 0;
  }
  
  .signin-divider span {
    padding: 0 12px;
    font-size: 13px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .sign-in-page {
    padding: 10px;
  }
  
  .sign-in-header {
    padding: 20px 15px;
    text-align: center;
  }
  
  .sign-in-header h1 {
    font-size: 22px;
  }
  
  .sign-in-header p {
    font-size: 14px;
  }
  
  .sign-in-actions {
    padding: 20px 15px;
  }
  
  .feature-list {
    padding: 20px 15px;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .feature-icon {
    font-size: 28px;
    align-self: center;
  }
  
  .sign-in-btn {
    padding: 16px;
    flex-direction: row;
    text-align: left;
    gap: 12px;
  }
  
  .btn-icon {
    font-size: 18px;
    min-width: 24px;
  }
  
  .btn-title {
    font-size: 15px;
    margin-bottom: 2px;
  }
  
  .btn-subtitle {
    font-size: 12px;
  }
  
  .email-signin-form {
    gap: 12px;
  }
  
  .email-signin-form input {
    padding: 14px;
    font-size: 16px;
  }
  
  .signin-divider {
    margin: 16px 0;
  }
  
  .signin-divider span {
    padding: 0 10px;
    font-size: 12px;
  }
  
  .email-auth-tabs {
    margin-bottom: 12px;
  }
  
  .auth-tab {
    padding: 6px 8px;
    font-size: 12px;
  }
}

/* Print styles - Show all form sections when printing */
@media print {
  /* Hide elements that shouldn't be printed */
  .app-header,
  .sidebar,
  .nav,
  button,
  .btn-correct,
  .btn-edit,
  .copy-one,
  .kv-actions,
  .summary-actions,
  .firebase-status,
  .user-section,
  .auth-buttons,
  .admin-controls,
  .form-actions,
  .add-row,
  .remove-row {
    display: none !important;
  }
  
  /* Reset layout for printing */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  
  .content {
    background: white !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  
  /* Show ALL form sections when printing */
  .form-section {
    display: block !important;
    padding: 20px !important;
    min-height: auto !important;
    page-break-inside: avoid;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
  }
  
  /* Style section headers for print */
  .form-section h2 {
    background: #f5f5f5 !important;
    margin: -20px -20px 15px -20px !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #ccc !important;
    font-size: 16pt !important;
    font-weight: bold !important;
    color: black !important;
    page-break-after: avoid;
  }
  
  /* Adjust form elements for print */
  .grid {
    display: block !important;
    margin-bottom: 15px !important;
  }
  
  label {
    display: block !important;
    margin-bottom: 10px !important;
    font-size: 11pt !important;
    font-weight: bold !important;
    color: black !important;
  }
  
  input, select, textarea {
    display: block !important;
    width: 100% !important;
    padding: 5px !important;
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    font-size: 11pt !important;
    background: white !important;
    box-shadow: none !important;
    margin-top: 3px !important;
    max-width: 400px !important;
  }
  
  /* Style fieldsets for print */
  fieldset {
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    padding: 10px !important;
    background: white !important;
    box-shadow: none !important;
    margin-bottom: 15px !important;
  }
  
  legend {
    padding: 2px 8px !important;
    font-weight: bold !important;
    color: black !important;
    background: white !important;
    border-radius: 0 !important;
    font-size: 11pt !important;
  }
  
  /* Style repeatable items for print */
  .repeat .item {
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    padding: 10px !important;
    background: white !important;
    margin-bottom: 10px !important;
    position: relative !important;
  }
  
  /* Inline elements for print */
  .inline {
    display: block !important;
    gap: 5px !important;
  }
  
  .inline label {
    display: block !important;
    margin-bottom: 5px !important;
  }
  
  /* Date of birth styling */
  .dob {
    display: block !important;
  }
  
  .dob label {
    display: inline-block !important;
    margin-right: 20px !important;
    margin-bottom: 10px !important;
  }
  
  /* Preview section special handling */
  .form-section[data-section="preview"] {
    display: none !important;
  }
  
  /* Page breaks */
  .form-section:nth-child(4n) {
    page-break-after: always;
  }
}

/* Admin Dashboard Styles */
/* Ensure admin section is visible when active */
.form-section[data-section="admin"].active {
  display: block !important;
}

/* Override print CSS hiding of admin elements */
.form-section[data-section="admin"] .admin-controls {
  display: flex !important;
}

.form-section[data-section="admin"] .form-actions {
  display: flex !important;
}

.form-section[data-section="admin"] button {
  display: inline-block !important;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-header h2 {
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.admin-header p {
  color: var(--text-secondary);
  margin: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--surface);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}

.admin-stat-card .stat-number {
  font-size: 32px;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.admin-stat-card .stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary-blue);
  color: white;
}

.admin-btn:hover {
  background: var(--primary-blue-hover);
  box-shadow: var(--shadow-hover);
}

.admin-btn.danger {
  background: var(--error);
}

.admin-btn.danger:hover {
  background: #b52d20;
}

.admin-content h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 18px;
}

.admin-forms-list {
  display: grid;
  gap: 16px;
}

.admin-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.admin-form-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-blue);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.form-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.form-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary-blue);
  color: white;
}

.form-actions button:hover {
  opacity: 0.9;
}

.form-actions button.danger {
  background: var(--error);
}

.form-details {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.form-details span {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--background);
  padding: 4px 8px;
  border-radius: 12px;
}

.form-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

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

.form-preview strong {
  color: var(--text-primary);
}

.no-forms {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
}

.no-forms h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-style: italic;
}


