/* ============================================
   TRAINING HUB - Design System
   Premium Dark Mode + Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === CSS Variables === */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-glass-hover: rgba(0, 0, 0, 0.06);

    --border-glass: rgba(0, 0, 0, 0.08);
    --border-active: rgba(56, 189, 248, 0.5);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --accent-blue: #38bdf8;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;
    --accent-emerald: #34d399;
    --accent-amber: #fbbf24;
    --accent-orange: #fb923c;
    --accent-red: #f87171;

    --gradient-main: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-warm: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));

    --sidebar-width: 300px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
    --shadow-glow-blue: 0 0 30px rgba(56, 189, 248, 0.15);
    --shadow-glow-purple: 0 0 30px rgba(167, 139, 250, 0.15);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 800px 600px at 20% 20%, rgba(56, 189, 248, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 80% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--accent-purple); }

/* === Layout Shell === */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.35s ease;
}

.sidebar-logo {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-logo h2 {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.sidebar-logo span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Nav Items */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

/* Sidebar Accordion Sections */
.nav-section {
    margin-bottom: 4px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 14px 12px 8px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.nav-section-title:hover {
    color: var(--text-primary);
}

.nav-section-title--boss {
    color: #f43f5e;
}

.nav-section-title--boss:hover {
    color: #fb7185;
}

.nav-section-arrow {
    font-size: 0.55rem;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.nav-section.open .nav-section-arrow {
    transform: rotate(0deg);
}

.nav-section:not(.open) .nav-section-arrow {
    transform: rotate(-90deg);
}

.nav-section-items {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.nav-section:not(.open) .nav-section-items {
    max-height: 0;
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-main);
    border-radius: 3px;
    transition: height var(--transition-fast);
}

.nav-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent-blue);
    font-weight: 600;
}

.nav-item.active::before {
    height: 60%;
}

.nav-icon {
    font-size: 1.15rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-vip { background: rgba(52, 211, 153, 0.15); color: var(--accent-emerald); }
.badge-safe { background: rgba(251, 191, 36, 0.15); color: var(--accent-amber); }
.badge-warn { background: rgba(251, 146, 60, 0.15); color: var(--accent-orange); }
.badge-danger { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); }
.badge-new { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-glass);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* === Main Content === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Top Bar */
.topbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-breadcrumb span {
    color: var(--accent-blue);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.hamburger:hover {
    background: var(--bg-glass-hover);
}

/* === Page Content Area === */
.page-content {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto; /* Căn giữa trang */
    animation: fadeInContent 0.5s ease-out;
}

/* Tự động giãn rộng tối đa trên desktop cho các trang chứa tài liệu nhúng trực tiếp */
.main-content:has(#app-content > .iframe-container-wrapper) .page-content {
    max-width: 100% !important;
    padding: 0 !important;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Welcome / Home Page === */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.grid-container.single-col {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* Base Card Style */
.card {
    background: var(--card-bg, rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1; /* Ensure visible in SPA */
}

.card:hover {
    transform: translateY(-10px);
    background: var(--card-hover, rgba(255, 255, 255, 1));
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transition: height 0.3s ease;
}

/* Status Colors for Cards */
.card.vip::before { background: #10b981; }
.card.safe::before { background: #eab308; }
.card.warn::before { background: #f97316; }
.card.danger::before { background: #ef4444; }

.card h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.4;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card.vip .badge { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.card.safe .badge { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.card.warn .badge { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.card.danger .badge { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.content-group {
    margin-bottom: 20px;
    font-size: 1rem;
}

.content-group strong {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.content-group p {
    color: var(--text-secondary);
    padding-left: 15px;
    border-left: 2px solid rgba(0,0,0,0.1);
}

/* Pro Tip / Upgrade Box */
.upgrade-box {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.1), rgba(192, 132, 252, 0.02));
    border-radius: 12px;
    border: 1px dashed rgba(192, 132, 252, 0.3);
    position: relative;
}

.upgrade-box::before {
    content: '🔥 TƯ DUY NÂNG CẤP';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-primary); /* Match SPA bg */
    padding: 0 10px;
    color: #c084fc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.upgrade-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.core-principle {
    max-width: 1000px;
    margin: 0 auto 60px auto;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-left: 6px solid var(--accent-blue);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.core-principle h2 {
    color: var(--accent-blue);
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.core-principle p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.page-title-bar {
    text-align: center;
    margin-bottom: 50px;
}

.page-title-bar h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}
.strategy-section {
    margin-bottom: 24px;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 48px 0 24px;
}

.section-divider .line {
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.section-divider .label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 20px;
    white-space: nowrap;
}

.section-divider .label.vip { background: rgba(52, 211, 153, 0.1); color: var(--accent-emerald); border: 1px solid rgba(52, 211, 153, 0.2); }
.section-divider .label.safe { background: rgba(251, 191, 36, 0.1); color: var(--accent-amber); border: 1px solid rgba(251, 191, 36, 0.2); }
.section-divider .label.warn { background: rgba(251, 146, 60, 0.1); color: var(--accent-orange); border: 1px solid rgba(251, 146, 60, 0.2); }
.section-divider .label.danger { background: rgba(248, 113, 113, 0.1); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.2); }

.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.strategy-card.vip::before { background: var(--accent-emerald); }
.strategy-card.safe::before { background: var(--accent-amber); }
.strategy-card.warn::before { background: var(--accent-orange); }
.strategy-card.danger::before { background: var(--accent-red); }

.strategy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.08);
}

.strategy-card .card-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.strategy-card.vip .card-badge { background: rgba(52, 211, 153, 0.1); color: var(--accent-emerald); }
.strategy-card.safe .card-badge { background: rgba(251, 191, 36, 0.1); color: var(--accent-amber); }
.strategy-card.warn .card-badge { background: rgba(251, 146, 60, 0.1); color: var(--accent-orange); }
.strategy-card.danger .card-badge { background: rgba(248, 113, 113, 0.1); color: var(--accent-red); }

.strategy-card h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.4;
}

.card-section {
    margin-bottom: 18px;
}

.card-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-section-content {
    padding-left: 16px;
    border-left: 2px solid rgba(0,0,0,0.08);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.card-section-content em {
    color: var(--accent-purple);
    font-style: italic;
}

/* Upgrade / Pro Tip Box */
.upgrade-tip {
    margin-top: 24px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06), rgba(244, 114, 182, 0.04));
    border: 1px dashed rgba(167, 139, 250, 0.25);
    border-radius: var(--radius-md);
    position: relative;
}

.upgrade-tip-label {
    position: absolute;
    top: -11px;
    left: 20px;
    background: var(--bg-card);
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-purple);
    text-transform: uppercase;
}

.upgrade-tip p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

.upgrade-tip strong {
    color: var(--accent-purple);
}

/* === Kịch Bản Page Styles === */
.script-step {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    transition: all var(--transition-smooth);
}

.script-step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-main);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.script-step h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.dialogue {
    background: rgba(0,0,0,0.03);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 12px 0;
    border-left: 3px solid var(--accent-blue);
}

.dialogue .speaker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.dialogue .speaker.customer { color: var(--accent-amber); }
.dialogue .speaker.sale { color: var(--accent-emerald); }

.dialogue p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
}

/* Objection Handling */
.objection-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.objection-item {
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    border: 1px solid var(--border-glass);
}

.objection-item .objection-trigger {
    font-weight: 600;
    color: var(--accent-amber);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.objection-item .objection-response {
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding-left: 14px;
    border-left: 2px solid var(--accent-emerald);
}

/* === Mobile Responsive === */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .page-content {
        padding: 24px 20px;
    }

    .welcome-hero h1 {
        font-size: 2rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* === Print styles === */
@media print {
    body { background: #fff; color: #000; }
    .sidebar, .topbar, .hamburger { display: none !important; }
    .main-content { margin-left: 0; }
    .strategy-card { break-inside: avoid; border: 1px solid #ddd; }
}

/* ============================================
   LOGIN SCREEN - Premium Glassmorphism
   ============================================ */
.login-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.login-screen.active {
    display: flex;
}

/* Animated Background Orbs */
.login-bg-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

.login-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5), transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.login-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.5), transparent 70%);
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.login-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.4), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    animation-duration: 22s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.03); }
}

/* Login Card */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: loginCardIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Login Logo */
.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--gradient-main);
    border-radius: 22px;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.3);
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from { box-shadow: 0 12px 32px rgba(56, 189, 248, 0.3); }
    to { box-shadow: 0 12px 40px rgba(167, 139, 250, 0.4); }
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-logo span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

/* Login Description */
.login-desc {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* In-App Browser Warning */
.inapp-warning {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInSuccess 0.5s ease;
}

.inapp-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    font-size: 1.5rem;
    color: #fbbf24;
    margin: 0 auto 16px;
}

.inapp-warning h3 {
    color: #fbbf24;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.inapp-warning > p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.inapp-warning > p strong {
    color: #fbbf24;
}

.inapp-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    text-align: left;
}

.inapp-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.inapp-step strong {
    color: #fff;
}

.inapp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    border-radius: 50%;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
}

.inapp-copy-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.inapp-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
}

.inapp-copy-btn:active {
    transform: translateY(0);
}

.inapp-copy-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 10px;
    color: #34d399;
    font-size: 0.82rem;
    animation: fadeInSuccess 0.3s ease;
}

@keyframes fadeInSuccess {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Google Sign-In Button */
.google-signin-btn {
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.google-signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.15);
    background: #f8f9fa;
}

.google-signin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.google-icon {
    flex-shrink: 0;
}

/* Login Loading */
.login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.92rem;
}

.login-loading i {
    font-size: 1.2rem;
    color: var(--accent-blue);
}

/* Login Error */
.login-error {
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.5;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Login Footer */
.login-footer {
    margin-top: 28px;
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ============================================
   ACCESS DENIED - Chờ Admin Cấp Phép
   ============================================ */
.access-denied-card {
    text-align: center;
    max-width: 480px;
}

.denied-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    font-size: 2rem;
    color: #fbbf24;
    margin: 0 auto 20px;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.15); }
    50% { box-shadow: 0 0 35px rgba(251, 191, 36, 0.3); }
}

.denied-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 20px;
}

.denied-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.denied-avatar-wrap {
    margin-bottom: 4px;
}

.denied-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(251, 191, 36, 0.4);
}

.denied-avatar-icon {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.denied-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.denied-email {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.denied-message {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.denied-message strong {
    color: var(--accent-blue);
}

.denied-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    text-align: left;
}

.denied-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
}

.denied-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.denied-back-btn {
    width: 100%;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.denied-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================
   TOPBAR - User Info & Logout
   ============================================ */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 50px;
    cursor: default;
    transition: all var(--transition-fast);
}

.user-profile:hover {
    background: rgba(56, 189, 248, 0.1);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(56, 189, 248, 0.3);
}

.user-avatar-icon {
    font-size: 1.6rem;
    color: var(--accent-blue);
    width: 30px;
    text-align: center;
}

.user-name {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   ADMIN PANEL - Email Management
   ============================================ */
.admin-panel {
    max-width: 800px;
    margin: 0 auto;
}

.admin-add-form {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.admin-add-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-main);
}

.admin-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.admin-form-header i {
    color: var(--accent-blue);
    font-size: 1.2rem;
}

.admin-form-header h3 {
    font-weight: 700;
    margin: 0;
}

.admin-input-group {
    display: flex;
    gap: 12px;
}

.admin-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all var(--transition-fast);
}

.admin-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.admin-input::placeholder {
    color: var(--text-muted);
}

.admin-btn-add {
    padding: 14px 24px;
    background: var(--gradient-main);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.admin-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

.admin-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.admin-list-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.admin-list-header h3 i {
    color: var(--accent-purple);
}

.admin-count {
    padding: 4px 14px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 20px;
    color: var(--accent-purple);
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: all var(--transition-fast);
}

.admin-email-row:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.admin-email-row.admin-row {
    background: rgba(56, 189, 248, 0.04);
    border-color: rgba(56, 189, 248, 0.15);
}

.admin-email-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-email-addr {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-email-addr i {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.admin-row .admin-email-addr i {
    color: #fbbf24;
}

.admin-badge {
    display: inline-flex;
    padding: 2px 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(167, 139, 250, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    color: var(--accent-blue);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-left: 8px;
}

.leader-badge {
    display: inline-flex;
    padding: 2px 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 146, 60, 0.15));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-left: 8px;
}

.admin-email-row.leader-row {
    background: rgba(251, 191, 36, 0.03);
    border-color: rgba(251, 191, 36, 0.12);
}

.icon-admin { color: #fbbf24 !important; }
.icon-leader { color: #fb923c !important; }

.admin-email-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* Role Select Dropdown */
.admin-role-select {
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 160px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10L6 8z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.admin-role-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.admin-role-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px;
}

/* Role Hint */
.admin-role-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    line-height: 1.5;
}

.admin-role-hint i {
    color: #fbbf24;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.admin-role-hint strong {
    color: #fbbf24;
}

/* Topbar User Role Badge */
.user-role-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-role-badge.role-admin {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(167, 139, 250, 0.12));
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-blue);
}

.user-role-badge.role-leader {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.admin-btn-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.12);
    border-radius: 10px;
    color: var(--accent-red);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.admin-btn-remove:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
    transform: scale(1.1);
}

.admin-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Mobile: Login & Admin */
@media (max-width: 900px) {
    .login-card {
        margin: 20px;
        padding: 36px 28px;
    }

    .topbar-right {
        gap: 10px;
    }

    .topbar-breadcrumb {
        display: none;
    }

    .user-name {
        display: none;
    }

    .user-role-badge {
        display: none;
    }

    .admin-input-group {
        flex-direction: column;
    }

    .admin-role-select {
        min-width: unset;
    }

    .admin-email-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-btn-remove {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .login-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .login-logo h1 {
        font-size: 1.4rem;
    }
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* Hero */
.profile-hero {
    position: relative;
    border-radius: var(--radius-xl, 20px) var(--radius-xl, 20px) 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 30px 30px;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1), transparent 40%);
}

.profile-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.4);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.8);
}

.profile-level-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.profile-role {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
}

.profile-role.role-admin { background: rgba(244,63,94,0.3); color: #fda4af; }
.profile-role.role-leader { background: rgba(251,191,36,0.3); color: #fde68a; }
.profile-role.role-member { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); }

.profile-email-display {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* Tabs */
.profile-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-card, #fff);
    border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    border-top: none;
}

.profile-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.profile-tab:hover {
    background: rgba(0,0,0,0.02);
    color: var(--text-primary);
}

.profile-tab.active {
    background: var(--bg-primary);
    color: var(--accent-blue);
    box-shadow: 0 -3px 0 var(--accent-blue) inset;
}

/* Tab Panels */
.profile-tab-panel {
    display: none;
    padding: 24px 0;
    animation: profileFadeIn 0.3s ease;
}

.profile-tab-panel.active {
    display: block;
}

@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info Tab */
.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-field {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg, 14px);
    padding: 16px 20px;
    transition: all 0.3s ease;
}

.profile-field:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 15px rgba(59,130,246,0.08);
}

.profile-field.full-width {
    grid-column: 1 / -1;
}

.profile-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.profile-field label i {
    color: var(--accent-blue);
    margin-right: 6px;
}

.profile-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-glass, rgba(255,255,255,0.6));
    transition: all 0.3s ease;
    outline: none;
}

.profile-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.profile-textarea {
    min-height: 80px;
    resize: vertical;
}

.profile-save-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.profile-save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.profile-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.profile-save-status {
    font-size: 0.85rem;
    font-weight: 600;
}

.save-success { color: #34d399; }
.save-error { color: #f87171; }

/* Dashboard Tab */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.dash-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg, 16px);
    padding: 24px;
    transition: all 0.3s ease;
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.dash-card-hero {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.04));
}

.dash-progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.dash-progress-ring svg {
    width: 100%;
    height: 100%;
}

.dash-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-progress-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dash-progress-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.dash-hero-info {
    flex: 1;
}

.dash-level {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dash-level-icon { font-size: 1.5rem; }
.dash-level-name { font-size: 1.3rem; font-weight: 800; }

.dash-hero-stat {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.dash-xp-bar {
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.dash-xp-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.dash-card-week {
    padding: 18px 24px;
}

.dash-week-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.dash-week-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-week-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.dash-week-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.dash-week-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 35px;
    text-align: right;
}

/* Roadmap Tab */
.roadmap-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.roadmap-week-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.roadmap-week-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.roadmap-week-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.roadmap-week-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.roadmap-modules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 24px;
    border-left: 3px solid var(--border-glass);
    margin-left: 23px;
}

.roadmap-module {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 4px;
    transition: all 0.3s ease;
}

.roadmap-module:hover {
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 4px 15px rgba(59,130,246,0.08);
    transform: translateX(4px);
}

.roadmap-module.completed {
    background: rgba(52,211,153,0.06);
    border-color: rgba(52,211,153,0.2);
}

.roadmap-module-check {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--border-glass);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border-radius: 10px;
}

.roadmap-module-check:hover {
    color: #34d399;
    transform: scale(1.15);
    background: rgba(52,211,153,0.08);
}

.roadmap-module.completed .roadmap-module-check {
    color: #34d399;
}

.roadmap-module-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    padding: 10px 16px 10px 0;
    cursor: pointer;
}

.roadmap-module-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.roadmap-module-info {
    flex: 1;
    min-width: 0;
}

.roadmap-module-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.roadmap-module-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roadmap-module.completed .roadmap-module-info h4 {
    color: #34d399;
}

.roadmap-module-arrow {
    color: var(--border-glass);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    padding-right: 8px;
}

.roadmap-module:hover .roadmap-module-arrow {
    color: var(--accent-blue);
    transform: translateX(4px);
}

/* Loading */
.profile-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-hero-info {
        align-items: center;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .dash-card-hero {
        flex-direction: column;
        text-align: center;
    }

    .profile-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 16px 16px;
    }

    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .profile-tab {
        flex: 0 0 auto !important;
        padding: 14px 18px !important;
        font-size: 0.85rem !important;
    }

    .profile-tab i {
        display: inline-block !important;
        font-size: 0.85rem;
    }

    .roadmap-modules {
        padding-left: 16px;
        margin-left: 16px;
    }

    .roadmap-module-info p {
        white-space: normal;
    }

    .profile-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-save-btn {
        justify-content: center;
    }
}

/* ============================================
   MONEY MODEL CALCULATOR (Dashboard Tab)
   ============================================ */
.money-model {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Target Card */
.mm-target-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl, 20px);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.mm-target-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.mm-target-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.mm-target-header i {
    color: #f59e0b;
    font-size: 1.3rem;
}

.mm-target-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.mm-target-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.mm-input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.mm-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.mm-currency {
    position: absolute;
    left: 16px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f59e0b;
    z-index: 1;
}

.mm-input {
    width: 100%;
    padding: 16px 20px 16px 44px;
    border: 2px solid var(--border-glass);
    border-radius: 14px;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-glass, rgba(255,255,255,0.6));
    outline: none;
    transition: all 0.3s ease;
}

.mm-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}

.mm-period-toggle {
    display: flex;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.mm-period-btn {
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.mm-period-btn.active {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 700;
}

.mm-period-btn:not(.active):hover {
    background: rgba(0,0,0,0.03);
    color: var(--text-primary);
}

/* Funnel Visualization */
.mm-funnel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mm-funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.mm-funnel-step:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.mm-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mm-step-leads .mm-step-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }
.mm-step-viewing .mm-step-icon { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.mm-step-lots .mm-step-icon { background: rgba(52,211,153,0.1); color: #34d399; }
.mm-step-money .mm-step-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }

.mm-step-content {
    flex: 1;
}

.mm-step-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.mm-step-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mm-step-ratio {
    padding: 6px 14px;
    background: rgba(0,0,0,0.04);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.mm-funnel-arrow {
    display: flex;
    justify-content: center;
    padding: 6px 0;
    color: var(--border-glass);
    font-size: 0.9rem;
}

/* Daily Highlight Card */
.mm-daily-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: var(--radius-xl, 20px);
    color: #fff;
    box-shadow: 0 8px 30px rgba(245,158,11,0.3);
    position: relative;
    overflow: hidden;
}

.mm-daily-card::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.mm-daily-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.mm-daily-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.mm-daily-num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.mm-daily-label {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
}

.mm-daily-label strong {
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mm-daily-sub {
    font-size: 0.78rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Advanced Settings */
.mm-advanced {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
}

.mm-advanced summary {
    padding: 16px 24px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
    list-style: none;
    transition: all 0.3s ease;
}

.mm-advanced summary::-webkit-details-marker { display: none; }

.mm-advanced summary:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.02);
}

.mm-advanced summary i {
    color: var(--accent-blue);
}

.mm-advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 0 24px 24px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}

.mm-adv-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.mm-adv-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mm-adv-input-wrap span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.mm-adv-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-glass, rgba(255,255,255,0.6));
    outline: none;
    transition: all 0.3s ease;
}

.mm-adv-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Save Bar */
.mm-save-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mm-save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

.mm-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

.mm-save-status {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Money Model Responsive */
@media (max-width: 768px) {
    .mm-input-row {
        flex-direction: column;
    }

    .mm-input {
        font-size: 1.1rem;
    }

    .mm-period-toggle {
        align-self: stretch;
    }

    .mm-period-btn {
        flex: 1;
        text-align: center;
    }

    .mm-advanced-grid {
        grid-template-columns: 1fr;
    }

    .mm-daily-num {
        font-size: 2.2rem;
    }

    .mm-funnel-step {
        padding: 16px 18px;
    }

    .mm-step-num {
        font-size: 1.2rem;
    }

    .mm-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .mm-save-btn {
        justify-content: center;
    }
}

/* ============================================================
   IFRAME CONTAINER WRAPPER & MOBILE/DESKTOP AUTO-LAYOUT
   ============================================================ */
.iframe-container-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 70px) !important; /* Lấp đầy chiều cao còn lại của viewport (trừ đi topbar 70px) */
    min-height: unset;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-card, #ffffff);
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    position: relative;
}

/* Ẩn các class cũ không dùng nữa */
.iframe-actions-bar,
.iframe-btn-open,
.floating-expand-btn,
.iframe-doc-title {
    display: none !important;
}

/* Scrollable container for iframe scroll fixes on iOS */
.iframe-scroll-container {
    position: relative;
    width: 100%;
    flex: 1; /* Tự co giãn theo chiều cao của wrapper */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

/* Tự động nhận diện thiết bị di động (Mobile Mode dưới 900px) */
@media (max-width: 900px) {
    /* Cho phép trang nội dung tràn viền hoàn toàn trên mobile */
    .page-content {
        padding: 0 !important;
    }

    /* 1. Iframe là nội dung chính độc lập của trang */
    #app-content > .iframe-container-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        height: calc(100vh - 70px) !important; /* Lấp đầy 100% chiều cao dưới topbar */
        min-height: unset !important;
        position: relative;
    }

    #app-content > .iframe-container-wrapper .iframe-scroll-container {
        height: 100% !important;
        border-radius: 0 !important;
    }

    /* 2. Iframe nằm bên trong tab/panel (ví dụ: cẩm nang MQH ở trang Chọn Kênh) */
    .profile-tab-panel {
        padding: 16px 0 !important;
    }
    
    .profile-tab-panel .iframe-container-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.08)) !important;
        box-shadow: var(--shadow-sm) !important;
        margin-bottom: 0 !important;
        height: calc(100vh - 230px) !important; /* chiều cao hợp lý để chừa tiêu đề và tab ở trên */
        min-height: unset !important;
        position: relative;
    }

    .profile-tab-panel .iframe-scroll-container {
        height: 100% !important;
        border-radius: 12px !important;
    }
}

/* Ghi đè thiết kế riêng cho iframe nằm trong tab/panel trên Desktop (ngoài media query) */
.profile-tab-panel .iframe-container-wrapper {
    height: calc(100vh - 260px) !important; /* Chiều cao tối ưu trên Desktop cho cẩm nang */
    border-radius: 16px;
    border: 1px solid var(--border-glass, rgba(0, 0, 0, 0.08));
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* ============================================
   THƯ VIỆN BÀI MẪU ĐĂNG TIN ẢO & NGUYÊN LÝ ẨN
   ============================================ */
.principle-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 50%;
    color: #f59e0b;
    font-size: 0.95rem;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.principle-trigger-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.gallery-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 10px;
}

.gallery-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-glass, rgba(0,0,0,0.08));
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.08));
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue, #38bdf8);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.15);
}

.gallery-image-wrapper {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    border-bottom: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image-wrapper img {
    transform: scale(1.08);
}

.gallery-info {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-number {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.gallery-tag {
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--accent-blue, #38bdf8);
    padding: 3px 8px;
    border-radius: 6px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-1, #3b82f6), var(--accent-2, #8b5cf6));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

/* Lightbox styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: #fff;
    font-size: 2.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: #f43f5e;
    transform: scale(1.1);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 2.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    z-index: 10000;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    color: rgba(255,255,255,0.6);
    margin-top: 15px;
    font-size: 0.88rem;
    font-family: monospace;
}

.lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 24px;
    background: #10b981;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.lightbox-download:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* Principle Modal styles */
.principle-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9990;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.principle-modal.active {
    display: flex;
    opacity: 1;
}

.principle-modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 90%;
    max-width: 820px;
    max-height: 85vh;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.principle-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    z-index: 10;
}

.principle-modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.principle-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.principle-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.principle-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin-bottom: 4px;
}

.principle-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.principle-scroll-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbar for scroll body */
.principle-scroll-body::-webkit-scrollbar {
    width: 6px;
}
.principle-scroll-body::-webkit-scrollbar-track {
    background: transparent;
}
.principle-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.principle-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.principle-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.principle-card.goal {
    border-left: 4px solid var(--accent-1, #3b82f6);
    background: rgba(59, 130, 246, 0.03);
}

.principle-card.goal h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-1, #3b82f6);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.principle-card h3 i {
    font-size: 1.2rem;
}

.principle-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-secondary, #334155);
    line-height: 1.6;
}

.principle-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 5px;
    margin-bottom: -5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.principle-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--accent-gradient);
    border-radius: 10px;
}

.principle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.principle-mini-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.principle-mini-card .p-num {
    position: absolute;
    top: -8px;
    right: -5px;
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
}

.principle-mini-card h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.principle-mini-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.principle-card.rule-box {
    border-left: 4px solid var(--accent-5, #f59e0b);
    background: rgba(245, 158, 11, 0.02);
}

.principle-card.rule-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d97706;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.principle-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.85rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.principle-table th {
    background: #f8fafc;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid #e2e8f0;
}

.principle-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-secondary);
}

.principle-table tr:last-child td {
    border-bottom: none;
}

.strategy-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.strategy-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.strategy-item.priority {
    border-left: 4px solid var(--accent-3, #10b981);
}

.strategy-item.info {
    border-left: 4px solid var(--accent-5, #f59e0b);
}

.strat-badge {
    position: absolute;
    top: 15px;
    right: 16px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #059669;
}

.strat-badge.warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.strategy-item h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-main);
    padding-right: 80px;
}

.strategy-item p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.principle-card.warning-box-dark {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
}

.principle-card.warning-box-dark h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.principle-card.warning-box-dark p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile responsive for Gallery & Modal */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }
    
    .gallery-card {
        border-radius: 12px;
    }
    
    .gallery-info {
        padding: 12px;
    }
    
    .gallery-number {
        font-size: 0.8rem;
    }
    
    .gallery-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.2rem;
    }

    .lightbox-prev, .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.45);
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .principle-modal-content {
        padding: 20px;
        max-height: 90vh;
        width: 95%;
    }
    
    .principle-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ACCESS LOGS & TIMELINE MODAL (ADMIN ONLY)
   ============================================================ */
.access-logs-table tr:hover {
    background: rgba(59, 130, 246, 0.02);
}

body.dark-mode .access-logs-table tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.access-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent-blue, #3b82f6);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.access-user-avatar-text {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue, #3b82f6), #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 1.5px solid var(--accent-blue, #3b82f6);
}

.access-detail-modal.active {
    display: flex !important;
    opacity: 1 !important;
}

.access-detail-modal.active .access-modal-content {
    transform: translateY(0) !important;
}

/* Timeline Custom Styles */
.access-timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid rgba(59, 130, 246, 0.15);
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

body.dark-mode .access-timeline {
    border-left-color: rgba(59, 130, 246, 0.3);
}

.timeline-item {
    position: relative;
    padding-bottom: 4px;
}

.timeline-badge {
    position: absolute;
    left: -31px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid var(--bg-card, #ffffff);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:first-child .timeline-badge {
    background: var(--accent-blue, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-time {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.timeline-device {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Dark mode overrides for Modal Access logs */
body.dark-mode .access-modal-content {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .access-modal-user-info {
    background: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .access-logs-table th {
    color: #cbd5e1 !important;
}

body.dark-mode .access-logs-table tr {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}



