/* LEARNMONDO OS - Apple/Stripe UI */
:root {
    --bg-base: #f8fafc;
    --card-light: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb; /* Education Blue */
    --accent-hover: #1d4ed8;
    --success: #059669;
    --warning: #d97706;
    --danger: #ef4444;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -5px rgba(37, 99, 235, 0.15);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--text-main); background: var(--bg-base); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: var(--accent); }

/* Layout */
.app-container { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--card-light); border-right: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100; }
.main-content { margin-left: 260px; flex: 1; padding: 32px 48px; min-height: 100vh; background: var(--bg-base); }

/* Sidebar */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.brand-icon { width: 32px; height: 32px; background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-main); }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text-muted); font-size: 15px; font-weight: 500; border-radius: 8px; margin-bottom: 8px; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { background: rgba(37, 99, 235, 0.1); color: var(--accent); }

/* Top Bar */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -1px; color: var(--text-main); }
.user-profile { display: flex; align-items: center; gap: 16px; }
.token-badge { background: rgba(5, 150, 105, 0.1); color: var(--success); padding: 6px 12px; border-radius: 100px; font-size: 13px; font-weight: 700; border: 1px solid rgba(5, 150, 105, 0.2); display: flex; align-items: center; gap: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: all 0.2s; cursor: pointer; border: none; outline: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(37,99,235,0.3); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-main); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Cards */
.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }

/* The 6-Phase Pipeline Tracker */
.pipeline-tracker { display: flex; justify-content: space-between; position: relative; margin-bottom: 40px; padding: 20px 0; }
.pipeline-tracker::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 4px; background: #e2e8f0; transform: translateY(-50%); z-index: 1; }
.pipeline-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border: 4px solid var(--bg-base); transition: all 0.3s; }
.step-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pipeline-step.active .step-dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,0.2); }
.pipeline-step.active .step-label { color: var(--text-main); font-weight: 800; }
.pipeline-step.completed .step-dot { background: var(--success); color: #fff; }

/* AI Counselor Chat Interface */
.chat-container { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; height: 600px; box-shadow: var(--shadow-sm); }
.chat-header { padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.chat-title { font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.chat-title svg { color: var(--accent); }
.chat-messages { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: #f8fafc; }

/* Message Bubbles */
.msg-bubble { max-width: 80%; padding: 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; position: relative; }
.msg-assistant { background: #fff; border: 1px solid var(--border); color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg-user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.msg-system { background: var(--warning-bg); color: var(--warning); align-self: center; text-align: center; border-radius: 8px; font-size: 13px; font-weight: 600; padding: 8px 16px; max-width: 100%; border: 1px solid rgba(217, 119, 6, 0.2); }

/* Chat Input */
.chat-input-area { padding: 16px; background: #fff; border-top: 1px solid var(--border); display: flex; gap: 12px; }
.chat-input-area input { flex: 1; padding: 14px 20px; border: 1px solid #cbd5e1; border-radius: 100px; outline: none; font-family: var(--font); font-size: 15px; background: #f8fafc; transition: all 0.2s; }
.chat-input-area input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.btn-send { background: var(--accent); color: #fff; border: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.btn-send:hover { background: var(--accent-hover); transform: scale(1.05); }
.btn-send:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; box-shadow: none; }

/* Typing Indicator */
.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; border-bottom-left-radius: 4px; width: fit-content; align-self: flex-start; display: none; }
.typing-indicator.active { display: flex; }
.typing-dot { width: 8px; height: 8px; background: #cbd5e1; border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); background: var(--accent); } }

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.form-group input { width: 100%; padding: 14px 16px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--text-main); font-size: 15px; font-family: var(--font); transition: all 0.2s; }
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Auth Views */
.auth-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, #f1f5f9 0%, #e2e8f0 100%); }
.auth-box { background: #fff; border: 1px solid var(--border); padding: 48px; border-radius: 24px; width: 100%; max-width: 450px; text-align: center; box-shadow: var(--shadow-xl); }
