:root {
    --primary: #45000e;
    --primary-darken: #2d0009;
    --secondary: #ff9a52;
    --secondary-darken: #e07b30;
    --bg: #f5f5f5;
    --surface: #ffffff;
    --error: #b00020;
    --success: #2e7d32;
    --text: #333333;
    --muted: #888888;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.logo {
    max-width: 220px;
    margin-bottom: 16px;
}

h1 {
    font-size: 20px;
    color: var(--primary);
    margin: 0 0 8px;
}

.intro {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.step {
    text-align: left;
}

.step-hint {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 16px;
}

input:focus {
    outline: none;
    border-color: var(--secondary);
}

.btn {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.15s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-darken);
}

.btn-danger {
    background: #fff;
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-danger:hover:not(:disabled) {
    background: #fff5f5;
}

.btn-link {
    background: none;
    color: var(--muted);
    font-weight: 500;
    text-decoration: underline;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: left;
}

.alert-error {
    background: #ffebee;
    color: var(--error);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
}

.customer-info {
    margin-bottom: 20px;
}

.customer-info p {
    margin: 0;
}

#customer-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.consent-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-opted_in {
    background: #e8f5e9;
    color: var(--success);
}

.badge-opted_out {
    background: #ffebee;
    color: var(--error);
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dialog-overlay[hidden] {
    display: none;
}

.dialog {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
}

.dialog h2 {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--primary);
}

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

.dialog-actions {
    display: flex;
    gap: 12px;
}

.dialog-actions .btn {
    margin-bottom: 0;
}

.dialog-large {
    max-width: 640px;
    width: 90%;
    height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

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

.dialog-header h2 {
    margin: 0;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
}

.dialog-close:hover {
    color: var(--text);
}

.dialog-iframe {
    flex: 1;
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
}

.footer-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 12px;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
}
