/* =====================================================
   VAY & iPHONE - LANDING PAGE STYLESHEET (Public)
   ===================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --bg: #f8fafc;
    --bg-1: #fafbfc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-color: #e5e7eb;
    --text: #0f172a;
    --text-1: #111827;
    --text-2: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    --r: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =====================================================
   HEADER
   ===================================================== */
.header-public {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: var(--r);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow);
}
.brand-name { font-size: 16px; font-weight: 700; color: var(--text); }
.brand-tagline { font-size: 11px; color: var(--text-light); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.hi-user {
    color: var(--text-2);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 50px;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--r);
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.btn-outline-light {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary-light);
}
.btn-outline-light:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.btn-success {
    background: #10b981;
    color: white;
}
.btn-success:hover {
    background: #059669;
    color: white;
}
.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    color: white;
}
.btn-zalo {
    background: #0068ff;
    color: white;
}
.btn-zalo:hover {
    background: #0052cc;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }

/* =====================================================
   HERO
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 520px;
}
.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: var(--r);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-feature-icon {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--r);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.hero-feature-title { font-size: 13px; font-weight: 700; }
.hero-feature-sub { font-size: 11px; opacity: 0.8; }

.hero-image-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--r-xl);
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-image-emoji { font-size: 100px; margin-bottom: 16px; }
.hero-image-phone { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.hero-image-bar {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--r);
    padding: 14px;
}
.hero-image-amount { font-size: 24px; font-weight: 800; color: #fbbf24; }
.hero-image-save { font-size: 13px; opacity: 0.9; margin-top: 4px; }

/* =====================================================
   HIGHLIGHT CALC BUTTON - nút nổi bật gradient cam-vàng
   ===================================================== */
.btn-calc-highlight {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f97316 100%);
    color: #1e1b4b;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.5),
                0 0 0 4px rgba(251, 191, 36, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: calcGlow 2.5s ease-in-out infinite;
    position: relative;
}
.btn-calc-highlight:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 20px 35px -5px rgba(245, 158, 11, 0.6),
                0 0 0 6px rgba(251, 191, 36, 0.25);
}
.btn-calc-highlight:active { transform: translateY(0) scale(0.98); }
.btn-calc-icon { font-size: 22px; }
.btn-calc-arrow { font-size: 20px; transition: transform 0.2s; }
.btn-calc-highlight:hover .btn-calc-arrow { transform: translateX(4px); }

@keyframes calcGlow {
    0%, 100% {
        box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.5),
                    0 0 0 4px rgba(251, 191, 36, 0.15);
    }
    50% {
        box-shadow: 0 12px 28px -5px rgba(245, 158, 11, 0.6),
                    0 0 0 8px rgba(251, 191, 36, 0.25);
    }
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    padding: 80px 0;
}
.section-light { background: var(--bg); }
.section-blue {
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
}
.section-header p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   PRICING
   ===================================================== */
.pricing-group { margin-bottom: 40px; }
.pricing-group-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.pricing-card {
    background: white;
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.pricing-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}
.pricing-card-storages {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-bottom: 16px;
}
.pricing-storage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}
.pricing-storage-name { color: var(--text-2); font-weight: 500; }
.pricing-storage-loan { color: var(--primary); font-weight: 700; }
.pricing-card-action { text-align: center; }

/* =====================================================
   CALCULATOR
   ===================================================== */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.calc-form-card {
    background: white;
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.calc-form-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}
.form-group { margin-bottom: 16px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.required { color: #ef4444; }
.form-control-plain {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    background: white;
    font-size: 14px;
    transition: all 0.2s;
}
.form-control-plain:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-light);
}
.text-right { text-align: right; }
.calc-result {
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    padding: 20px;
    border-radius: var(--r);
    margin: 20px 0;
}
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-2);
}
.calc-row.big {
    border-top: 1.5px solid white;
    padding-top: 12px;
    margin-top: 8px;
    font-size: 16px;
}
.calc-row.big strong { color: var(--primary); }

.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.calc-sidebar > div, .calc-sidebar > h3 {
    background: white;
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.calc-sidebar h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.calc-tier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.calc-tier-row:last-child { border-bottom: none; }
.calc-tier-amount { font-weight: 700; font-size: 14px; }
.calc-tier-sub { font-size: 11px; color: var(--text-light); }
.calc-tier-rate {
    font-weight: 800;
    font-size: 16px;
    color: var(--primary);
}
.calc-example {
    font-size: 13px;
}
.calc-example strong { display: block; margin-bottom: 8px; }
.calc-example-detail {
    background: var(--bg);
    padding: 12px;
    border-radius: var(--r);
    border-left: 3px solid var(--primary);
    line-height: 1.8;
    font-size: 12px;
}
.calc-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}
.calc-feature { padding: 4px 0; }

/* =====================================================
   PROCESS
   ===================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.process-step {
    background: white;
    border-radius: var(--r-md);
    padding: 32px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
}
.process-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.process-num {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}
.process-icon { font-size: 48px; margin-bottom: 16px; }
.process-step h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.process-step p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* =====================================================
   CTA SECTION
   ===================================================== */
.section-cta {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.section-cta h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}
.section-cta p {
    font-size: 16px;
    margin-bottom: 32px;
    opacity: 0.9;
}
.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.section-cta .btn-primary {
    background: #fbbf24;
    color: #1e40af;
}
.section-cta .btn-primary:hover {
    background: #f59e0b;
    color: #1e40af;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer-public {
    background: #0f172a;
    color: rgba(255,255,255,0.8);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-brand .brand-logo { width: 36px; height: 36px; }
.footer-brand .brand-name { color: white; font-size: 15px; }
.footer-public p { font-size: 13px; margin: 4px 0; }
.footer-public a { color: rgba(255,255,255,0.7); }
.footer-public a:hover { color: white; }
.footer-public h4 {
    font-size: 14px;
    color: white;
    margin-bottom: 12px;
    font-weight: 700;
}
.footer-public ul {
    list-style: none;
}
.footer-public ul li {
    padding: 4px 0;
    font-size: 13px;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
}

/* =====================================================
   FLOATING ACTION BUTTONS (mobile)
   ===================================================== */
.floating-actions {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 96px;
    z-index: 90;
    flex-direction: column;
    gap: 12px;
}
.fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    border: 2.5px solid white;
}
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.95); }
.fab-messenger { background: linear-gradient(135deg, #0084ff, #0066ff); }
.fab-zalo { background: linear-gradient(135deg, #0068ff, #0052cc); }
.fab-phone { background: linear-gradient(135deg, #10b981, #059669); animation: ringPulse 1.5s ease-in-out infinite; }

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6), 0 6px 16px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0), 0 6px 16px rgba(0, 0, 0, 0.2); }
}

/* Khi không có FAB, grid 4 cột đều */
.bnav-grid:not(:has(.bnav-fab)) {
    grid-template-columns: repeat(4, 1fr);
}

/* =====================================================
   BOTTOM NAV MOBILE (giống app)
   ===================================================== */
.bottom-nav-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 95;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bnav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr;
    align-items: center;
    height: 70px;
    max-width: 500px;
    margin: 0 auto;
}
.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
    height: 100%;
}
.bnav-item.active {
    color: var(--primary);
}
.bnav-item.active svg { stroke: var(--primary); }
.bnav-item svg { stroke: var(--text-light); transition: stroke 0.2s; }

/* Nút nổi bật trung tâm */
.bnav-fab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    margin-top: -22px;
    height: 100%;
}
.bnav-fab-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316, #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    border: 3px solid white;
    transition: transform 0.2s;
    margin-bottom: -8px;
}
.bnav-fab:hover .bnav-fab-icon { transform: scale(1.05); }
.bnav-fab-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.open { display: flex; }
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    position: relative;
    background: white;
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-xl);
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
}
.modal-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* =====================================================
   ALERT
   ===================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--r);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { height: 56px; }
    .brand-tagline { display: none; }
    .brand-logo { width: 38px; height: 38px; font-size: 18px; }
    .brand-name { font-size: 14px; }

    .hero { padding: 32px 0 56px; }
    .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-image { display: none; }
    .hero-features { grid-template-columns: 1fr; }
    .hero-title { font-size: 26px; }
    .hero-desc { font-size: 14px; margin-bottom: 20px; }
    .hero-badge { font-size: 11px; padding: 5px 10px; }

    .section { padding: 48px 0; }
    .section-header h2 { font-size: 24px; }
    .section-header p { font-size: 13px; }
    .section-header { margin-bottom: 32px; }

    /* Đưa CALCULATOR lên đầu cho mobile */
    /* (reordering done via flexbox order) */

    .calc-grid { grid-template-columns: 1fr; }
    .calc-form-card { padding: 20px; }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .process-step { padding: 24px 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .cta-buttons { flex-direction: column; align-items: stretch; padding: 0 16px; }
    .pricing-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .modal-content { padding: 20px; margin: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }

    .header-actions .btn { font-size: 12px; padding: 8px 12px; }
    .header-actions .btn-outline { display: none; }

    /* Hiện bottom nav mobile */
    .bottom-nav-mobile { display: block; }
    /* Hiện floating buttons */
    .floating-actions { display: flex; }

    /* Padding-bottom cho content tránh bottom nav che */
    body { padding-bottom: 80px; }
    .footer-public { padding-bottom: 80px; }
}

/* =====================================================
   AUTH PAGE (login / signup)
   ===================================================== */
.auth-page {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    min-height: 100vh;
}
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
}
.auth-back-link {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}
.auth-back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}
.auth-card {
    background: white;
    border-radius: var(--r-lg);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}
.auth-card-wide {
    max-width: 560px;
}
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.auth-header h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.auth-header p {
    font-size: 13px;
    color: var(--text-light);
}
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--r);
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.auth-form { display: flex; flex-direction: column; }
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.auth-field { margin-bottom: 14px; }
.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.auth-input-group {
    position: relative;
}
.auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}
.auth-input, .auth-input-plain {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
    font-size: 14px;
    transition: all 0.2s;
}
.auth-input {
    padding-left: 40px;
}
.auth-input:focus, .auth-input-plain:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-light);
}
.auth-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--r);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}
.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.auth-divider {
    text-align: center;
    margin: 20px 0;
    color: var(--text-lighter);
    font-size: 12px;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span {
    background: white;
    padding: 0 10px;
    position: relative;
}
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
}

@media (max-width: 480px) {
    .auth-card { padding: 24px; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
}