/* ============================================
   LearnPro LMS — Design System
   ============================================ */

/* ---------- DaisyUI Theme Tokens (DaisyUI v4 OKLCH) ---------- */
[data-theme="learnpro"] {
    color-scheme: light;
    --p: 49.12% 0.237 264.4;
    --pf: 42% 0.23 264.4;
    --pc: 100% 0 0;
    --s: 27.81% 0.033 256.8;
    --sf: 23% 0.03 256.8;
    --sc: 100% 0 0;
    --a: 62.3% 0.188 259.8;
    --af: 55% 0.18 259.8;
    --ac: 100% 0 0;
    --n: 98.4% 0.004 247.9;
    --nf: 93% 0.008 247.9;
    --nc: 27.81% 0.033 256.8;
    --b1: 100% 0 0;
    --b2: 98.4% 0.004 247.9;
    --b3: 96% 0.008 247.9;
    --bc: 27.81% 0.033 256.8;
    --in: 58.8% 0.158 241.9;
    --inc: 100% 0 0;
    --su: 62.8% 0.194 149.2;
    --suc: 100% 0 0;
    --wa: 74.8% 0.16 73.1;
    --wac: 100% 0 0;
    --er: 57.7% 0.222 27.3;
    --erc: 100% 0 0;
    --rounded-box: 1rem;
    --rounded-btn: 0.5rem;
    --rounded-badge: 1.9rem;
    --animation-btn: 0.25s;
    --animation-input: .2s;
    --btn-focus-scale: 0.95;
    --border-btn: 1px;
    --tab-border: 1px;
    --tab-radius: 0.5rem;
}

/* ---------- Typography & Global Scrolling ---------- */
html {
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* ---------- Form Elements ---------- */
.input,
.select,
.textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #1A56DB;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* ---------- Buttons ---------- */
.btn {
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: #1A56DB !important;
    color: #FFFFFF !important;
    border-color: #1A56DB !important;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.25);
}

.btn-primary:hover {
    background-color: #1544B0 !important;
    border-color: #1544B0 !important;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.35);
    transform: translateY(-1px);
}

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

.btn-success {
    background-color: #16A34A !important;
    color: #FFFFFF !important;
    border-color: #16A34A !important;
}
.btn-success:hover {
    background-color: #15803D !important;
    border-color: #15803D !important;
}

.btn-warning {
    background-color: #D97706 !important;
    color: #FFFFFF !important;
    border-color: #D97706 !important;
}
.btn-warning:hover {
    background-color: #B45309 !important;
    border-color: #B45309 !important;
}

.btn-error {
    background-color: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: #DC2626 !important;
}
.btn-error:hover {
    background-color: #B91C1C !important;
    border-color: #B91C1C !important;
}

/* ---------- Badges High-Contrast ---------- */
.badge {
    border-width: 1px;
}
.badge-primary {
    background-color: #1A56DB !important;
    color: #FFFFFF !important;
    border-color: #1A56DB !important;
}
.badge-success {
    background-color: #DCFCE7 !important;
    color: #15803D !important;
    border-color: #BBF7D0 !important;
}
.badge-warning {
    background-color: #FEF3C7 !important;
    color: #B45309 !important;
    border-color: #FDE68A !important;
}
.badge-error {
    background-color: #FEE2E2 !important;
    color: #B91C1C !important;
    border-color: #FECACA !important;
}
.badge-info {
    background-color: #DBEAFE !important;
    color: #1D4ED8 !important;
    border-color: #BFDBFE !important;
}
.badge-ghost {
    background-color: #F1F5F9 !important;
    color: #334155 !important;
    border-color: #CBD5E1 !important;
}

/* ---------- Gradient Text ---------- */
.gradient-text {
    background: linear-gradient(135deg, #1A56DB 0%, #3B82F6 50%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Glass Effect ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---------- Layout & Surface Utilities ---------- */
.surface-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    border-radius: 1.25rem;
}

.surface-card-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    border-radius: 1.25rem;
}

.content-shell {
    max-width: 1200px;
    margin: 0 auto;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.7rem;
    line-height: 1;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
}

.pill-primary {
    background: rgba(26, 86, 219, 0.12);
    color: #1A56DB;
}

.pill-success {
    background: rgba(22, 163, 74, 0.12);
    color: #15803D;
}

.pill-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #B45309;
}

.muted-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.1rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    padding: 1.1rem 1.2rem;
}

.stat-card .icon-circle {
    background: rgba(26, 86, 219, 0.08);
    color: #1A56DB;
}

.feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.feature-list-item + .feature-list-item {
    margin-top: 0.8rem;
}

/* ---------- Course Card ---------- */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid transparent;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 86, 219, 0.12);
    border-top-color: #1A56DB;
}

.course-card figure img {
    transition: transform 0.5s ease;
}

.course-card:hover figure img {
    transform: scale(1.08);
}

/* ---------- Icon Circle Utility ---------- */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    flex-shrink: 0;
}

.icon-circle-sm {
    width: 2rem;
    height: 2rem;
}

.icon-circle-md {
    width: 2.5rem;
    height: 2.5rem;
}

.icon-circle-lg {
    width: 3.5rem;
    height: 3.5rem;
}

.icon-circle-xl {
    width: 5rem;
    height: 5rem;
}

/* ---------- Material Icons Sizing ---------- */
.material-symbols-outlined.icon-sm { font-size: 18px; }
.material-symbols-outlined.icon-md { font-size: 22px; }
.material-symbols-outlined.icon-lg { font-size: 28px; }
.material-symbols-outlined.icon-xl { font-size: 36px; }

/* ---------- Page Header Banner ---------- */
.page-header {
    background: linear-gradient(135deg, #1E293B 0%, #1A56DB 100%);
    color: white;
    padding: 2.5rem 0;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* ---------- Auth Pages Background ---------- */
.auth-bg {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f8fafc 100%);
    position: relative;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(26, 86, 219, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 50% 80%, rgba(96, 165, 250, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* ---------- Sidebar Active Indicator ---------- */
.sidebar-active {
    background-color: rgba(26, 86, 219, 0.08);
    border-left: 3px solid #1A56DB;
    font-weight: 600;
    color: #1A56DB;
}

/* ---------- Progress Bar ---------- */
.progress-fill {
    transition: width 0.6s ease;
}

/* ---------- Entry Animations ---------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.5s ease-out forwards;
}

.animate-fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ---------- HTMX Transitions ---------- */
.htmx-settling {
    opacity: 0;
}

#main-content {
    transition: opacity 200ms ease-in-out;
}

#main-content.htmx-settling {
    opacity: 0;
}

#main-content.htmx-added {
    opacity: 1;
}

/* ---------- HTMX Loading Indicator ---------- */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* ---------- Loading Bar Animation ---------- */
@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ---------- Skeleton Loading ---------- */
.skeleton-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* ---------- Notification Badge Bounce ---------- */
@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.badge-bounce {
    animation: badge-bounce 0.3s ease;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ---------- Stat Card ---------- */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ---------- Section Divider ---------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E293B;
}

.section-header p {
    color: rgba(30, 41, 59, 0.5);
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

/* ---------- Prose & Rich Content Improvements ---------- */
.prose, .rich-content {
    line-height: 1.8;
    color: #334155;
}

.prose h1, .rich-content h1,
.prose h2, .rich-content h2,
.prose h3, .rich-content h3,
.prose h4, .rich-content h4 {
    font-family: 'Outfit', system-ui, sans-serif;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.prose h1, .rich-content h1 { font-size: 1.75rem; margin-top: 2rem; margin-bottom: 1rem; }
.prose h2, .rich-content h2 { font-size: 1.4rem; margin-top: 1.75rem; margin-bottom: 0.85rem; }
.prose h3, .rich-content h3 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose h4, .rich-content h4 { font-size: 1.05rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }

.prose p, .rich-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.rich-content ul, .prose ul {
    list-style-type: disc;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.rich-content ol, .prose ol {
    list-style-type: decimal;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.rich-content li, .prose li {
    margin-bottom: 0.35rem;
    color: #334155;
}

.rich-content blockquote, .prose blockquote {
    border-left: 4px solid #1a56db;
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    color: #475569;
    font-style: italic;
}

.rich-content code, .prose code {
    background: #f1f5f9;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    padding: 0.2em 0.4em;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

.rich-content pre, .prose pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.rich-content pre code, .prose pre code {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
}

.rich-content img, .prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.25rem 0;
}

.rich-content a, .prose a {
    color: #1a56db;
    text-decoration: underline;
    font-weight: 500;
}

.rich-content a:hover, .prose a:hover {
    color: #1544b0;
}

/* Responsive Table Container & Styling */
.rich-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.rich-content table,
.prose table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.rich-content th,
.prose th {
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    padding: 0.85rem 1.15rem;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rich-content td,
.prose td {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}

.rich-content tbody tr:last-child td,
.prose tbody tr:last-child td {
    border-bottom: none;
}

.rich-content tbody tr:hover td,
.prose tbody tr:hover td {
    background-color: #f8fafc;
}

/* Jodit Editor Theme Integration */
.jodit-container {
    border-radius: 0.75rem !important;
    border-color: #cbd5e1 !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.jodit-container:focus-within {
    border-color: #1a56db !important;
    box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.15) !important;
}

.jodit-toolbar__box {
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.jodit-status-bar {
    border-bottom-left-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}


/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state .icon-circle {
    margin: 0 auto 1.5rem;
    background: #f1f5f9;
    color: #94a3b8;
}

.empty-state h3 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: rgba(30, 41, 59, 0.5);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ---------- Gentle Floating Keyframes ---------- */
@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes heroFloatReverse {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(8px);
    }
}

.animate-float-slow {
    animation: heroFloat 5s ease-in-out infinite;
}

.animate-float-delayed {
    animation: heroFloatReverse 6s ease-in-out 1s infinite;
}

/* Responsive Header Utilities */
@media (max-width: 1023px) {
    .header-get-started-btn {
        display: none !important;
    }
}
@media (min-width: 1024px) {
    .header-get-started-btn {
        display: inline-flex !important;
    }
}

/* Celebration & Badge Animations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.floating-badge {
    animation: floatSlow 4s ease-in-out infinite;
}


