/**
 * ============================================================
 * HMS - Hackathon Management System
 * Custom Stylesheet
 * 
 * Color Palette:
 *   Primary (Dark):    #141413
 *   Secondary (Olive): #788c5d
 *   Background (Ivory):#faf9f5
 * Font: Outfit (Google Fonts)
 * ============================================================
 */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --primary: #141413;
    --secondary: #788c5d;
    --bg: #faf9f5;
    --bg-card: #ffffff;
    --bg-hover: #f0efea;
    --border: #e8e7e3;
    --text: #141413;
    --text-muted: #7a7a72;
    --text-light: #a3a39b;
    --success: #4caf50;
    --danger: #e53935;
    --warning: #ff9800;
    --info: #2196f3;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 64px;
    --mobile-nav-height: 72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.text-olive { color: var(--secondary) !important; }
.text-muted-custom { color: var(--text-muted); }

/* ============================================================
   DESKTOP NAVBAR
   ============================================================ */
.hms-navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    z-index: 1030;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hms-navbar .navbar-brand {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

.hms-navbar .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hms-navbar .nav-link:hover,
.hms-navbar .nav-link.active {
    color: var(--primary);
    background: var(--bg);
}

.hms-navbar .nav-link.active {
    font-weight: 600;
}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 3px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 1.15rem;
}

.mobile-nav-item.active {
    color: var(--secondary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* Center "New" button with accent */
.mobile-nav-add {
    position: relative;
}

.mobile-nav-add i {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    font-size: 1rem;
    margin-top: -18px;
    box-shadow: 0 4px 12px rgba(120, 140, 93, 0.35);
}

.mobile-nav-add span {
    margin-top: 2px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding-top: 24px;
    padding-bottom: 100px; /* space for mobile nav */
    min-height: 100vh;
}

@media (min-width: 768px) {
    .main-content {
        padding-top: calc(var(--nav-height) + 24px);
        padding-bottom: 40px;
    }
}

/* ============================================================
   CARDS
   ============================================================ */
.card-hms {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-hms .card-body {
    padding: 20px;
}

.card-hms .card-header-hms {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Stat cards on dashboard */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-olive {
    background-color: var(--secondary);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-olive:hover {
    background-color: #6a7d50;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(120, 140, 93, 0.3);
}

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

.btn-dark-custom {
    background-color: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-dark-custom:hover {
    background-color: #2a2a28;
    color: #fff;
}

.btn-outline-olive {
    border: 1.5px solid var(--secondary);
    color: var(--secondary);
    background: transparent;
    font-weight: 600;
}

.btn-outline-olive:hover {
    background: var(--secondary);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
    border-color: var(--text-muted);
}

/* Pill buttons for filters */
.btn-pill {
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-pill:hover,
.btn-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: var(--font);
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(120, 140, 93, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

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

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

/* Floating labels style */
.input-group-hms {
    position: relative;
    margin-bottom: 20px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.bg-primary-custom {
    background-color: var(--primary) !important;
}

.bg-olive {
    background-color: var(--secondary) !important;
}

/* Score badges for ideas */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.score-badge.score-high { background: var(--success); }
.score-badge.score-mid  { background: var(--warning); }
.score-badge.score-low  { background: var(--danger); }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-hms {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    overflow: hidden;
}

.progress-hms .progress-bar {
    background: var(--secondary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Phase progress dots */
.phase-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.phase-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.phase-dot.completed {
    background: var(--secondary);
}

.phase-dot.current {
    background: var(--secondary);
    box-shadow: 0 0 0 3px rgba(120, 140, 93, 0.25);
}

/* ============================================================
   TASK LIST
   ============================================================ */
.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background: var(--bg);
}

.task-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.task-check:hover {
    border-color: var(--secondary);
}

.task-check.done {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.task-check.done::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
}

.task-title {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.task-title.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ============================================================
   IDEA CARDS
   ============================================================ */
.idea-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.idea-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.idea-card.selected {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(120, 140, 93, 0.2);
}

.idea-card .idea-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.idea-card .idea-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   AI CHAT / ASSISTANT
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height) - 48px);
    max-height: 700px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.6;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-area textarea {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    min-height: 44px;
}

.chat-input-area textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(120, 140, 93, 0.15);
}

/* ============================================================
   SUBMISSION PACKAGER
   ============================================================ */
.sub-field {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

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

.sub-field-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.sub-field-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .auth-logo img {
    height: 40px;
    margin-bottom: 12px;
}

.auth-card .auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

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

.empty-state h5 {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner-olive {
    color: var(--secondary);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 249, 245, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.loading-card .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* ============================================================
   MARKDOWN RENDERED CONTENT
   ============================================================ */
.md-content {
    line-height: 1.75;
    color: var(--text);
    word-break: break-word;
}

/* Headings */
.md-content h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--olive);
    color: var(--primary);
}
.md-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 1.4rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}
.md-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--olive);
}
.md-content h4, .md-content h5, .md-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.md-content h1:first-child,
.md-content h2:first-child,
.md-content h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.md-content p {
    margin-bottom: 0.85rem;
}
.md-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.md-content ul, .md-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
}
.md-content li {
    margin-bottom: 0.3rem;
}
.md-content li > ul,
.md-content li > ol {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}
.md-content ul li::marker {
    color: var(--olive);
}

/* Blockquote */
.md-content blockquote {
    border-left: 3px solid var(--olive);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-style: italic;
}
.md-content blockquote p {
    margin-bottom: 0;
}

/* Inline code */
.md-content code {
    background: rgba(var(--olive-rgb, 107, 114, 75), 0.1);
    color: var(--olive);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82em;
    font-family: 'Courier New', Courier, monospace;
}

/* Code blocks */
.md-content pre {
    background: var(--primary);
    color: #e8e8e0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.82em;
    line-height: 1.6;
}
.md-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Horizontal rule */
.md-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* Strong / Em */
.md-content strong {
    font-weight: 700;
    color: var(--primary);
}
.md-content em {
    color: var(--text-muted);
}

/* Tables */
.md-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.md-content th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
}
.md-content td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
}
.md-content tr:last-child td {
    border-bottom: none;
}
.md-content tr:nth-child(even) td {
    background: var(--bg);
}

/* Links */
.md-content a {
    color: var(--olive);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.md-content a:hover {
    opacity: 0.8;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h1,
.section-header h2,
.section-header h3 {
    margin: 0;
}

/* ============================================================
   COMPETITION VIEW TABS
   ============================================================ */
.comp-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.comp-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
}

.comp-tab:hover {
    color: var(--text);
    background: var(--bg-card);
}

.comp-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    font-size: 0.9rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--bg);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.rounded-hms { border-radius: var(--radius); }
.rounded-hms-sm { border-radius: var(--radius-sm); }
.rounded-hms-lg { border-radius: var(--radius-lg); }

.bg-ivory { background: var(--bg) !important; }
.bg-card { background: var(--bg-card) !important; }
.border-hms { border: 1px solid var(--border) !important; }

.clickable { cursor: pointer; }
.no-select { user-select: none; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 767.98px) {
    /* Add bottom padding for mobile nav */
    body {
        padding-bottom: var(--mobile-nav-height);
    }

    .main-content {
        padding-top: 16px;
    }

    /* Tighter card padding on mobile */
    .card-hms .card-body {
        padding: 16px;
    }

    /* Full-width buttons on mobile */
    .btn-mobile-full {
        width: 100%;
    }

    /* Stack section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Smaller headings */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }

    /* Chat adjustments */
    .chat-container {
        height: calc(100vh - var(--mobile-nav-height) - 16px);
        max-height: none;
    }

    .chat-bubble {
        max-width: 92%;
    }

    /* Auth card mobile */
    .auth-card {
        padding: 28px 20px;
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
