/* ==========================================================================
   SWASTIK GOLD JALORE - APP ENGINE STYLES
   - Classic Sky Blue Regal Theme Design
   - Sky Blue Container & Tab Backgrounds with Dark Navy Accents
   - Clean 350ms Normal Signal Flashing Speed
   - Tab-Level Login Shield with Visible Header & Top Nav Tabs
   - PWA Install Shortcut Banner & Golden App Logo
   ========================================================================== */

:root {
    --bg-sky-blue: #e0f2fe;
    --card-bg: #ffffff;
    --accent-gold: #facc15;
    --accent-gold-dark: #f59e0b;
    --navy-blue: #003a80;
    --sky-blue-border: #7dd3fc;
    --border-blue: #0284c7;
    --text-dark: #0f172a;
    --text-white: #ffffff;
    --text-gray: #475569;
    --text-gold: #f59e0b;
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Open Sans', sans-serif; }

body {
    background: #e0f2fe; /* SKY BLUE BACKGROUND */
    color: #0f172a;
    overflow-x: hidden;
}

/* APP HEADER */
.app-header {
    background: linear-gradient(135deg, #002244 0%, #003a80 100%);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #facc15;
    box-shadow: 0 4px 14px rgba(0,58,128,0.4);
    position: relative;
    z-index: 100000;
}

.brand-header-group { display: flex; align-items: center; gap: 8px; }

.swastik-logo-icon {
    font-size: 26px;
    color: #facc15;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px rgba(250,204,21,0.6));
}

.antique-brand-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(180deg, #fef08a 0%, #facc15 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.8px;
}

.menu-toggle-btn { background: none; border: none; color: #facc15; font-size: 20px; cursor: pointer; }
.avatar-badge { background: #002244; color: #facc15; border: 1.5px solid #facc15; padding: 4px 10px; border-radius: 14px; font-weight: 800; font-size: 11px; cursor: pointer; }

/* TOP NAV TABS WITH SKY BLUE ACCENT BACKGROUND */
.top-nav-tabs {
    display: flex;
    background: #003a80; /* SKY BLUE NAVY ACCENT */
    border-bottom: 2px solid #facc15;
    overflow-x: auto;
    position: relative;
    z-index: 100000;
}

.nav-tab {
    flex: 1;
    min-width: 80px;
    padding: 10px 6px;
    background: none;
    border: none;
    color: #e0f2fe;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.nav-tab.active {
    color: #facc15;
    border-bottom-color: #facc15;
    background: rgba(250,204,21,0.15);
}

/* MARQUEE BANNER */
.ticker-banner {
    background: #002244;
    border-bottom: 1.5px solid #0284c7;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #facc15;
}

/* MAIN VIEWPORT */
.app-viewport {
    max-width: 540px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #e0f2fe; /* SKY BLUE CONTENT AREA */
    position: relative;
}

.main-content {
    flex: 1;
    padding: 12px;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* SPOT RATES SECTION */
.spot-rates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.spot-card {
    background: #003a80; /* REGAL NAVY CARD ON SKY BLUE */
    border: 1.5px solid #7dd3fc;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,58,128,0.15);
}

.spot-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #facc15;
    letter-spacing: 0.5px;
}

.spot-value {
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
    display: block;
    margin: 2px 0;
    transition: background-color 350ms ease-out, color 350ms ease-out !important;
}

.spot-hl-text {
    font-size: 8.5px;
    color: #93c5fd;
    font-weight: 700;
}

/* PRODUCTS LIST WITH BLUE HEADER */
.bullion-grid-section { margin-bottom: 14px; }

.products-list-header {
    background: #003a80;
    color: #ffffff;
    display: flex;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 6px 6px 0 0;
    border-bottom: 2px solid #facc15;
}

.header-col-name { flex: 2; text-align: left; }
.header-col-buy { flex: 1; text-align: center; }
.header-col-sell { flex: 1; text-align: center; }

.products-list {
    background: #ffffff;
    border: 1.5px solid #a0d8ef;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-row-card {
    display: flex;
    align-items: center;
    padding: 8px 8px;
    border-bottom: 1px solid #e2e8f0;
}

.product-row-card:last-child { border-bottom: none; }

.prod-info-block { flex: 2; }
.prod-name-title { font-size: 13px; font-weight: 800; color: #0f172a; text-transform: uppercase; }
.prod-hl-line { font-size: 9.5px; font-weight: 700; color: #475569; margin-top: 2px; }

.price-pill-cell { flex: 1; display: flex; justify-content: center; }

.rate-cell-text {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    min-width: 74px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 350ms ease-out, color 350ms ease-out !important;
}

/* 350ms NORMAL FLASH EFFECT */
.flash-green { background-color: #16a34a !important; color: #ffffff !important; }
.flash-red { background-color: #dc2626 !important; color: #ffffff !important; }

/* WHITE CARDS FOR OTHER TABS */
.contact-white-card, .personal-desk-card, .send-msg-card, .about-dark-card, .key-info-card {
    background: #ffffff;
    border: 1.5px solid #a0d8ef;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-head-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.contact-head-title { font-size: 12px; font-weight: 800; color: #003a80; }
.btn-add-contacts { background: #003a80; color: #facc15; font-size: 9px; font-weight: 800; padding: 4px 8px; border-radius: 4px; text-decoration: none; }

.contact-row-item { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; }
.contact-row-label { font-weight: 700; color: #475569; }
.contact-row-val { font-weight: 800; color: #0f172a; }

.desk-title-bar, .send-msg-title, .key-info-title { font-size: 12px; font-weight: 800; color: #003a80; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }

.bulletin-inner-card { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 6px; padding: 10px; }
.bulletin-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; margin-bottom: 4px; }
.bulletin-tag { color: #0284c7; }
.bulletin-date-text { color: #64748b; }
.bulletin-body-text { font-size: 11px; font-weight: 700; color: #0f172a; line-height: 1.5; }

.send-msg-subtext { font-size: 10px; color: #475569; margin-bottom: 8px; font-weight: 600; }
.classic-form-input { width: 100%; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 6px; font-size: 11px; font-weight: 600; margin-bottom: 8px; outline: none; }
.classic-form-input:focus { border-color: #0284c7; }
.btn-submit-server { width: 100%; padding: 8px; background: #003a80; color: #facc15; border: none; border-radius: 6px; font-weight: 800; font-size: 11px; cursor: pointer; }

.about-dark-card { background: #002244; color: white; border-color: #facc15; text-align: center; }
.about-title-text { font-family: 'Cinzel Decorative', serif; font-size: 16px; font-weight: 900; color: #facc15; margin-bottom: 2px; }
.about-tagline { font-size: 10px; color: #93c5fd; font-weight: 700; margin-bottom: 8px; }
.about-desc-para { font-size: 11px; line-height: 1.5; color: #e2e8f0; }

.vision-promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.vp-card { background: #ffffff; border: 1.5px solid #a0d8ef; border-radius: 8px; padding: 10px; }
.vp-head { font-size: 11px; font-weight: 800; color: #003a80; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.vp-body { font-size: 10px; color: #475569; line-height: 1.4; font-weight: 600; }

.key-item { display: flex; justify-content: space-between; font-size: 10.5px; border-bottom: 1px solid #f1f5f9; padding: 4px 0; }
.key-item:last-child { border-bottom: none; }
.key-item-lbl { font-weight: 700; color: #64748b; }
.key-item-val { font-weight: 800; color: #0f172a; text-align: right; }

/* FLOATING BUTTONS */
.float-btn-left, .float-btn-right {
    position: fixed;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    z-index: 1000;
    text-decoration: none;
}
.float-btn-left { left: 16px; background: #003a80; }
.float-btn-right { right: 16px; background: #25d366; }

.app-footer { text-align: center; padding: 12px; font-size: 11px; font-weight: 700; color: #003a80; }

/* AUTH SCREEN WRAPPER MODAL - KEEPS TOP NAV TABS & APP HEADER VISIBLE */
.auth-wrapper {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(224, 242, 254, 0.95); /* SKY BLUE BACKDROP */
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    padding: 20px 16px;
    overflow-y: auto;
}

/* FULLSCREEN OVERLAY ONLY WHEN ENTIRE MAIN SCREEN IS LOCKED BY ADMIN SECURITY ON */
.auth-wrapper.full-screen-lock {
    top: 0 !important;
    z-index: 999999 !important;
    align-items: center !important;
}

.auth-card {
    width: 100%;
    max-width: 360px;
    background: #002244;
    border: 2px solid #facc15;
    border-radius: 16px;
    padding: 24px 18px;
    box-shadow: 0 12px 32px rgba(0,58,128,0.5);
    text-align: center;
}

.auth-royal-header { margin-bottom: 16px; }
.auth-title { font-family: 'Cinzel Decorative', serif; font-size: 22px; font-weight: 900; color: #f59e0b; }
.auth-subtext { font-size: 10px; color: #cbd5e1; font-weight: 700; letter-spacing: 1px; }

/* PROMINENT BACK TO LIVE RATES BUTTON */
.btn-back-rates {
    width: 100%;
    padding: 10px;
    background: #003a80;
    color: #facc15;
    border: 1.5px solid #facc15;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(250,204,21,0.2);
    transition: all 0.2s;
}
.btn-back-rates:hover { background: #facc15; color: #000000; }

.input-group { margin-bottom: 12px; text-align: left; }
.input-group label { display: block; font-size: 11px; font-weight: 700; color: #facc15; margin-bottom: 4px; }
.stylish-input { width: 100%; padding: 10px 12px; background: #00152b; border: 1.5px solid #0284c7; border-radius: 6px; color: white; font-size: 13px; font-weight: 600; outline: none; }
.stylish-input:focus { border-color: #facc15; }

.btn-royal-login { width: 100%; padding: 12px; background: #facc15; color: #000000; border: none; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; margin-top: 6px; }
.btn-green-grad { background: #16a34a; color: white; }

.new-reg-prompt { margin-top: 14px; font-size: 11px; color: #cbd5e1; }
.btn-link-reg { background: none; border: none; color: #facc15; font-weight: 800; cursor: pointer; text-decoration: underline; margin-top: 4px; font-size: 11px; }

/* DRAWER MENU */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,34,68,0.7); z-index: 999999; display: flex; }
.drawer-content { width: 260px; background: #002244; height: 100%; padding: 16px; border-right: 2px solid #facc15; color: white; }
.drawer-menu { list-style: none; margin-top: 12px; }
.drawer-menu li { padding: 12px 10px; border-bottom: 1px solid #0284c7; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 10px; cursor: pointer; color: white; }

/* PWA 1-CLICK INSTALL FLOATING BANNER */
.pwa-install-banner {
    position: fixed;
    bottom: 74px;
    left: 12px;
    right: 12px;
    max-width: 516px;
    margin: 0 auto;
    background: linear-gradient(135deg, #001e3d 0%, #003a80 100%);
    border: 2px solid #facc15;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 99999;
    animation: pwaSlideUp 0.4s ease-out;
}

@keyframes pwaSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-logo-box {
    width: 44px;
    height: 44px;
    background: #001224;
    border: 1.5px solid #facc15;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-logo-sg { font-family: 'Cinzel Decorative', serif; font-size: 15px; font-weight: 900; color: #facc15; line-height: 1; }
.pwa-logo-txt { font-size: 6px; font-weight: 900; color: #ffffff; letter-spacing: 0.5px; }

.pwa-info { flex: 1; text-align: left; }
.pwa-title { font-size: 12px; font-weight: 900; color: #facc15; line-height: 1.2; }
.pwa-desc { font-size: 9.5px; color: #cbd5e1; font-weight: 700; margin-top: 1px; }

.btn-pwa-install {
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
    color: #001e3d;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(250,204,21,0.4);
    flex-shrink: 0;
}

.btn-pwa-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
}

/* MODAL OVERLAY FOR WELCOME POPUP */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 45, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}

.theme-modal-card {
    background: #002244;
    border: 2px solid #facc15;
    border-radius: 14px;
    padding: 20px 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.7);
    color: #ffffff;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.hidden { display: none !important; }
