/* Parent Mode — clean, connected to Adventure Blue */
.parent-shell {
  background: #f4f8fc;
  border-radius: var(--radius-lg);
  min-height: 100%;
  padding: 18px;
  color: #1a3a5c;
}

.parent-shell h1, .parent-shell h2 {
  font-family: var(--font-display);
  margin: 0 0 12px;
}

.parent-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  min-height: 70vh;
}

.parent-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.parent-nav button {
  border: 0;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  font-weight: 800;
  color: var(--text-secondary);
  min-height: 48px;
}
.parent-nav button.active {
  background: #1a3a5c;
  color: #fff;
}

.parent-panel {
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(26,58,92,0.08);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat-box {
  background: #eef7ff;
  border-radius: 16px;
  padding: 14px;
}
.stat-box .label { font-size: 12px; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; }
.stat-box .value { font-family: var(--font-display); font-size: 28px; font-weight: 700; }

.approval-item, .list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eef5;
}
.approval-item .grow { flex: 1; }
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  min-height: 48px;
  cursor: pointer;
}
.btn-primary { background: #1a3a5c; color: #fff; }
.btn-success { background: #2ecc71; color: #fff; }
.btn-danger { background: #e76f51; color: #fff; }
.btn-ghost { background: #eef7ff; color: #1a3a5c; }

.parent-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  min-height: 48px;
  cursor: pointer;
  background: #1a3a5c;
  color: #fff;
}
.parent-btn--small { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.parent-btn--danger { background: #e76f51; }
.parent-btn--link { background: transparent; color: #1a3a5c; text-decoration: underline; }
.parent-input {
  border: 2px solid #d7e6f5;
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  width: 100%;
  margin-top: 6px;
  display: block;
}
.approval-row, .editor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e8eef5;
  flex-wrap: wrap;
}
.approval-name, .editor-row > span:first-child { flex: 1; font-weight: 800; }
.parent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.parent-tabs button.active {
  background: #1a3a5c;
  color: #fff;
}
.gate-question {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}
.gate-answer {
  font-size: 28px;
  text-align: center;
  width: 140px;
  margin: 12px auto;
  display: block;
  border: 2px solid #d7e6f5;
  border-radius: 12px;
  padding: 12px;
}
.parent-modal {
  position: fixed;
  inset: 0;
  background: rgba(12,28,48,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  padding: 20px;
}
.parent-modal form {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: min(480px, 100%);
  display: grid;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}
.form-grid input, .form-grid select, .form-grid textarea {
  border: 2px solid #d7e6f5;
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  background: #fff;
}
.form-grid .full { grid-column: 1 / -1; }

.gate-card input {
  font-size: 28px;
  text-align: center;
  width: 120px;
  margin: 12px auto;
  display: block;
}

.history-list {
  max-height: 55vh;
  overflow: auto;
}
.history-list div {
  padding: 10px 0;
  border-bottom: 1px solid #eef3f8;
  font-weight: 700;
}

.parent-form--wide {
  max-width: 560px;
  width: min(92vw, 560px);
}
.link-sources {
  grid-column: 1 / -1;
  border: 1px solid #d9e6f2;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}
.link-sources.is-hidden { display: none; }
.link-sources legend {
  font-weight: 800;
  padding: 0 6px;
}
.form-hint {
  margin: 4px 0 10px;
  font-weight: 700;
  color: var(--text-secondary, #5a6b7d);
  font-size: 0.92rem;
}
.link-checkboxes {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.link-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.savings-preview-wrap {
  margin: 8px 0 12px;
}
.savings-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  background: #eef6ff;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.05);
}
.savings-preview--icon {
  display: grid;
  place-items: center;
  font-size: 48px;
}

@media (max-width: 900px) {
  .parent-grid { grid-template-columns: 1fr; }
  .parent-nav { flex-direction: row; flex-wrap: wrap; }
  .stats-row, .form-grid { grid-template-columns: 1fr 1fr; }
}
