﻿        :root, [data-theme="ocean-blue"] {
            --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --brand-50: #eff6ff;
            --brand-100: #dbeafe;
            --brand-200: #bfdbfe;
            --brand-500: #3b82f6;
            --brand-600: #2563eb;
            --brand-700: #1d4ed8;
            --brand-focus: rgba(37, 99, 235, 0.15);
            --brand-shadow: rgba(37, 99, 235, 0.28);
            --bg-page: #f8fafc;
            --bg-surface: #ffffff;
            --border-color: #e2e8f0;
            --text-main: #0f172a;
            --text-secondary: #475569;
            --text-muted: #64748b;
        }

        [data-theme="emerald"] {
            --brand-50: #ecfdf5;
            --brand-100: #d1fae5;
            --brand-200: #a7f3d0;
            --brand-500: #10b981;
            --brand-600: #059669;
            --brand-700: #047857;
            --brand-focus: rgba(5, 150, 105, 0.15);
            --brand-shadow: rgba(5, 150, 105, 0.28);
        }

        [data-theme="violet"] {
            --brand-50: #f5f3ff;
            --brand-100: #ede9fe;
            --brand-200: #ddd6fe;
            --brand-500: #8b5cf6;
            --brand-600: #7c3aed;
            --brand-700: #6d28d9;
            --brand-focus: rgba(124, 58, 237, 0.15);
            --brand-shadow: rgba(124, 58, 237, 0.28);
        }

        [data-theme="coral"] {
            --brand-50: #fff7ed;
            --brand-100: #ffedd5;
            --brand-200: #fed7aa;
            --brand-500: #f97316;
            --brand-600: #ea580c;
            --brand-700: #c2410c;
            --brand-focus: rgba(234, 88, 12, 0.15);
            --brand-shadow: rgba(234, 88, 12, 0.28);
        }

        [data-theme="sunset"] {
            --brand-50: #fffbeb;
            --brand-100: #fef3c7;
            --brand-200: #fde68a;
            --brand-500: #f59e0b;
            --brand-600: #d97706;
            --brand-700: #b45309;
            --brand-focus: rgba(217, 119, 6, 0.15);
            --brand-shadow: rgba(217, 119, 6, 0.28);
        }

        [data-theme="cyan"] {
            --brand-50: #ecfeff;
            --brand-100: #cffafe;
            --brand-200: #a5f3fc;
            --brand-500: #06b6d4;
            --brand-600: #0891b2;
            --brand-700: #0e7490;
            --brand-focus: rgba(8, 145, 178, 0.15);
            --brand-shadow: rgba(8, 145, 178, 0.28);
        }

        [data-theme="berry"] {
            --brand-50: #fdf2f8;
            --brand-100: #fce7f3;
            --brand-200: #fbcfe8;
            --brand-500: #ec4899;
            --brand-600: #db2777;
            --brand-700: #be185d;
            --brand-focus: rgba(219, 39, 119, 0.15);
            --brand-shadow: rgba(219, 39, 119, 0.28);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-sans);
            background-color: var(--bg-page);
            background-image: 
                radial-gradient(at 0% 0%, var(--brand-focus) 0px, transparent 50%),
                radial-gradient(at 100% 100%, var(--brand-50) 0px, transparent 50%),
                radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.6) 0px, transparent 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 16px;
            color: var(--text-main);
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        input, textarea {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        .login-card {
            background: #ffffff;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            max-width: 440px;
            width: 100%;
            padding: 36px 30px;
            box-shadow: 
                0 10px 25px -5px rgba(15, 23, 42, 0.05),
                0 8px 10px -6px rgba(15, 23, 42, 0.03);
            position: relative;
        }

        .login-brand-hero {
            text-align: center;
            margin-bottom: 24px;
        }

        .brand-logo-wrapper {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            margin: 0 auto 12px;
            box-shadow: 0 8px 20px -4px var(--brand-shadow);
        }

        .brand-logo-wrapper.has-image {
            width: auto;
            height: 74px;
            max-width: 140px;
            background: transparent;
            box-shadow: none;
            border: none;
            border-radius: 0;
            margin: 0 auto 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .brand-logo-wrapper.has-image img {
            max-height: 74px;
            max-width: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
        }

        .brand-title {
            font-size: 1.35rem;
            font-weight: 800;
            color: var(--text-main);
            letter-spacing: -0.02em;
            line-height: 1.25;
            margin-bottom: 3px;
        }

        .brand-subtitle {
            font-size: 0.875rem;
            color: var(--text-muted);
            font-weight: 500;
            line-height: 1.35;
        }

        .alert-error {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #991b1b;
            padding: 12px 14px;
            border-radius: 12px;
            font-size: 0.8125rem;
            font-weight: 500;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            line-height: 1.4;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-label {
            display: block;
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-secondary);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .input-group-relative {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon-left {
            position: absolute;
            left: 14px;
            color: #94a3b8;
            pointer-events: none;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            transition: color 0.15s ease;
        }

        .input-group-relative:focus-within .input-icon-left {
            color: var(--brand-600);
        }

        .form-input {
            width: 100%;
            height: 44px;
            background: #ffffff;
            border: 1.5px solid var(--border-color);
            border-radius: 10px;
            padding: 0 14px 0 42px;
            font-size: 0.875rem;
            font-family: inherit;
            color: var(--text-main);
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
        }

        .form-input:focus {
            border-color: var(--brand-600);
            box-shadow: 0 0 0 3.5px var(--brand-focus);
            background-color: #ffffff;
        }

        .form-input::placeholder {
            color: #94a3b8;
            font-weight: 400;
            opacity: 0.8;
        }

        .form-input.has-toggle {
            padding-right: 44px;
        }

        .btn-toggle-pw {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            padding: 6px 8px;
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: color 0.15s;
        }

        .btn-toggle-pw:hover {
            color: var(--brand-600);
        }

        .btn-submit {
            width: 100%;
            height: 46px;
            background: var(--brand-600);
            color: #ffffff;
            border: 1.5px solid var(--brand-600);
            border-radius: 10px;
            font-size: 0.875rem;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 14px var(--brand-shadow);
            transition: all 0.15s ease;
        }

        .btn-submit:hover {
            background: var(--brand-700);
            border-color: var(--brand-700);
            transform: translateY(-1px);
            box-shadow: 0 6px 18px var(--brand-shadow);
        }

        .btn-submit:active {
            transform: translateY(0);
        }

        /* Tombol PWA Install */
        .btn-pwa-install {
            width: 100%;
            height: 44px;
            background: var(--brand-50);
            color: var(--brand-700);
            border: 1.5px dashed var(--brand-500);
            border-radius: 10px;
            font-size: 0.8125rem;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.15s ease;
        }

        .btn-pwa-install:hover {
            background: var(--brand-100);
            border-color: var(--brand-600);
            color: var(--brand-700);
            transform: translateY(-1px);
        }

        /* Gate Screen Styles */
        .gate-card {
            background: #ffffff;
            border: 1px solid var(--border-color);
            border-radius: 24px;
            max-width: 480px;
            width: 100%;
            padding: 36px 30px;
            box-shadow: 
                0 20px 35px -10px rgba(15, 23, 42, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05);
            text-align: center;
            position: relative;
        }

        .gate-badge-wrap {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #fff7ed;
            border: 1px solid #ffedd5;
            color: #c2410c;
            padding: 5px 14px;
            border-radius: 999px;
            font-size: 0.6875rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin-bottom: 12px;
        }

        .gate-icon-halo {
            width: 68px;
            height: 68px;
            background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            margin: 0 auto 16px;
            box-shadow: 0 10px 25px -4px rgba(234, 88, 12, 0.35);
        }

        .gate-title {
            font-size: 1.25rem;
            font-weight: 800;
            color: #0f172a;
            margin-bottom: 6px;
        }

        .gate-desc {
            font-size: 0.8125rem;
            color: #64748b;
            line-height: 1.5;
            margin-bottom: 24px;
        }

        .gate-download-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 20px;
        }

        @media (max-width: 480px) {
            .gate-card {
                padding: 24px 16px;
                border-radius: 20px;
                margin: 12px;
            }
            .gate-download-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            .btn-download-eb {
                padding: 12px 6px !important;
                font-size: 0.75rem !important;
            }
            .btn-download-eb small {
                font-size: 0.625rem !important;
            }
        }

        @media (max-width: 360px) {
            .gate-download-grid {
                grid-template-columns: 1fr;
            }
        }

        .btn-download-eb {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 14px 10px;
            border-radius: 14px;
            text-decoration: none;
            font-size: 0.78125rem;
            font-weight: 700;
            transition: all 0.15s ease;
            border: 1px solid transparent;
        }

        .btn-download-eb.android {
            background: #ecfdf5;
            color: #047857;
            border-color: #a7f3d0;
        }

        .btn-download-eb.android:hover {
            background: #d1fae5;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
        }

        .btn-download-eb.windows {
            background: #eff6ff;
            color: #1d4ed8;
            border-color: #bfdbfe;
        }

        .btn-download-eb.windows:hover {
            background: #dbeafe;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
        }

        .btn-download-eb.ios {
            background: #faf5ff;
            color: #7e22ce;
            border-color: #e9d5ff;
        }

        .btn-download-eb.ios:hover {
            background: #f3e8ff;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(168, 85, 247, 0.2);
        }

        .seb-guide-box {
            background: #faf5ff;
            border: 1px solid #e9d5ff;
            border-radius: 12px;
            padding: 10px 12px;
            margin-bottom: 16px;
            text-align: left;
        }

        .seb-guide-header {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.6875rem;
            font-weight: 700;
            color: #7e22ce;
            margin-bottom: 3px;
        }

        .seb-guide-body {
            font-size: 0.65625rem;
            color: #6b21a8;
            line-height: 1.4;
            margin-bottom: 8px;
        }

        .seb-guide-links {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            width: 100%;
        }

        @media (max-width: 360px) {
            .seb-guide-links {
                grid-template-columns: 1fr;
            }
        }

        .seb-guide-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 5px 8px;
            background: #ffffff;
            border: 1px solid #d8b4fe;
            border-radius: 6px;
            font-size: 0.6875rem;
            font-weight: 600;
            color: #6b21a8;
            text-decoration: none;
            text-align: center;
            white-space: nowrap;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px rgba(126, 34, 206, 0.04);
        }

        .seb-guide-link:hover {
            background: #f3e8ff;
            border-color: #c084fc;
            color: #581c87;
            transform: translateY(-1px);
        }

        .gate-server-box {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            padding: 16px;
            margin-bottom: 20px;
            text-align: left;
        }

        .gate-server-label {
            font-size: 0.6875rem;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .gate-server-url-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            padding: 8px 12px;
            border-radius: 8px;
        }

        .gate-server-url-text {
            font-family: monospace;
            font-size: 0.8125rem;
            font-weight: 700;
            color: #0f172a;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .btn-copy-url {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.6875rem;
            font-weight: 700;
            color: #334155;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .btn-copy-url:hover {
            background: #e2e8f0;
            color: #0f172a;
        }

        .qr-code-holder {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 14px;
            padding: 10px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
        }

        .qr-code-holder img {
            width: 140px;
            height: 140px;
            display: block;
        }

        .gate-guide-list {
            text-align: left;
            font-size: 0.75rem;
            color: #475569;
            padding-left: 18px;
            line-height: 1.6;
            margin-top: 12px;
        }

        .switch-portal-link {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-top: 20px;
            padding-top: 18px;
            border-top: 1px solid var(--border-color);
            color: var(--text-muted);
            font-size: 0.8125rem;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.15s;
        }

        .switch-portal-link:hover {
            color: var(--brand-600);
        }

        .login-footer {
            margin-top: 20px;
            text-align: center;
            font-size: 0.6875rem;
            color: #94a3b8;
        }

        /* Modal Dialog PWA */
        .pwa-modal-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .pwa-modal-backdrop.is-open {
            display: flex;
        }

        .pwa-modal-box {
            background: #ffffff;
            border-radius: 20px;
            max-width: 380px;
            width: 100%;
            padding: 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            text-align: center;
        }
