:root {
  --ew-ink: #172033;
  --ew-muted: #657087;
  --ew-line: #d9deea;
  --ew-soft: #f5f7fb;
  --ew-blue: #175cd3;
  --ew-blue-dark: #0d47a1;
  --ew-green: #067647;
  --ew-red: #b42318;
  --ew-radius: 14px;
}

.ew-wrap { max-width: 980px; margin: 24px auto; color: var(--ew-ink); font-size: 15px; line-height: 1.7; }
.ew-wrap * { box-sizing: border-box; }
.ew-public { max-width: 900px; }
.ew-form, .ew-card { background: #fff; border: 1px solid var(--ew-line); border-radius: var(--ew-radius); box-shadow: 0 10px 30px rgba(25, 39, 70, .06); }
.ew-form { overflow: hidden; }
.ew-form-header { padding: 34px 38px; background: linear-gradient(135deg, #102a56, #175cd3); color: #fff; }
.ew-form-header h2 { margin: 0 0 8px; color: #fff; font-size: clamp(25px, 4vw, 36px); line-height: 1.25; }
.ew-form-header p { margin: 0; opacity: .94; }
.ew-kicker { display: block; margin: 0 0 6px !important; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.ew-security-note { margin: 28px 34px 0; padding: 18px 20px; background: #eef6ff; border: 1px solid #b6d4fe; border-left: 5px solid var(--ew-blue); border-radius: 10px; }
.ew-security-note strong { color: #113d75; }
.ew-security-note p { margin: 5px 0 0; color: #294d77; }
.ew-section { padding: 28px 34px; border-bottom: 1px solid var(--ew-line); }
.ew-section:last-of-type { border-bottom: 0; }
.ew-section h3 { margin: 0 0 18px; font-size: 20px; color: var(--ew-ink); }
.ew-grid { display: grid; gap: 18px; }
.ew-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ew-span-2 { grid-column: 1 / -1; }
.ew-form label { display: block; font-weight: 650; color: #29344a; }
.ew-form label > span { display: block; margin-bottom: 6px; }
.ew-form em { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 4px; background: #fee4e2; color: var(--ew-red); font-size: 11px; font-style: normal; vertical-align: 1px; }
.ew-form input, .ew-form select, .ew-form textarea, .ew-settings-form input, .ew-settings-form textarea {
  width: 100%; min-height: 45px; margin: 0; padding: 10px 12px; border: 1px solid #bfc7d7; border-radius: 8px; background: #fff; color: var(--ew-ink); font: inherit; box-shadow: inset 0 1px 2px rgba(16, 24, 40, .03);
}
.ew-form textarea, .ew-settings-form textarea { min-height: 92px; resize: vertical; }
.ew-form input:focus, .ew-form select:focus, .ew-form textarea:focus, .ew-settings-form input:focus, .ew-settings-form textarea:focus { border-color: var(--ew-blue); outline: 3px solid rgba(23, 92, 211, .14); box-shadow: none; }
.ew-form small, .ew-settings-form small { display: block; margin-top: 5px; color: var(--ew-muted); font-weight: 400; }
.ew-password-row { display: flex; gap: 8px; align-items: stretch; }
.ew-password-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; }
.ew-password-row .ew-toggle-secret { flex: 0 0 auto; min-width: 74px; padding: 0 12px; border: 1px solid #bfc7d7; border-radius: 8px; background: var(--ew-soft); color: #27364f; cursor: pointer; }
.ew-dependent { margin: 13px 0; border: 1px solid var(--ew-line); border-radius: 10px; background: #fff; }
.ew-dependent summary { padding: 14px 16px; cursor: pointer; font-weight: 750; background: var(--ew-soft); border-radius: 10px; }
.ew-dependent[open] summary { border-bottom: 1px solid var(--ew-line); border-radius: 10px 10px 0 0; }
.ew-dependent > .ew-grid { padding: 20px; }
.ew-muted { color: var(--ew-muted); }
.ew-consent { background: #fafbfe; }
.ew-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.ew-check input { width: 19px !important; min-height: 19px !important; margin-top: 4px !important; flex: 0 0 auto; }
.ew-submit { display: block; width: calc(100% - 68px); margin: 26px 34px 34px; padding: 15px 20px; border: 0; border-radius: 9px; background: var(--ew-blue); color: #fff; font-size: 17px; font-weight: 750; cursor: pointer; transition: .18s ease; }
.ew-submit:hover { background: var(--ew-blue-dark); transform: translateY(-1px); }
.ew-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.ew-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.ew-card { margin: 18px 0; padding: 24px; }
.ew-card h2, .ew-card h3 { margin-top: 0; }
.ew-toolbar, .ew-record-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ew-record-head { padding: 22px 26px; }
.ew-record-head h2 { margin: 0; }
.ew-status { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e8eef8; font-size: 12px; font-weight: 750; }
.ew-status-reviewed, .ew-status-exported, .ew-status-completed { background: #dcfae6; color: var(--ew-green); }
.ew-table-wrap { overflow-x: auto; }
.ew-table { min-width: 720px; }
.ew-admin-form { box-shadow: none; }
.ew-hr-section { background: #f8fbff; }
.ew-actions { padding: 24px 34px; background: #f5f7fb; border-top: 1px solid var(--ew-line); }
.ew-export-card { border-left: 5px solid var(--ew-blue); }
.ew-danger-zone { border-left: 5px solid var(--ew-red); }
.ew-export-ready { padding: 14px 18px !important; border-left: 5px solid var(--ew-green) !important; }
.ew-settings-form label { display: block; margin-bottom: 18px; font-weight: 650; }

.ew-notice { max-width: 980px; margin: 18px auto; padding: 13px 17px; border: 1px solid; border-radius: 9px; background: #fff; }
.ew-notice p { margin: 0; }
.ew-notice-success { border-color: #75e0a7; background: #ecfdf3; color: #05603a; }
.ew-notice-error { border-color: #fda29b; background: #fff1f0; color: #912018; }

@media (max-width: 720px) {
  .ew-wrap { margin: 12px auto; }
  .ew-form-header, .ew-section { padding-left: 20px; padding-right: 20px; }
  .ew-security-note { margin-left: 20px; margin-right: 20px; }
  .ew-grid-2 { grid-template-columns: 1fr; }
  .ew-span-2 { grid-column: auto; }
  .ew-submit { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .ew-toolbar, .ew-record-head { align-items: flex-start; flex-direction: column; }
}
