@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --warm-sand: #F4EFEA;
    --calm-taupe: #B8A593;
    --muted-brown: #6C5545;
    --calm-turquoise: #72C7C0;
    --soft-aqua: #A8D9D1;
    --deep-teal: #3C7F7A;
    --olive-smoke: #A7A08E;
    --white: #FFFFFF;
    --bg: #FAF8F5;
    --text-primary: #3D2E22;
    --text-secondary: #8C7B6E;
    --shadow-sm: 0 2px 8px rgba(108, 85, 69, 0.08);
    --shadow-md: 0 4px 20px rgba(108, 85, 69, 0.12);
    --shadow-lg: 0 8px 32px rgba(108, 85, 69, 0.16);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 50%;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    background: #E8E2DB;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-primary);
    overflow: hidden;
}

/* Phone Frame */
.phone-frame {
    width: 390px;
    height: 844px;
    background: var(--bg);
    border-radius: 44px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 34px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 100;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

/* Screens Container */
.screens-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(30px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Status Bar */
.status-bar {
    padding: 42px 24px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========== WELCOME SCREEN ========== */
.welcome-screen {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* Base background photo */
.welcome-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('welcome-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Subtle overlay for text readability */
.welcome-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(244, 239, 234, 0.30) 0%,
            rgba(244, 239, 234, 0.15) 30%,
            rgba(0, 0, 0, 0.05) 60%,
            rgba(60, 127, 122, 0.12) 100%);
}

/* Floating soft glow orbs */
.welcome-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    pointer-events: none;
}

.welcome-glow.g1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(114, 199, 192, 0.25) 0%, transparent 70%);
    top: 8%;
    right: -15%;
    animation: glowFloat1 8s ease-in-out infinite;
}

.welcome-glow.g2 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(168, 217, 209, 0.2) 0%, transparent 70%);
    top: 25%;
    left: -10%;
    animation: glowFloat2 10s ease-in-out infinite;
}

.welcome-glow.g3 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(60, 127, 122, 0.15) 0%, transparent 70%);
    top: 15%;
    left: 40%;
    animation: glowFloat3 12s ease-in-out infinite;
}

@keyframes glowFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-15px, 20px) scale(1.1);
    }

    66% {
        transform: translate(10px, -10px) scale(0.95);
    }
}

@keyframes glowFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    40% {
        transform: translate(20px, -15px) scale(1.05);
    }

    70% {
        transform: translate(-10px, 10px) scale(0.9);
    }
}

@keyframes glowFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-20px, 15px) scale(1.15);
        opacity: 1;
    }
}

/* Decorative arcs (thin flowing lines) */
.welcome-arcs {
    position: absolute;
    top: 15%;
    left: 0;
    width: 100%;
    height: 25%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    animation: arcsAppear 1.5s ease 0.5s forwards;
}

@keyframes arcsAppear {
    to {
        opacity: 1;
    }
}

/* Wave landscape container */
.welcome-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    z-index: 3;
    pointer-events: none;
}

.welcome-waves .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Subtle wave animations */
.wave-1 {
    animation: waveShift1 12s ease-in-out infinite;
}

.wave-2 {
    animation: waveShift2 10s ease-in-out infinite;
}

.wave-3 {
    animation: waveShift3 8s ease-in-out infinite;
}

.wave-4 {
    animation: waveShift4 9s ease-in-out infinite;
}

.wave-5 {
    animation: waveShift5 7s ease-in-out infinite;
}

@keyframes waveShift1 {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(-8px) translateY(-3px);
    }
}

@keyframes waveShift2 {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(6px) translateY(-2px);
    }
}

@keyframes waveShift3 {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(-5px) translateY(-2px);
    }
}

@keyframes waveShift4 {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(4px) translateY(-1px);
    }
}

@keyframes waveShift5 {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(-3px) translateY(-1px);
    }
}

/* Content overlay */
.welcome-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 40px 32px;
    margin-top: -80px;
    background: rgba(244, 239, 234, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(108, 85, 69, 0.08);
}

.welcome-logo {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--calm-turquoise), var(--deep-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 12px 40px rgba(60, 127, 122, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
    opacity: 0;
    animation: logoPulse 3s ease-in-out infinite, logoAppear 0.8s ease 0.2s forwards;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 12px 40px rgba(60, 127, 122, 0.3);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 16px 50px rgba(60, 127, 122, 0.4);
    }
}

@keyframes logoAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-logo svg {
    width: 44px;
    height: 44px;
}

.welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 600;
    color: var(--muted-brown);
    margin-bottom: 10px;
    line-height: 1.2;
    opacity: 0;
    animation: contentFadeUp 0.7s ease 0.4s forwards;
    text-shadow: 0 1px 8px rgba(244, 239, 234, 0.5);
}

.welcome-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 400;
    opacity: 0;
    animation: contentFadeUp 0.7s ease 0.55s forwards;
}

.welcome-method {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-style: italic;
    color: var(--deep-teal);
    margin-bottom: 44px;
    opacity: 0;
    animation: contentFadeUp 0.7s ease 0.65s forwards;
}

@keyframes contentFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-btn {
    background: linear-gradient(135deg, var(--calm-turquoise), var(--deep-teal));
    color: white;
    border: none;
    padding: 16px 52px;
    border-radius: 60px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 28px rgba(60, 127, 122, 0.3);
    letter-spacing: 0.5px;
    opacity: 0;
    animation: contentFadeUp 0.7s ease 0.8s forwards;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(60, 127, 122, 0.4);
}

.welcome-dots {
    position: absolute;
    bottom: 70px;
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    animation: contentFadeUp 0.7s ease 1s forwards;
}

.welcome-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--calm-taupe);
    opacity: 0.4;
}

.welcome-dots span.active {
    opacity: 1;
    background: var(--deep-teal);
    width: 24px;
    border-radius: 4px;
}

/* ========== HOME SCREEN ========== */
.home-screen {
    background: var(--bg);
}

.home-header {
    padding: 42px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.home-greeting {
    font-size: 13px;
    color: var(--text-secondary);
}

.home-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--muted-brown);
    margin-top: 2px;
}

.home-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--calm-turquoise), var(--soft-aqua));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.home-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.home-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 100px;
    -webkit-overflow-scrolling: touch;
}

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

/* AI Card */
.ai-card {
    background: linear-gradient(135deg, var(--deep-teal), var(--calm-turquoise));
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ai-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.ai-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.ai-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 6px;
}

.ai-card-desc {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

.ai-card-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-card-arrow svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Quick Actions */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--muted-brown);
    margin: 20px 0 12px;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(184, 165, 147, 0.15);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 22px;
}

.quick-action-icon.teal {
    background: rgba(114, 199, 192, 0.15);
}

.quick-action-icon.sand {
    background: rgba(184, 165, 147, 0.2);
}

.quick-action-icon.brown {
    background: rgba(108, 85, 69, 0.1);
}

.quick-action-icon.olive {
    background: rgba(167, 160, 142, 0.2);
}

.quick-action-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-brown);
}

.quick-action-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Recent Items */
.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.recent-item:hover {
    transform: translateX(4px);
}

.recent-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.recent-icon.article {
    background: rgba(114, 199, 192, 0.15);
}

.recent-icon.video {
    background: rgba(184, 165, 147, 0.2);
}

.recent-icon.note {
    background: rgba(108, 85, 69, 0.1);
}

.recent-text {
    flex: 1;
}

.recent-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
}

.recent-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.recent-time {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ========== CHAT SCREEN ========== */
.chat-screen {
    background: var(--bg);
}

.chat-header {
    padding: 42px 24px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(184, 165, 147, 0.15);
    flex-shrink: 0;
}

.chat-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chat-back:hover {
    background: var(--warm-sand);
}

.chat-back svg {
    width: 18px;
    height: 18px;
    fill: var(--muted-brown);
}

.chat-bot-info {
    flex: 1;
}

.chat-bot-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted-brown);
}

.chat-bot-status {
    font-size: 11px;
    color: var(--calm-turquoise);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-bot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--calm-turquoise);
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar {
    display: none;
}

.message {
    max-width: 82%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.55;
    animation: msgAppear 0.4s ease;
}

@keyframes msgAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    align-self: flex-start;
    background: var(--white);
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--deep-teal), var(--calm-turquoise));
    color: white;
    border-bottom-right-radius: 6px;
}

.message-time {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.6;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    align-self: flex-start;
    box-shadow: var(--shadow-sm);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--calm-taupe);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 24px 4px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.suggestion-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    white-space: nowrap;
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid rgba(184, 165, 147, 0.25);
    border-radius: 24px;
    font-size: 13px;
    color: var(--muted-brown);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chip:hover {
    background: var(--deep-teal);
    color: white;
    border-color: var(--deep-teal);
}

/* Chat Input */
.chat-input-area {
    padding: 12px 24px 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    flex-shrink: 0;
}

.chat-attach {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chat-attach:hover {
    background: var(--warm-sand);
}

.chat-attach svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
}

.chat-input {
    width: 100%;
    padding: 12px 44px 12px 18px;
    background: var(--white);
    border: 1px solid rgba(184, 165, 147, 0.2);
    border-radius: 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
}

.chat-input::placeholder {
    color: var(--calm-taupe);
}

.chat-input:focus {
    border-color: var(--calm-turquoise);
    box-shadow: 0 0 0 3px rgba(114, 199, 192, 0.15);
}

.chat-send {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--calm-turquoise), var(--deep-teal));
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.chat-send:hover {
    transform: translateY(-50%) scale(1.1);
}

.chat-send svg {
    width: 14px;
    height: 14px;
    fill: white;
}

/* ========== KNOWLEDGE BASE SCREEN ========== */
.kb-screen {
    background: var(--bg);
}

.kb-header {
    padding: 42px 24px 16px;
    flex-shrink: 0;
}

.kb-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--muted-brown);
}

.kb-search {
    margin-top: 14px;
    padding: 12px 18px;
    background: var(--white);
    border: 1px solid rgba(184, 165, 147, 0.2);
    border-radius: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
}

.kb-search::placeholder {
    color: var(--calm-taupe);
}

.kb-search:focus {
    border-color: var(--calm-turquoise);
}

.kb-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 24px;
    overflow-x: auto;
    flex-shrink: 0;
}

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

.kb-tab {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-secondary);
    border: 1px solid rgba(184, 165, 147, 0.15);
}

.kb-tab.active {
    background: var(--muted-brown);
    color: white;
    border-color: var(--muted-brown);
}

.kb-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 100px;
    -webkit-overflow-scrolling: touch;
}

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

.kb-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(184, 165, 147, 0.1);
}

.kb-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kb-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.kb-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kb-card-icon.method {
    background: rgba(114, 199, 192, 0.15);
}

.kb-card-icon.article {
    background: rgba(184, 165, 147, 0.2);
}

.kb-card-icon.consult {
    background: rgba(108, 85, 69, 0.1);
}

.kb-card-icon.audio {
    background: rgba(167, 160, 142, 0.2);
}

.kb-card-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--deep-teal);
    font-weight: 500;
}

.kb-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.kb-card-preview {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(184, 165, 147, 0.1);
}

.kb-card-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.kb-card-tag {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(114, 199, 192, 0.12);
    color: var(--deep-teal);
}

/* ========== CREATE SCREEN ========== */
.create-screen {
    background: var(--bg);
}

.create-header {
    padding: 42px 24px 16px;
    flex-shrink: 0;
}

.create-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--muted-brown);
}

.create-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.create-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 100px;
    -webkit-overflow-scrolling: touch;
}

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

.create-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(184, 165, 147, 0.1);
}

.create-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.create-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.create-card-icon.post {
    background: linear-gradient(135deg, rgba(114, 199, 192, 0.2), rgba(168, 217, 209, 0.3));
}

.create-card-icon.pres {
    background: linear-gradient(135deg, rgba(184, 165, 147, 0.2), rgba(244, 239, 234, 0.5));
}

.create-card-icon.artcl {
    background: linear-gradient(135deg, rgba(108, 85, 69, 0.1), rgba(184, 165, 147, 0.2));
}

.create-card-icon.idea {
    background: linear-gradient(135deg, rgba(167, 160, 142, 0.2), rgba(244, 239, 234, 0.5));
}

.create-card-text {
    flex: 1;
}

.create-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.create-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.create-card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--warm-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.create-card-arrow svg {
    width: 14px;
    height: 14px;
    fill: var(--calm-taupe);
}

/* ========== PROFILE SCREEN ========== */
.profile-screen {
    background: var(--bg);
}

.profile-header-bg {
    height: 180px;
    background: linear-gradient(135deg, var(--muted-brown), var(--calm-taupe));
    position: relative;
    flex-shrink: 0;
}

.profile-header-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
}

.profile-avatar-section {
    position: relative;
    text-align: center;
    margin-top: -60px;
    z-index: 10;
    flex-shrink: 0;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--calm-turquoise), var(--deep-teal));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--bg);
    box-shadow: var(--shadow-md);
}

.profile-avatar svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--muted-brown);
    margin-top: 12px;
}

.profile-role {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stats */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 24px;
    flex-shrink: 0;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--deep-teal);
}

.profile-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 100px;
    -webkit-overflow-scrolling: touch;
}

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

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

.profile-menu-item:hover {
    transform: translateX(4px);
}

.profile-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(114, 199, 192, 0.12);
}

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

.profile-menu-label {
    font-size: 14px;
    font-weight: 400;
}

.profile-menu-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-menu-chevron {
    font-size: 16px;
    color: var(--calm-taupe);
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 28px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(184, 165, 147, 0.12);
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 12px;
    transition: var(--transition);
    opacity: 0.5;
}

.nav-item.active {
    opacity: 1;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    fill: var(--muted-brown);
    transition: var(--transition);
}

.nav-item.active svg {
    fill: var(--deep-teal);
}

.nav-item span {
    font-size: 10px;
    color: var(--muted-brown);
    font-weight: 500;
    transition: var(--transition);
}

.nav-item.active span {
    color: var(--deep-teal);
}

/* Chat FAB (floating) */
.chat-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--calm-turquoise), var(--deep-teal));
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(60, 127, 122, 0.35);
    margin-top: -20px;
    transition: var(--transition);
}

.chat-fab:hover {
    transform: scale(1.1);
}

.chat-fab svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* ========== MODAL / OVERLAY ========== */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 46, 34, 0.4);
    backdrop-filter: blur(8px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70%;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    padding: 24px 24px 40px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.modal-overlay.active .modal-panel {
    transform: translateY(0);
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--calm-taupe);
    border-radius: 2px;
    margin: 0 auto 20px;
    opacity: 0.4;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--muted-brown);
    margin-bottom: 16px;
}

/* Upload options */
.upload-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.upload-option:hover {
    transform: translateX(4px);
}

.upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.upload-icon.doc {
    background: rgba(114, 199, 192, 0.15);
}

.upload-icon.audio {
    background: rgba(184, 165, 147, 0.2);
}

.upload-icon.video {
    background: rgba(108, 85, 69, 0.1);
}

.upload-icon.link {
    background: rgba(167, 160, 142, 0.2);
}

.upload-label {
    font-size: 14px;
    color: var(--text-primary);
}

/* Toast notification */
.toast {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--muted-brown);
    color: white;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 13px;
    z-index: 70;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}