    :root {
            --auth-primary: #2563eb;
            --auth-primary-hover: #1d4ed8;
            --auth-bg: #f8fafc;
            --auth-text: #0f172a;
            --auth-muted: #64748b;
            --auth-border: #e2e8f0;
            --auth-white: #ffffff;
            --auth-error: #ef4444;
        }
        .iport-auth-wrapper { width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--auth-bg); font-family: 'Segoe UI', system-ui, sans-serif; padding: 20px; box-sizing: border-box; }
        .auth-card { background: var(--auth-white); max-width: 420px; width: 100%; border-radius: 16px; border: 1px solid var(--auth-border); padding: 40px 30px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); box-sizing: border-box; }
        .auth-logo { text-align: center; font-size: 28px; font-weight: 800; color: var(--auth-text); margin-bottom: 8px; letter-spacing: -0.5px; }
        .auth-logo span { color: var(--auth-primary); }
        .auth-subtitle { text-align: center; font-size: 14px; color: var(--auth-muted); margin-bottom: 30px; }
        .auth-form-group { margin-bottom: 20px; position: relative; }
        .auth-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--auth-text); }
        .auth-input-wrap { position: relative; }
        .auth-input { width: 100%; padding: 12px 16px; font-size: 15px; border: 1px solid var(--auth-border); border-radius: 8px; outline: none; transition: all 0.2s; color: var(--auth-text); background: #fafafa; box-sizing: border-box; }
        .auth-input:focus { border-color: var(--auth-primary); background: var(--auth-white); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
        .auth-toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--auth-muted); cursor: pointer; font-size: 14px; }
        .auth-helpers { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 25px; }
        .auth-remember { display: flex; align-items: center; gap: 6px; color: var(--auth-muted); cursor: pointer; }
        .auth-forgot { color: var(--auth-primary); text-decoration: none; font-weight: 500; }
        .btn-auth-submit { width: 100%; background: var(--auth-primary); color: var(--auth-white); border: none; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
        .btn-auth-submit:hover { background: var(--auth-primary-hover); }
        .auth-error-msg { background: #fef2f2; border: 1px solid #fca5a5; color: var(--auth-error); padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; }
        .auth-footer-tech { text-align: center; font-size: 12px; color: var(--auth-muted); margin-top: 25px; }
        
        /* Заглушка завантаження для авто-входу PWA */
        .pwa-loading { display: none; text-align: center; color: var(--auth-muted); font-size: 14px; padding: 20px 0; }
        
        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            /*overflow: hidden;*/ /* Повністю забороняє прокрутку */
            position: fixed;  /* Фіксує сторінку на iOS Safari від "гумового" скролу */
            overscroll-behavior: none; /* Вимикає pull-to-refresh та ефекти за край екрана */
        }
        
        /* Оновлюємо обгортку, щоб вона займала рівно доступну висоту */
        .iport-auth-wrapper {
            width: 100%;
            height: 100vh; /* Для старих браузерів */
            height: 100dvh; /* Dynamic Vanta Height — ідеально для мобільних з урахуванням панелей */
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--auth-bg);
            font-family: 'Segoe UI', system-ui, sans-serif;
            padding: 20px;
            box-sizing: border-box;
            color: var(--auth-text);
        }


         /* --- СВІТЛА ТЕМА (ЗА ЗАМОВЧУВАННЯМ) --- */
        :root[data-theme="light"] #themeToggleBtn{
            color: black;
        }
        :root:not([data-theme="light"]) #themeToggleBtn{
            color: white;
        }
        :root {
            /* --- СВІТЛА ТЕМА (ЗА ЗАМОВЧУВАННЯМ) --- */
            --auth-bg: #f8fafc;
            --auth-white: #ffffff;
            --auth-text: #0f172a;
            --auth-muted: #64748b;
            --auth-border: #e2e8f0;
            --auth-input-bg: #fafafa;
            
            --auth-primary: #2563eb;
            --auth-primary-hover: #1d4ed8;
            --auth-error: #ef4444;
            --auth-error-bg: #fef2f2;
            --auth-error-border: #fca5a5;
        }

        /* --- АВТОМАТИЧНА ТЕМНА ТЕМА ЗА СИСТЕМОЮ --- */
        @media (prefers-color-scheme: dark) {
            :root:not([data-theme="light"]) {
                --auth-bg: #0f172a;
                --auth-white: #1e293b;
                --auth-text: #f8fafc;
                --auth-muted: #94a3b8;
                --auth-border: #334155;
                --auth-input-bg: #0f172a;
                
                --auth-primary: #3b82f6;
                --auth-primary-hover: #60a5fa;
                --auth-error: #f87171;
                --auth-error-bg: #451a1a;
                --auth-error-border: #7f1d1d;
            }
        }

        /* --- ПРИМУСОВА ТЕМНА ТЕМА (З КАНАЛУ LOCALSTORAGE) --- */
        :root[data-theme="dark"] {
            --auth-bg: #0f172a;
            --auth-white: #1e293b;
            --auth-text: #f8fafc;
            --auth-muted: #94a3b8;
            --auth-border: #334155;
            --auth-input-bg: #0f172a;
            
            --auth-primary: #3b82f6;
            --auth-primary-hover: #60a5fa;
            --auth-error: #f87171;
            --auth-error-bg: #451a1a;
            --auth-error-border: #7f1d1d;
        }

        /* Змінені класи форми, щоб вони читали нові змінні */
        .iport-auth-wrapper { width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--auth-bg); font-family: 'Segoe UI', system-ui, sans-serif; padding: 20px; box-sizing: border-box; color: var(--auth-text); }
        .auth-card { background: var(--auth-white); max-width: 420px; width: 100%; border-radius: 16px; border: 1px solid var(--auth-border); padding: 40px 30px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); box-sizing: border-box; }
        .auth-logo { text-align: center; font-size: 28px; font-weight: 800; color: var(--auth-text); margin-bottom: 8px; letter-spacing: -0.5px; }
        .auth-logo span { color: var(--auth-primary); }
        .auth-subtitle { text-align: center; font-size: 14px; color: var(--auth-muted); margin-bottom: 30px; }
        .auth-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--auth-text); }
        .auth-input { width: 100%; padding: 12px 16px; font-size: 15px; border: 1px solid var(--auth-border); border-radius: 8px; outline: none; transition: all 0.2s; color: var(--auth-text); background: var(--auth-input-bg); box-sizing: border-box; }
        .auth-input:focus { border-color: var(--auth-primary); background: var(--auth-white); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
        .auth-toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--auth-muted); cursor: pointer; font-size: 14px; }
        .auth-helpers { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 25px; }
        .auth-remember { display: flex; align-items: center; gap: 6px; color: var(--auth-muted); cursor: pointer; }
        .auth-forgot { color: var(--auth-primary); text-decoration: none; font-weight: 500; }
        .btn-auth-submit { width: 100%; background: var(--auth-primary); color: #ffffff; border: none; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
        .btn-auth-submit:hover { background: var(--auth-primary-hover); }
        .auth-error-msg { background: var(--auth-error-bg); border: 1px solid var(--auth-error-border); color: var(--auth-error); padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; }
        .auth-footer-tech { text-align: center; font-size: 12px; color: var(--auth-muted); margin-top: 25px; }
        .pwa-loading { display: none; text-align: center; color: var(--auth-muted); font-size: 14px; padding: 20px 0; }