/* ==========================================================================
   KPMG Demo Widget — iOS Simulator + Mobile App Home
   ========================================================================== */

/* ---------- KPMG Brand Tokens ---------- */
:root {
    --kpmg-blue: #00338D;
    --kpmg-medium-blue: #005EB8;
    --kpmg-light-blue: #0091DA;
    --kpmg-white: #FFFFFF;
    --kpmg-dark: #1A1A2E;
    --kpmg-gray: #6B7280;
    --kpmg-light-gray: #F3F4F6;
    --kpmg-border: #E5E7EB;
    --kpmg-success: #10B981;
    --kpmg-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --kpmg-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* ---------- iOS Simulator Frame ---------- */
.kpmg-simulator-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.kpmg-ios-device {
    position: relative;
    width: 393px; /* iPhone 15 Pro width */
    height: 852px; /* iPhone 15 Pro height */
    background: #000;
    border-radius: 55px;
    padding: 12px;
    box-shadow:
        0 0 0 2px #1a1a1a,
        0 0 0 4px #333,
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px #2a2a2a;
    overflow: hidden;
}

.kpmg-ios-screen {
    width: 100%;
    height: 100%;
    background: var(--kpmg-light-gray);
    border-radius: 44px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.kpmg-ios-screen::-webkit-scrollbar {
    display: none;
}

/* Dynamic Island */
.kpmg-dynamic-island {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    background: transparent;
    pointer-events: none;
}

.kpmg-dynamic-island-pill {
    width: 126px;
    height: 37px;
    background: #000;
    border-radius: 20px;
}

/* iOS Status Bar */
.kpmg-status-bar {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    height: 20px;
    margin-top: -15px;
    font-family: var(--kpmg-font);
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.kpmg-status-bar-left {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.kpmg-status-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpmg-status-bar-right svg {
    width: 16px;
    height: 16px;
}

/* ---------- App Content ---------- */
.kpmg-app-content {
    font-family: var(--kpmg-font);
    padding: 0 0 30px 0;
}

/* App Header */
.kpmg-app-header {
    background: linear-gradient(135deg, var(--kpmg-blue) 0%, var(--kpmg-medium-blue) 100%);
    padding: 24px 20px 32px;
    color: var(--kpmg-white);
}

.kpmg-app-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.kpmg-app-logo-svg {
    height: 28px;
    width: auto;
}

.kpmg-app-logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--kpmg-white);
}

.kpmg-app-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--kpmg-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.kpmg-app-greeting {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.kpmg-app-subgreeting {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.85;
}

/* Search Bar */
.kpmg-app-search {
    margin: -16px 16px 16px;
    position: relative;
    z-index: 10;
}

.kpmg-simulator-wrapper .kpmg-app-search input.kpmg-app-search-input,
.kpmg-app-search input.kpmg-app-search-input {
    width: 100% !important;
    padding: 14px 16px 14px 48px !important;
    border: none !important;
    border-radius: 28px !important;
    background: var(--kpmg-white) !important;
    font-size: 15px !important;
    font-family: var(--kpmg-font) !important;
    color: var(--kpmg-dark) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
    box-sizing: border-box !important;
    height: auto !important;
    margin: 0 !important;
    min-height: 0 !important;
    line-height: normal !important;
}

.kpmg-app-search input.kpmg-app-search-input::placeholder {
    color: #9CA3AF !important;
}

.kpmg-app-search .kpmg-app-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    z-index: 2;
}

/* Quick Stats Row */
.kpmg-quick-stats {
    display: flex;
    gap: 10px;
    padding: 8px 16px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.kpmg-quick-stats::-webkit-scrollbar {
    display: none;
}

.kpmg-quick-stat {
    flex: 1;
    min-width: 0;
    background: var(--kpmg-white);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: var(--kpmg-card-shadow);
}

.kpmg-quick-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--kpmg-blue);
    line-height: 1;
    margin-bottom: 4px;
}

.kpmg-quick-stat-label {
    font-size: 11px;
    color: var(--kpmg-gray);
    font-weight: 500;
    line-height: 1.2;
}

/* Section Headers */
.kpmg-section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.kpmg-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpmg-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--kpmg-dark);
}

.kpmg-section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--kpmg-medium-blue);
}

/* Continue Learning Cards */
.kpmg-continue-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.kpmg-continue-cards::-webkit-scrollbar {
    display: none;
}

.kpmg-continue-card {
    flex: 0 0 260px;
    background: var(--kpmg-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--kpmg-card-shadow);
}

.kpmg-continue-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--kpmg-light-blue) 0%, var(--kpmg-medium-blue) 100%);
}

.kpmg-continue-card-body {
    padding: 12px 14px;
}

.kpmg-continue-card-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kpmg-medium-blue);
    background: rgba(0, 94, 184, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.kpmg-continue-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--kpmg-dark);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kpmg-continue-card-progress {
    height: 4px;
    background: var(--kpmg-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.kpmg-continue-card-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--kpmg-medium-blue), var(--kpmg-light-blue));
    transition: width 0.3s ease;
}

.kpmg-continue-card-meta {
    font-size: 11px;
    color: var(--kpmg-gray);
    font-weight: 500;
}

/* Featured / Recommended Courses */
.kpmg-course-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpmg-course-item {
    display: flex;
    align-items: center;
    background: var(--kpmg-white);
    border-radius: 14px;
    padding: 12px;
    gap: 12px;
    box-shadow: var(--kpmg-card-shadow);
}

.kpmg-course-item-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kpmg-course-item-icon.blue {
    background: rgba(0, 51, 141, 0.1);
    color: var(--kpmg-blue);
}

.kpmg-course-item-icon.teal {
    background: rgba(0, 145, 218, 0.1);
    color: var(--kpmg-light-blue);
}

.kpmg-course-item-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--kpmg-success);
}

.kpmg-course-item-body {
    flex: 1;
    min-width: 0;
}

.kpmg-course-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--kpmg-dark);
    margin-bottom: 2px;
    line-height: 1.3;
}

.kpmg-course-item-subtitle {
    font-size: 12px;
    color: var(--kpmg-gray);
}

.kpmg-course-item-arrow {
    flex: 0 0 20px;
    color: var(--kpmg-border);
    font-size: 18px;
}

/* Bottom Tab Bar */
.kpmg-tab-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    padding: 8px 0 24px;
    z-index: 50;
}

.kpmg-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 500;
    color: var(--kpmg-gray);
    font-family: var(--kpmg-font);
}

.kpmg-tab-item.active {
    color: var(--kpmg-blue);
}

.kpmg-tab-item svg {
    width: 24px;
    height: 24px;
}

/* Home Indicator */
.kpmg-home-indicator {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.92);
    margin-top: -24px;
    padding-bottom: 8px;
}

.kpmg-home-indicator-bar {
    width: 134px;
    height: 5px;
    background: #000;
    border-radius: 3px;
    opacity: 0.2;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .kpmg-ios-device {
        width: 100%;
        max-width: 393px;
        height: auto;
        aspect-ratio: 393 / 852;
        border-radius: 40px;
        padding: 8px;
    }

    .kpmg-ios-screen {
        border-radius: 33px;
    }
}

/* ==========================================================================
   View Navigation System
   ========================================================================== */

/* View system — transitions handled by JS inline styles */
.kpmg-view {
    display: none;
    min-height: 100%;
}
.kpmg-view-active {
    display: block;
}

/* ==========================================================================
   Course Detail Header
   ========================================================================== */

.kpmg-course-detail-header {
    padding: 16px 20px 24px;
    color: white;
}
.kpmg-course-detail-nav {
    margin-bottom: 16px;
}
.kpmg-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    padding: 4px 0;
}
.kpmg-back-btn:hover { color: white; }
.kpmg-back-btn svg { width: 18px; height: 18px; }
.kpmg-course-detail-hero-icon {
    margin-bottom: 12px;
}
.kpmg-course-detail-hero-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
}
.kpmg-course-detail-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}
.kpmg-course-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 16px;
}
.kpmg-course-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.kpmg-course-detail-meta svg { width: 14px; height: 14px; }
.kpmg-course-detail-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.kpmg-course-detail-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.kpmg-course-detail-progress-text {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

/* ==========================================================================
   Certificate Card
   ========================================================================== */

.kpmg-cert-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 16px;
}
.kpmg-cert-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: rgba(217, 119, 6, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B45309;
}
.kpmg-cert-icon svg { width: 22px; height: 22px; }
.kpmg-cert-body { flex: 1; }
.kpmg-cert-title {
    font-size: 13px;
    font-weight: 700;
    color: #92400E;
    margin-bottom: 2px;
}
.kpmg-cert-subtitle {
    font-size: 12px;
    color: #B45309;
    font-weight: 500;
}

/* ==========================================================================
   Content Type Badges
   ========================================================================== */

.kpmg-content-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.kpmg-content-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--kpmg-white);
    border: 1px solid var(--kpmg-border);
    font-size: 12px;
    font-weight: 500;
    color: var(--kpmg-dark);
}
.kpmg-ct-icon {
    display: inline-flex;
    color: var(--kpmg-medium-blue);
}
.kpmg-ct-icon svg { width: 16px; height: 16px; }

/* ==========================================================================
   Lesson List
   ========================================================================== */

.kpmg-lesson-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kpmg-lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--kpmg-white);
    border-radius: 12px;
}
.kpmg-lesson { border-radius: 12px; box-shadow: var(--kpmg-card-shadow); }
.kpmg-lesson-status {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpmg-lesson.completed .kpmg-lesson-status { color: var(--kpmg-success); }
.kpmg-lesson.active .kpmg-lesson-status { color: var(--kpmg-medium-blue); }
.kpmg-lesson.locked .kpmg-lesson-status { color: var(--kpmg-border); }
.kpmg-lesson.locked .kpmg-lesson-body { opacity: 0.5; }
.kpmg-lesson-current {
    width: 28px;
    height: 28px;
    background: var(--kpmg-medium-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpmg-lesson-current svg { width: 12px; height: 12px; }
.kpmg-lesson-body { flex: 1; min-width: 0; }
.kpmg-lesson-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--kpmg-dark);
    margin-bottom: 2px;
    line-height: 1.3;
}
.kpmg-lesson-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--kpmg-gray);
}
.kpmg-lesson-type-icon {
    display: inline-flex;
    color: var(--kpmg-medium-blue);
}
.kpmg-lesson-type-icon svg { width: 14px; height: 14px; }

/* Clickable items */
[data-navigate] { cursor: pointer; }
[data-navigate]:hover { opacity: 0.92; }

/* ==========================================================================
   "What You'll Learn" Section
   ========================================================================== */

.kpmg-wyll-list { display: flex; flex-direction: column; gap: 10px; }
.kpmg-wyll-item {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: var(--kpmg-dark); line-height: 1.4; font-weight: 500;
}
.kpmg-wyll-item svg { flex: 0 0 18px; color: var(--kpmg-success); margin-top: 1px; }

/* ==========================================================================
   Browse Courses View
   ========================================================================== */

/* Category filter pills */
.kpmg-cat-filters {
    display: flex; gap: 8px; padding: 0 16px 16px;
    overflow-x: auto; scrollbar-width: none;
}
.kpmg-cat-filters::-webkit-scrollbar { display: none; }
.kpmg-cat-pill {
    flex: 0 0 auto; padding: 8px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 600; font-family: var(--kpmg-font);
    border: 1.5px solid var(--kpmg-border); background: var(--kpmg-white);
    color: var(--kpmg-gray); cursor: pointer; white-space: nowrap;
    transition: all 0.2s ease;
}
.kpmg-cat-pill.active, .kpmg-cat-pill:hover {
    background: var(--kpmg-blue); color: var(--kpmg-white); border-color: var(--kpmg-blue);
}

/* Course grid */
.kpmg-course-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px;
}
.kpmg-course-grid-card {
    background: var(--kpmg-white); border-radius: 14px;
    overflow: hidden; box-shadow: var(--kpmg-card-shadow); cursor: pointer;
}
.kpmg-course-grid-card:hover { transform: scale(0.98); }
.kpmg-course-grid-thumb {
    height: 80px; display: flex; align-items: center; justify-content: center;
}
.kpmg-course-grid-thumb svg { width: 28px; height: 28px; stroke: white; }
.kpmg-course-grid-info { padding: 10px 12px; }
.kpmg-course-grid-title {
    font-size: 12px; font-weight: 600; color: var(--kpmg-dark);
    line-height: 1.3; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kpmg-course-grid-meta {
    font-size: 10px; color: var(--kpmg-gray); font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}
.kpmg-course-grid-meta svg { width: 10px; height: 10px; }

/* View header bar (for Browse, My Learning, Profile) */
.kpmg-view-header {
    background: var(--kpmg-white); padding: 16px 20px 12px;
    border-bottom: 0.5px solid var(--kpmg-border);
}
.kpmg-view-header-title {
    font-size: 20px; font-weight: 700; color: var(--kpmg-dark);
}

/* ==========================================================================
   My Learning View
   ========================================================================== */

/* Streak card */
.kpmg-streak-card {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 14px; padding: 16px; margin: 16px 16px 0; color: white;
}
.kpmg-streak-icon {
    flex: 0 0 48px; width: 48px; height: 48px;
    background: rgba(255,255,255,0.2); border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.kpmg-streak-icon svg { width: 24px; height: 24px; stroke: white; }
.kpmg-streak-body { flex: 1; }
.kpmg-streak-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.kpmg-streak-sub { font-size: 13px; opacity: 0.9; }

/* Completed course items */
.kpmg-completed-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--kpmg-white); border-radius: 12px;
    padding: 12px 14px; box-shadow: var(--kpmg-card-shadow);
}
.kpmg-completed-check { flex: 0 0 24px; color: var(--kpmg-success); }
.kpmg-completed-check svg { width: 20px; height: 20px; }
.kpmg-completed-body { flex: 1; min-width: 0; }
.kpmg-completed-title { font-size: 13px; font-weight: 600; color: var(--kpmg-dark); line-height: 1.3; }
.kpmg-completed-meta { font-size: 11px; color: var(--kpmg-gray); margin-top: 2px; }
.kpmg-completed-cert {
    flex: 0 0 auto; font-size: 11px; font-weight: 600;
    color: var(--kpmg-medium-blue); padding: 4px 10px;
    background: rgba(0, 94, 184, 0.08); border-radius: 8px;
}

/* ==========================================================================
   Profile View
   ========================================================================== */

.kpmg-profile-hero {
    text-align: center; padding: 24px 20px 20px;
    background: linear-gradient(135deg, var(--kpmg-blue) 0%, var(--kpmg-medium-blue) 100%);
    color: white;
}
.kpmg-profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 3px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; margin: 0 auto 12px;
}
.kpmg-profile-name { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.kpmg-profile-role { font-size: 13px; opacity: 0.85; margin-bottom: 2px; }
.kpmg-profile-company { font-size: 12px; opacity: 0.7; }

.kpmg-profile-stats {
    display: flex; gap: 0; margin: 0 16px; border-radius: 14px;
    overflow: hidden; margin-top: -1px; box-shadow: var(--kpmg-card-shadow);
}
.kpmg-profile-stat {
    flex: 1; text-align: center; padding: 14px 8px; background: var(--kpmg-white);
    border-right: 1px solid var(--kpmg-border);
}
.kpmg-profile-stat:last-child { border-right: none; }
.kpmg-profile-stat-num { font-size: 20px; font-weight: 700; color: var(--kpmg-blue); }
.kpmg-profile-stat-label { font-size: 11px; color: var(--kpmg-gray); font-weight: 500; }

/* Badge cards */
.kpmg-badge-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.kpmg-badge-row::-webkit-scrollbar { display: none; }
.kpmg-badge-card {
    flex: 0 0 110px; text-align: center;
    background: var(--kpmg-white); border-radius: 14px;
    padding: 14px 10px; box-shadow: var(--kpmg-card-shadow);
}
.kpmg-badge-icon {
    width: 44px; height: 44px; margin: 0 auto 8px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: #B45309;
}
.kpmg-badge-icon svg { width: 20px; height: 20px; }
.kpmg-badge-name { font-size: 11px; font-weight: 600; color: var(--kpmg-dark); line-height: 1.3; }

/* Settings link */
.kpmg-settings-link {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 14px; margin: 0 16px;
    background: var(--kpmg-white); border-radius: 14px;
    font-size: 14px; font-weight: 600; color: var(--kpmg-gray);
    box-shadow: var(--kpmg-card-shadow); cursor: pointer;
}

/* ==========================================================================
   AI Assistant
   ========================================================================== */

/* Floating action button — fixed within the simulator */
.kpmg-ai-fab-wrap {
    position: sticky; bottom: 70px; z-index: 40;
    display: flex; justify-content: flex-end;
    padding: 0 16px; pointer-events: none;
    margin-top: -60px; height: 0;
}
.kpmg-ai-fab {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--kpmg-blue), var(--kpmg-light-blue));
    color: white; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 51, 141, 0.4);
    cursor: pointer; pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; top: -60px;
}
.kpmg-ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0, 51, 141, 0.5); }
.kpmg-ai-fab svg { width: 24px; height: 24px; stroke: white; fill: none; }
.kpmg-ai-fab.hidden { display: none; }

/* Chat overlay — fixed within the iOS screen */
.kpmg-ai-chat {
    position: fixed; z-index: 60;
    display: none; flex-direction: column;
    background: var(--kpmg-light-gray);
    border-radius: 44px; overflow: hidden;
}
/* Position the chat to exactly cover the iOS screen */
.kpmg-ios-screen .kpmg-ai-chat {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
/* When open, prevent the screen from scrolling behind it */
.kpmg-ios-screen.kpmg-chat-open {
    overflow: hidden !important;
}
.kpmg-ai-chat.open { display: flex; }
.kpmg-ai-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 56px 20px 14px; background: var(--kpmg-white);
    border-bottom: 0.5px solid var(--kpmg-border);
}
.kpmg-ai-chat-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; color: var(--kpmg-dark);
}
.kpmg-ai-chat-title svg { width: 20px; height: 20px; color: var(--kpmg-medium-blue); }
.kpmg-ai-chat-close { cursor: pointer; color: var(--kpmg-gray); padding: 4px; }
.kpmg-ai-chat-close svg { width: 20px; height: 20px; }

/* Chat body */
.kpmg-ai-chat-body {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    scrollbar-width: none;
}
.kpmg-ai-chat-body::-webkit-scrollbar { display: none; }

.kpmg-ai-msg { display: flex; }
.kpmg-ai-msg.assistant { justify-content: flex-start; }
.kpmg-ai-msg.user { justify-content: flex-end; }
.kpmg-ai-msg-bubble {
    max-width: 80%; padding: 10px 14px; border-radius: 16px;
    font-size: 13px; line-height: 1.5; font-weight: 500;
}
.kpmg-ai-msg.assistant .kpmg-ai-msg-bubble {
    background: var(--kpmg-white); color: var(--kpmg-dark);
    border-bottom-left-radius: 4px; box-shadow: var(--kpmg-card-shadow);
}
.kpmg-ai-msg.user .kpmg-ai-msg-bubble {
    background: var(--kpmg-blue); color: white;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.kpmg-ai-typing { display: flex; gap: 4px; padding: 4px 0; }
.kpmg-ai-typing-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--kpmg-gray); opacity: 0.5;
    animation: kpmgTypingBounce 1.4s infinite ease-in-out;
}
.kpmg-ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.kpmg-ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes kpmgTypingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* Suggestion buttons */
.kpmg-ai-chat-suggestions {
    padding: 12px 16px 28px; display: flex; flex-wrap: wrap; gap: 8px;
    background: var(--kpmg-white); border-top: 0.5px solid var(--kpmg-border);
}
.kpmg-ai-suggestion {
    padding: 8px 14px; border-radius: 20px;
    border: 1.5px solid var(--kpmg-medium-blue);
    background: transparent; color: var(--kpmg-medium-blue);
    font-size: 12px; font-weight: 600; font-family: var(--kpmg-font);
    cursor: pointer; transition: all 0.2s ease;
}
.kpmg-ai-suggestion:hover {
    background: var(--kpmg-medium-blue); color: white;
}
.kpmg-ai-suggestion.used {
    opacity: 0.4; pointer-events: none;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.kpmg-toast {
    display: none !important;
    position: absolute; top: 75px; left: 20px; right: 20px;
    background: var(--kpmg-dark); color: white;
    padding: 12px 16px; border-radius: 14px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 80; transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.kpmg-toast.show { transform: translateY(0); }
.kpmg-toast-icon { flex: 0 0 auto; }
.kpmg-toast-icon svg { width: 20px; height: 20px; stroke: #FDE68A; }

/* ==========================================================================
   Micro-animations (tap feedback)
   ========================================================================== */

/* Tap scale effect on interactive cards */
.kpmg-continue-card:active,
.kpmg-course-item:active,
.kpmg-course-grid-card:active,
.kpmg-lesson:not(.locked):active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}
.kpmg-continue-card,
.kpmg-course-item,
.kpmg-course-grid-card,
.kpmg-lesson {
    transition: transform 0.2s ease;
}
