:root {
    /* Colors - Premium Medical SaaS Palette */
    --brand-primary: #0ea5e9;
    /* Vibrant Cyan/Blue */
    --brand-primary-soft: #e0f2fe;
    --brand-secondary: #6366f1;
    /* Indigo */
    --brand-accent: #14b8a6;
    /* Teal */

    --bg-main: #f8fafc;
    --bg-card: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border-color: #f1f5f9;
    --input-focus: rgba(14, 165, 233, 0.15);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows & Surfacing */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Base Utilities */
.fw-800 {
    font-weight: 800 !important;
}

.letter-spacing-1 {
    letter-spacing: 0.1em;
}

.letter-spacing-2 {
    letter-spacing: 0.15em;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Layout & Components */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.975rem;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(14, 165, 233, 0.4);
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    background-color: #fff;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 10px;
}

/* Chat Overhaul */
.chat-bubble {
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
    max-width: 85%;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.chat-ai {
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-md);
    align-self: flex-start;
}

.chat-student {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2);
    align-self: flex-end;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

/* Summernote Overrides to match theme */
.note-editor.note-frame {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

.note-toolbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid var(--border-color) !important;
}