/* Base & Variables */
:root {
    --bg-dark: #0f172a; --bg-darker: #020617;
    --text-main: #f8fafc; --text-muted: #94a3b8;
    --primary: #3b82f6; --primary-hover: #2563eb;
    --accent: #00d2ff; --error: #ef4444; --success: #22c55e;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

.glass-panel { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.hidden { display: none !important; }

/* Overlay (Login) */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; transition: opacity 0.4s ease; opacity: 0; pointer-events: none; }
.overlay.active { opacity: 1; pointer-events: all; }
.login-box { width: 100%; max-width: 400px; padding: 40px; text-align: center; }
.logo-area { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 5px; }
.subtitle { color: var(--error); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 30px; font-weight: 700; }

/* Form Styles */
.input-group { display: flex; flex-direction: column; text-align: left; margin-bottom: 20px; position:relative;}
.amount-group { display: flex; flex-direction: row; gap: 15px; }
.input-group label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; display:flex; justify-content:space-between; }
.status-indicator { font-size: 0.75rem; font-weight: 700; }
.status-indicator.valid { color: var(--success); }
.status-indicator.invalid { color: var(--error); }
.input-group input, .input-group select { background: rgba(15, 23, 42, 0.6); border: 1px solid var(--glass-border); color: #fff; padding: 12px 16px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem; transition: border-color 0.2s; }
.input-group input:focus, .input-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }

/* Toggles & Radios */
.mode-toggles { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; margin-bottom: 20px; border: 1px solid var(--glass-border); flex-wrap: wrap; gap: 10px;}
.radio-group { display: flex; gap: 10px; }
.radio-btn { padding: 8px 16px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; transition: 0.2s; font-size: 0.9rem;}
.radio-btn:hover { background: rgba(255,255,255,0.05); }
.radio-btn.active { border-color: var(--primary); background: rgba(59, 130, 246, 0.1); color: var(--accent); }
.radio-btn input { display: none; }

.checkbox-btn { padding: 8px 16px; border-radius: 6px; cursor: pointer; border: 1px solid var(--error); color: var(--error); transition: 0.2s; font-size: 0.9rem; font-weight:600;}
.checkbox-btn:hover { background: rgba(239, 68, 68, 0.1); }
.checkbox-btn.active { background: var(--error); color: #fff; }

.btn-primary, .btn-generate { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-primary:hover, .btn-generate:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--glass-border); color: var(--text-muted); padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }
#login-error { color: var(--error); margin-top: 15px; font-size: 0.9rem; display: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; width: 100%; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; margin-bottom: 30px; }
.header-title { display: flex; align-items: center; gap: 12px; }
.header-title h1 { font-size: 1.5rem; font-weight: 600; }
.header-title span { background: rgba(239, 68, 68, 0.2); color: var(--error); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--error);}

.app-content { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.form-container { padding: 30px; }
.form-container h3 { margin-bottom: 25px; color: #fff; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.full-width { grid-column: 1 / -1; }
.btn-generate { margin-top: 20px; background: linear-gradient(to right, #cf2027, var(--error)); box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);}
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

.info-container { padding: 30px; height: fit-content; }
.info-container h3 { margin-bottom: 20px; color: var(--accent); }
.system-logs { font-family: monospace; font-size: 0.85rem; color: #34d399; background: #000; padding: 15px; border-radius: 8px; min-height: 200px; height: 100%; border: 1px solid #064e3b; overflow-y:auto; line-height: 1.6;}
.system-logs p { margin:0; }

/* 
   ========================================================================
   PDF GENERATION - SEPA
   ========================================================================
*/
.pdf-document { width: 210mm; height: 296mm; max-height: 296mm; overflow: hidden; background: #ffffff; color: #000000; font-family: 'Helvetica', 'Arial', sans-serif; padding: 40px 50px; box-sizing: border-box; position: relative; }
.pdf-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 30px; }
.pdf-logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.pdf-header-right p { margin: 5px 0; font-size: 11px; color: #475569; text-align: right; }
.pdf-section { margin-bottom: 25px; }
.pdf-section h2 { font-size: 13px; font-weight: 700; color: #0f172a; background: #f8fafc; padding: 8px 12px; border-left: 4px solid #3b82f6; margin-bottom: 12px; }
.pdf-table { width: 100%; border-collapse: collapse; }
.pdf-table td { padding: 6px 12px; font-size: 11px; border-bottom: 1px solid #f1f5f9; }
.td-label { width: 35%; color: #64748b; }
.td-value { width: 65%; font-weight: 600; color: #0f172a; }
.amount-text { font-size: 16px; }
.pdf-footer { position: absolute; bottom: 40px; left: 50px; right: 50px; text-align: center; font-size: 9px; color: #94a3b8; }
.pdf-footer-bar { margin-top: 15px; height: 6px; width: 100%; background: #e2e8f0; border-radius: 3px; }

/* 
   ========================================================================
   PDF GENERATION - SWIFT MT103
   ========================================================================
*/
.swift-mode { font-family: 'Courier New', Courier, monospace; background: #fffdf5; padding: 50px; color: #111;}
.swift-header { border-bottom: 2px dashed #000; padding-bottom: 15px; margin-bottom: 20px;}
.swift-header h2 { font-size: 16px; font-weight: bold; margin-bottom: 8px; letter-spacing: 1px;}
.swift-header p { font-size: 12px; }
.swift-body { font-size: 13px; line-height: 1.5; white-space: pre-wrap; font-weight: 600;}
.swift-footer { margin-top: 30px; border-top: 2px dashed #000; padding-top: 15px; font-size: 12px; font-weight:bold;}

/* 
   ========================================================================
   SCAN NOISE FILTER (Forensic disruption)
   ========================================================================
*/
.pdf-scanned {
    filter: grayscale(100%) contrast(1.2) sepia(0.1) blur(0.3px);
    transform: rotate(0.15deg) scale(0.998);
    position: relative;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.04"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)"/></svg>') repeat;
}

@media (max-width: 900px) { .app-content { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .form-grid, .amount-group { grid-template-columns: 1fr; flex-direction:column; } }
