:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2a37;
    --muted: #6b7280;
    --border: #d1d5db;
    --primary: #0f766e;
    --primary-dark: #0b5f58;
    --secondary: #475569;
    --success: #15803d;
    --danger: #b91c1c;
    --warning-bg: #fff7ed;
    --warning-border: #fdba74;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    min-height: 100vh;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
}

.header-brand {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.site-header h1 {
    margin: 0 0 4px;
    font-size: 1.8rem;
}

.subtitle {
    margin: 0;
    color: var(--muted);
}

.container,
.success-page {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 16px 40px;
}

.wizard-card,
.success-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.step {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 0.95rem;
}

.step.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.form-step {
    display: none;
}

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

.field-group,
.row {
    margin-bottom: 18px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.col {
    flex: 1 1 320px;
    min-width: 240px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid rgba(15, 118, 110, 0.15);
    border-color: var(--primary);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-group label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 8px;
}

.checkbox-col {
    display: flex;
    align-items: flex-end;
}

.inline-checkbox {
    margin-top: 28px;
}

.hint {
    color: var(--muted);
    display: block;
    margin-top: 6px;
}

.fieldset-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 22px;
}

.fieldset-box legend {
    font-weight: bold;
    padding: 0 8px;
}

.meterpoint-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.meterpoint-wrap .prefix {
    background: #eef2f7;
    border: 1px solid var(--border);
    border-right: none;
    padding: 12px 14px;
    border-radius: 8px 0 0 8px;
    font-family: monospace;
    white-space: nowrap;
    flex: 0 0 auto;
}

.meterpoint-wrap input {
    border-radius: 0 8px 8px 0;
    font-family: monospace;
    min-width: 0;
}

.generated-value {
    margin-top: 8px;
    color: var(--secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.generated-value strong {
    display: block;
    margin-top: 2px;
    font-family: monospace;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sepa-text {
    border: 1px solid var(--warning-border);
    background: var(--warning-bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.summary-box,
.confirm-box,
.signature-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    background: #fff;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.summary-table th {
    width: 35%;
    color: var(--secondary);
}

.summary-group {
    padding: 8px 0 18px;
    border-bottom: 3px solid #dbe4ea;
    margin-bottom: 18px;
}

.summary-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-group h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--text);
}
		
.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#signatureCanvas {
    width: 100%;
    height: 260px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fafafa;
    display: block;
    touch-action: none;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.wizard-actions-left,
.wizard-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.wizard-actions-right {
    margin-left: auto;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

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

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.hidden {
    display: none !important;
}

.form-messages {
    margin-bottom: 18px;
}

.message {
    padding: 12px 14px;
    border-radius: 8px;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.error-input {
    border-color: var(--danger) !important;
    background: #fff5f5;
}

.preview-frame {
    width: 100%;
    height: 70vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 20px;
}

.link-list a {
    color: var(--primary);
    text-decoration: none;
}

.link-list a:hover {
    text-decoration: underline;
}

.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .wizard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-actions-left,
    .wizard-actions-right {
        width: 100%;
        justify-content: stretch;
    }

    .wizard-actions-left .btn,
    .wizard-actions-right .btn {
        width: 100%;
    }

    .signature-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.checkbox-label-long {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
}

.checkbox-label-long input[type="checkbox"] {
    margin-top: 4px;
}

.checkbox-label-long span {
    line-height: 1.5;
}

.checkbox-label-long a {
    display: inline;
    word-break: break-word;
}
		
.signature-meta-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    background: #fff;
}

input[readonly] {
    background: #f8fafc;
    color: var(--secondary);
}
.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    margin-top: 32px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-inner p {
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--primary);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus {
    text-decoration: underline;
}
		
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}