/* ==========================================================================
   Portal styles
   Used by /portal/<token>/* pages (landing, bank, wallet, thanks).
   The look mirrors the gradient + glass-card pattern from
   templates/portal/landing.html.
   ========================================================================== */

.portal-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #101010 0%, #222222 100%);
    position: relative;
    overflow-x: hidden;
    color: #1e293b;
}
.portal-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
}
.portal-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 20px;
    position: relative;
    z-index: 1;
}
.portal-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    color: #1e293b;
}
.portal-card h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1e293b;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.portal-card h2 i { color: #667eea; font-size: 28px; }
.portal-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin: 0 0 24px;
}
.portal-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.portal-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.portal-form label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.portal-form .form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}
.portal-form .form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
}
.portal-form .form-control::placeholder { color: #94a3b8; }
.portal-form .help {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}
.portal-form .btn-primary {
    background: linear-gradient(135deg, #101010 0%, #222222 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.portal-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.35);
}
.portal-form .btn-primary:disabled { opacity: 0.6; cursor: wait; }
.portal-form .btn-secondary {
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px;
}
.portal-form .btn-secondary:hover { background: #f1f5f9; }
.portal-divider {
    height: 1px; background: #e2e8f0; margin: 24px 0;
}
.portal-security {
    text-align: center; color: #94a3b8; font-size: 12px; margin-top: 16px;
}
.portal-security i { color: #22c55e; }

.portal-flash {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.portal-flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.portal-flash-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.portal-flash-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.portal-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.portal-choice {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-family: inherit; color: #1e293b; font-size: 14px;
}
.portal-choice:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.2);
}
.portal-choice i { font-size: 36px; color: #667eea; }
.portal-choice .title { font-weight: 600; font-size: 16px; }
.portal-choice .sub { color: #64748b; font-size: 12px; }

.portal-icon-success {
    text-align: center;
    font-size: 80px;
    color: #22c55e;
    margin-bottom: 16px;
}

.portal-rate-info {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: #475569;
    margin-top: 8px;
    display: flex; align-items: center; gap: 8px;
}
.portal-rate-info .live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e; display: inline-block;
    animation: portal-pulse 2s infinite;
}
@keyframes portal-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

/* ============ Auszahlungsdetails + Zustimmung (bank/wallet forms) ============ */
.portal-card-wide { max-width: 720px; }
.portal-section {
    margin: 20px 0 0;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.portal-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.portal-section-title i { color: #667eea; }
.portal-dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 8px 16px;
    margin: 0;
    font-size: 13px;
}
.portal-dl dt { color: #64748b; font-weight: 500; }
.portal-dl dd { margin: 0; color: #1e293b; word-break: break-all; }
.portal-dl code {
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.portal-muted { color: #94a3b8; }
.portal-warning-box {
    display: flex; gap: 10px; align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #78350f;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
}
.portal-warning-box i { font-size: 18px; flex-shrink: 0; color: #d97706; }

.portal-consent {
    /* !important on display so the .portal-form label rule (which is
       more specific by class+element) cannot force the label back to
       the default `inline` — which would make all three consents flow
       together on one line. */
    display: flex !important;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    margin: 0 0 12px 0;       /* explicit 12px gap between rows */
    width: 100%;
    box-sizing: border-box;
}
.portal-consent:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(102,126,234,0.08); }
.portal-consent input[type="checkbox"] {
    margin-top: 2px;
    width: 18px; height: 18px;
    accent-color: #667eea;
    flex-shrink: 0;
    cursor: pointer;
}
.portal-consent:has(input:checked) {
    border-color: #667eea;
    background: #f5f3ff;
}
.portal-consent > span { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.portal-consent-title {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
    display: block;
    letter-spacing: 0.2px;
    border-left: 3px solid #667eea;
    padding-left: 8px;
}
.portal-consent-body {
    font-weight: 400;
    font-size: 13px;
    color: #475569;
    line-height: 1.55;
    display: block;
}

.req { color: #ef4444; font-weight: 700; }
@keyframes portal-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* AGB link inside a consent body — portal.css had no link rule at all, so it
   fell back to the browser default blue/violet. */
.portal-consent-body a {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.portal-consent-body a:hover { color: #4c51bf; }

/* ===== Responsive (mobile) — previously 0 media queries ===== */
@media (max-width: 640px) {
  /* choice cards: two-up grid -> single column */
  .portal-choice-grid { grid-template-columns: 1fr; }
  /* definition list: 200px label column -> stacked label-above-value */
  .portal-dl { grid-template-columns: 1fr; row-gap: 2px; }
  .portal-dl dd { margin-bottom: 10px; }
  body { font-size: 14px; }
}
