/* ============================================
   style.css - Boss Travel Hub Styles
   ============================================ */

/* ========== Root Variables ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ========== Global Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

#mobile-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

#app-content {
    padding-bottom: 70px;
    overflow-y: auto;
    height: 100vh;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

#app-content::-webkit-scrollbar { display: none; }

/* ========== Bottom Navigation ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: all 0.2s;
    position: relative;
}

.nav-item i { font-size: 1.15rem; }
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item.active i { transform: scale(1.1); }

/* ========== Hub Header ========== */
.hub-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    padding: 20px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hub-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hub-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hub-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.hub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.hub-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.hub-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hub-logo-sub {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 400;
}

.hub-user-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.hub-greeting {
    color: white;
    position: relative;
    z-index: 2;
}

.hub-greeting h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.hub-greeting p {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ========== Module Cards ========== */
.module-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 16px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.module-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.module-card:active {
    transform: scale(0.96);
}

.module-card-tour::before {
    background: linear-gradient(90deg, #f97316, #eab308);
}

.module-card-hotel::before {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.module-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
}

.module-card-tour .module-card-icon {
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    color: #ea580c;
}

.module-card-hotel .module-card-icon {
    background: linear-gradient(135deg, #f5f3ff, #fce7f3);
    color: #7c3aed;
}

.module-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.module-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.module-card-arrow {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ========== Perks / Features ========== */
.perks-row {
    display: flex;
    gap: 12px;
    padding: 20px 16px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.perks-row::-webkit-scrollbar { display: none; }

.perk-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 24px;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.perk-chip i {
    font-size: 0.85rem;
}

/* ========== Section Title ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px 12px;
}

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

.section-more {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

/* ========== Blog/Post Cards ========== */
.posts-scroll {
    display: flex;
    gap: 14px;
    padding: 0 16px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.posts-scroll::-webkit-scrollbar { display: none; }

.post-card {
    min-width: 260px;
    max-width: 280px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.post-card:active { transform: scale(0.97); }

.post-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.post-card-body {
    padding: 12px;
}

.post-card-cat {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.post-card-cat[data-cat="kham-pha"] { background: #dbeafe; color: #1d4ed8; }
.post-card-cat[data-cat="tin-tuc"] { background: #dcfce7; color: #16a34a; }
.post-card-cat[data-cat="meo-du-lich"] { background: #fef3c7; color: #b45309; }

.post-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ========== Blog Posts List (Full) ========== */
.posts-grid {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-list-item {
    display: flex;
    gap: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.post-list-item:active { transform: scale(0.98); }

.post-list-img {
    width: 110px;
    min-height: 90px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.post-list-body {
    padding: 10px 12px 10px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-list-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.post-list-excerpt {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Post Detail ========== */
.post-detail {
    padding: 0;
}

.post-detail-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-detail-body {
    padding: 20px 16px;
}

.post-detail-body h1 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.post-detail-content {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #334155;
}

.post-detail-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--text-primary);
}

.post-detail-content p {
    margin-bottom: 12px;
}

.post-detail-content ul, .post-detail-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.post-detail-content li {
    margin-bottom: 6px;
}

/* ========== App Header ========== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    color: white;
}

.btn-primary {
    background: var(--primary);
}

.btn-primary:active { background: var(--primary-dark); }

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:active { background: var(--accent-dark); }

/* ========== Forms ========== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--surface);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 999;
    animation: fadeIn 0.3s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    max-width: 90%;
    text-align: center;
}

/* ========== Profile Styles ========== */
.profile-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    padding: 24px 20px;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 10px;
    border: 2px solid rgba(255,255,255,0.3);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-role {
    font-size: 0.8rem;
    opacity: 0.8;
}

.profile-menu {
    padding: 16px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.profile-menu-item:active { transform: scale(0.98); }

.profile-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.profile-menu-text {
    flex: 1;
}

.profile-menu-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.profile-menu-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.profile-menu-arrow {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.profile-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 8px;
}

/* ========== Notifications ========== */
.notif-list {
    padding: 16px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}

.notif-item.unread {
    border-left: 3px solid var(--primary);
    background: #f0f7ff;
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notif-body { flex: 1; }
.notif-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.notif-msg { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: var(--text-secondary); margin-top: 4px; }

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ========== Loading ========== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}
