:root {
    --primary-color: #0066cc;
    /* Xanh dương VIB */
    --primary-dark: #004c99;
    --bg-color: #f6f7fb;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #eaeaea;
}

/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-ring {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,102,204,0.5); }
    70%  { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(0,102,204,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,102,204,0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes bounce-in {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.08); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
}

/* App Container for mobile-first look */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    padding-bottom: 70px;
    /* Space for bottom nav */
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Navbar Top */
.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: transparent;
}

.top-nav h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Green Loan Card */
.loan-card {
    background-color: var(--primary-color);
    border-radius: 16px;
    margin: 0 16px;
    padding: 20px;
    color: var(--white);
    box-shadow: 0 8px 16px rgba(56, 177, 89, 0.2);
}

.loan-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 20px;
    opacity: 0.9;
    align-items: center;
}

.loan-card-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.loan-card-body h2 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
}

.loan-card-body .amount {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.loan-card-body .subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.loan-card-footer {
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CTA Button */
.cta-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 16px;
    margin: 20px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(56, 177, 89, 0.3);
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

/* Feature List */
.section-title {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin: 10px 0 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title::before,
.section-title::after {
    content: "";
    height: 1px;
    width: 30px;
    background-color: #ddd;
    margin: 0 10px;
}

.feature-list {
    margin: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    background-color: var(--white);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(56, 177, 89, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.feature-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 500;
}

.bottom-text {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 24px;
    padding: 0 30px;
    line-height: 1.5;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.2s;
    flex: 1;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Profile Page Styles */
.profile-header {
    background-color: var(--primary-color);
    padding: 20px 16px 60px;
    color: var(--white);
    text-align: center;
    position: relative;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.profile-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.settings-icon {
    position: absolute;
    right: 16px;
    top: 20px;
    color: var(--white);
    cursor: pointer;
}

.profile-card {
    background-color: var(--white);
    border-radius: 16px;
    margin: -40px 16px 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.profile-card:after {
    content: "›";
    font-size: 24px;
    color: var(--text-muted);
    position: absolute;
    right: 20px;
}

.menu-list {
    background-color: var(--white);
    margin: 0 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f9f9f9;
}

.menu-icon {
    width: 20px;
    color: var(--primary-color);
    margin-right: 15px;
    display: flex;
    justify-content: center;
}

.menu-arrow {
    margin-left: auto;
    color: #ccc;
    font-size: 18px;
}

.customer-service-btn {
    position: fixed;
    bottom: 85px;
    right: 16px;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.4);
    color: #fff;
    z-index: 200;
    border: 3px solid rgba(255,255,255,0.8);
    animation: pulse-ring 2.5s ease-in-out infinite;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.customer-service-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 24px rgba(0, 102, 204, 0.55);
    animation: none;
}

.customer-service-btn svg {
    animation: float 3s ease-in-out infinite;
}

/* ==========================================
   PAGE ENTRY ANIMATIONS
   ========================================== */

.app-container,
.app-wrapper {
    animation: fadeIn 0.35s ease;
}

.dashboard-header,
.top-bar {
    animation: fadeInDown 0.45s ease;
}

.loan-action-card,
.wallet-card-wrap {
    animation: scaleIn 0.45s ease 0.1s both;
}

.credit-wrap {
    animation: fadeInUp 0.45s ease 0.15s both;
}

.offers-section {
    animation: fadeInUp 0.45s ease 0.2s both;
}

.tabs-wrap {
    animation: fadeInUp 0.45s ease 0.05s both;
}

.tab-content.active {
    animation: fadeInUp 0.3s ease;
}

.loan-card,
.wd-card,
.menu-card {
    animation: fadeInUp 0.4s ease both;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-row {
    transition: background 0.2s, padding-left 0.2s;
}

.menu-row:hover {
    background: #f0f7ff;
    padding-left: 22px;
}

/* ==========================================
   BUTTON & INTERACTIVE EFFECTS
   ========================================== */

.btn-continue {
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s !important;
    cursor: pointer;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,102,204,0.4) !important;
}

.btn-continue:active {
    transform: translateY(0);
}

.duration-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.duration-btn.active {
    transform: scale(1.06);
}

.wallet-btn-main {
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.wallet-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4) !important;
}

.offer-btn {
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.offer-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.offer-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.offer-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

/* ==========================================
   SHIMMER LOADING SKELETON
   ========================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ==========================================
   BOTTOM NAV ANIMATIONS
   ========================================== */

.bottom-nav {
    animation: fadeIn 0.4s ease 0.3s both;
}

.nav-item,
.nav-item-b {
    transition: transform 0.2s, color 0.2s !important;
}

.nav-item:hover,
.nav-item-b:hover {
    transform: translateY(-3px);
}

.nav-item.active,
.nav-item-b.active {
    transform: translateY(-2px);
}

/* ==========================================
   CREDIT BAR ANIMATED
   ========================================== */

.credit-bar-fill {
    animation: slideInRight 1.2s ease 0.3s both !important;
}

/* ==========================================
   SLIDER TRACK GRADIENT
   ========================================== */

input[type=range]::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, var(--primary-color), #60a5fa) !important;
    transition: background 0.3s;
}

/* ==========================================
   TOP BAR GRADIENT ANIMATED
   ========================================== */

.top-bar {
    background: linear-gradient(135deg, #1d4ed8, #2563eb, #1e40af) !important;
    background-size: 200% 200% !important;
    animation: gradient-shift 6s ease infinite, fadeInDown 0.45s ease !important;
}

/* ==========================================
   FEATURE ITEM STAGGER
   ========================================== */

.feature-item:nth-child(1) { animation: fadeInUp 0.4s ease 0.05s both; }
.feature-item:nth-child(2) { animation: fadeInUp 0.4s ease 0.12s both; }
.feature-item:nth-child(3) { animation: fadeInUp 0.4s ease 0.19s both; }
.feature-item:nth-child(4) { animation: fadeInUp 0.4s ease 0.26s both; }

/* ==========================================
   MISC POLISH
   ========================================== */

.credit-circle {
    animation: bounce-in 0.6s ease 0.4s both;
}

.empty-icon {
    animation: float 2.5s ease-in-out infinite;
    display: block;
}

.installment-box {
    transition: background 0.3s;
}

.installment-value {
    animation: count-up 0.5s ease both;
}