/* Study Amigo - Ultra Modern Dashboard Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
    background: #f3f4f6;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Page Layout Wrappers */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero {
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
    color: white;
    padding: 80px 30px;
}

/* Modern Dashboard Layout */
.app-dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* Left Sidebar */
.app-sidebar {
    width: 270px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 24px;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 28px;
}

.app-sidebar-brand i {
    color: #6d28d9;
    font-size: 1.6rem;
}

.btn-sidebar-action {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff !important;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.25);
    border: none;
    width: 100%;
    margin-bottom: 28px;
    transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(109, 40, 217, 0.35);
}

.app-sidebar .nav-pills .nav-link {
    color: #64748b;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-sidebar .nav-pills .nav-link:hover {
    color: #6d28d9;
    background: #f3e8ff;
}

.app-sidebar .nav-pills .nav-link.active {
    background: #f3e8ff;
    color: #6d28d9;
}

/* Sidebar App Promo Widget */
.app-promo-card {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border-radius: 16px;
    padding: 20px;
    margin-top: auto;
    text-align: center;
    border: 1px solid #e9d5ff;
}

.app-promo-card h6 {
    font-weight: 700;
    color: #581c87;
    margin-bottom: 8px;
}

/* Main Dashboard Right Container */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Header Bar */
.app-topbar {
    height: 76px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.topbar-search {
    position: relative;
    width: 320px;
}

.topbar-search input {
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    padding: 10px 16px 10px 42px;
    font-size: 0.9rem;
    width: 100%;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* Dashboard Content Cards */
.dash-content {
    padding: 32px;
    flex: 1;
}

.kpi-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-purple { background: #f3e8ff; color: #7c3aed; }
.kpi-blue { background: #e0f2fe; color: #0284c7; }
.kpi-orange { background: #ffedd5; color: #ea580c; }
.kpi-pink { background: #ffe4e6; color: #e11d48; }

.kpi-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.kpi-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Dark Feature Card */
.feature-dark-card {
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
    color: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(109, 40, 217, 0.3);
}

/* Content Panel Cards */
.dash-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: none;
}

.dash-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .app-dashboard {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .dash-content {
        padding: 20px;
    }
}

/* Rich HTML Content Typography & Layout Best Practices */
.html-content {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
    word-break: break-word;
}

.html-content h1,
.html-content h2,
.html-content h3,
.html-content h4,
.html-content h5,
.html-content h6 {
    font-weight: 700;
    color: #0f172a;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.html-content h1 { font-size: 1.5rem; }
.html-content h2 { font-size: 1.3rem; }
.html-content h3 { font-size: 1.15rem; }
.html-content h4 { font-size: 1.05rem; }

.html-content p {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.html-content ul,
.html-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.html-content li {
    margin-bottom: 0.35rem;
}

.html-content blockquote {
    border-left: 4px solid #7c3aed;
    background: #f3e8ff;
    padding: 10px 16px;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #581c87;
}

.html-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.html-content table th,
.html-content table td {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
}

.html-content table th {
    background: #f1f5f9;
    font-weight: 700;
}

.html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.75rem 0;
}

.html-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 0.75rem 0;
}
