#designnica-app-portal {
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 520px;
margin: 32px auto;
padding: 0 16px;
color: #0F172A;
line-height: 1.5;
box-sizing: border-box;
}
#designnica-app-portal * {
box-sizing: border-box;
}
#designnica-app-portal .d-card {
background: #FFFFFF;
border: 1px solid #E2E8F0;
border-radius: 24px;
padding: 32px 28px;
box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
}
#designnica-app-portal .d-brand {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 20px;
}
#designnica-app-portal .d-badge {
width: 44px;
height: 44px;
border-radius: 14px;
background: linear-gradient(135deg, #151638 0%, #2563EB 100%);
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 18px;
}
#designnica-app-portal .d-title {
font-size: 22px;
font-weight: 800;
color: #0F172A;
margin: 0 0 6px 0;
}
#designnica-app-portal .d-subtitle {
font-size: 13.5px;
color: #64748B;
margin: 0 0 22px 0;
}
#designnica-app-portal .d-tabs {
display: flex;
background: #F1F5F9;
padding: 4px;
border-radius: 12px;
margin-bottom: 20px;
}
#designnica-app-portal .d-tab {
flex: 1;
padding: 9px 12px;
border: none;
background: transparent;
border-radius: 9px;
font-size: 12.5px;
font-weight: 700;
color: #64748B;
cursor: pointer;
}
#designnica-app-portal .d-tab.active {
background: #FFFFFF;
color: #0F172A;
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
#designnica-app-portal .d-field {
margin-bottom: 15px;
}
#designnica-app-portal .d-label {
display: block;
font-size: 11.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #334155;
margin-bottom: 6px;
}
#designnica-app-portal .d-input {
width: 100%;
padding: 12px 14px;
border: 1px solid #CBD5E1;
border-radius: 12px;
font-size: 14px;
background: #F8FAFC;
color: #0F172A;
}
#designnica-app-portal .d-input:focus {
outline: none;
border-color: #2563EB;
background: #FFFFFF;
}
#designnica-app-portal .d-btn {
width: 100%;
padding: 13px 18px;
border: none;
border-radius: 14px;
background: #151638;
color: #FFFFFF;
font-size: 14px;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
text-decoration: none;
transition: opacity 0.15s;
}
#designnica-app-portal .d-btn:hover {
opacity: 0.92;
color: #FFFFFF;
}
#designnica-app-portal .d-btn-success {
background: #10B981;
}
#designnica-app-portal .d-error {
background: #FEF2F2;
border: 1px solid #FECACA;
color: #991B1B;
padding: 11px 14px;
border-radius: 12px;
font-size: 13px;
margin-bottom: 16px;
display: none;
}
#designnica-app-portal .d-steps {
background: #F8FAFC;
border: 1px solid #E2E8F0;
border-radius: 14px;
padding: 16px;
margin-top: 20px;
font-size: 13px;
color: #334155;
}
#designnica-app-portal .d-steps ol {
margin: 8px 0 0 18px;
padding: 0;
}
#designnica-app-portal .d-steps li {
margin-bottom: 6px;
}
#designnica-app-portal .d-hidden {
display: none !important;
}
(function() {
const SUPABASE_URL = 'https://miyarlbudzanpukjhccx.supabase.co';
const SUPABASE_ANON_KEY = 'sb_publishable_lNak5rBlu_sySVPL8iS79w_dsBgVYF6';
const APK_URL = 'https://drive.usercontent.google.com/download?id=1bOCSdAUwnm9LKR44GFNcktiK5KJ0p8Xd&export=download&confirm=t';
const sbClient = window.supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);window.dSwitchAuthMode = function(mode) {
document.getElementById('dAuthError').style.display = 'none';
document.getElementById('dTabHub').classList.toggle('active', mode === 'hub');
document.getElementById('dTabEmail').classList.toggle('active', mode === 'email');
document.getElementById('dFormHub').classList.toggle('d-hidden', mode !== 'hub');
document.getElementById('dFormEmail').classList.toggle('d-hidden', mode !== 'email');
};function showErr(msg) {
const el = document.getElementById('dAuthError');
el.textContent = msg;
el.style.display = 'block';
}function unlockPortal(label, code) {
document.getElementById('dVerifyView').classList.add('d-hidden');
document.getElementById('dDownloadView').classList.remove('d-hidden');
document.getElementById('dVerifiedBanner').textContent = '✅ Verified: ' + label;
document.getElementById('dHintHubCode').textContent = code || 'DES-001';
document.getElementById('dApkDownloadLink').href = APK_URL;
}window.dVerifyByHub = async function(e) {
e.preventDefault();
const btn = document.getElementById('dBtnHub');
let code = document.getElementById('dHubCode').value.trim().toUpperCase();
const m = code.match(/^DES-?0*(\d+)$/);
if (m) code = 'DES-' + m[1].padStart(3, '0');
const secret = document.getElementById('dHubSecret').value.trim();btn.disabled = true;
btn.textContent = 'Verifying...';const { data, error } = await sbClient.rpc('verify_hub_for_download', {
p_hub_code: code,
p_hub_secret: secret,
});btn.disabled = false;
btn.textContent = 'Verify Hub & Unlock Download';if (!error && data && data.success) {
unlockPortal((data.property_name || 'Smart Home Hub') + ' (' + data.property_code + ')', data.property_code);
return;
}showErr(data?.error || error?.message || 'Invalid Hub Code or Secret Password.');
};window.dVerifyByEmail = async function(e) {
e.preventDefault();
const btn = document.getElementById('dBtnEmail');
const email = document.getElementById('dUserEmail').value.trim();
const password = document.getElementById('dUserPass').value;btn.disabled = true;
btn.textContent = 'Signing in...';const { data, error } = await sbClient.auth.signInWithPassword({ email, password });
btn.disabled = false;
btn.textContent = 'Sign In & Unlock Download';if (error) {
showErr(error.message);
return;
}
unlockPortal(data.user.email, 'DES-001');
};
})();
Swag Home by Designnica
Official Client App Portal
Download Swag Home
Enter your Smart Home Hub credentials or Designnica account to unlock the official Android application.
✅ Verified Client Access
Ready to Install
Tap below to download the signed production Swag Home (v1.0.0) Android application directly from Designnica Secure Storage.
⬇ Download Swag Home APK (30.3 MB)Or Scan with Phone Camera
Quick Installation Steps:
- Tap Download Swag Home APK above and open the downloaded file.
- If prompted by Android, tap Allow from this source and tap Install.
- Open Swag Home, sign in (or create your account), and pair using your Hub Code (
DES-001).