html {
    scroll-behavior: smooth;
}

body {
    background-color: #F8FAFC;
    color: #0F172A;
    margin: 0;
    overflow-x: hidden;
}

/* SPA View Management */
.page-view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-view.active {
    display: block;
}

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

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Modal Overlay */
#custom-modal {
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#custom-modal.modal-active {
    opacity: 1;
    pointer-events: auto;
}

/* Hero pattern */
.hero-pattern {
    background:
        linear-gradient(rgba(0, 39, 36, 0.65), rgba(17, 94, 89, 0.75)),
        url('hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Article content typography polish */
.article-body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #334155;
}

.article-body h1, .article-body h2, .article-body h3, .article-body h4,
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.025em;
}

.article-body h1, .article-content h1 {
    font-size: 2.2rem;
    margin-top: 2.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.25;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 0.5rem;
}

.article-body h2, .article-content h2 {
    font-size: 1.65rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-body h3, .article-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-body p, .article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.85;
}

.article-body strong, .article-content strong {
    font-weight: 700;
    color: #0F172A;
}

.article-body blockquote, .article-content blockquote {
    position: relative;
    border-left: 4px solid #0F766E;
    background: linear-gradient(90deg, #F0FDFA 0%, #F8FAFC 100%);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: #115E59;
    font-size: 1.08rem;
    line-height: 1.75;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.05);
}

.article-body ul, .article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.article-body ul li, .article-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.75;
}

.article-body ul li::before, .article-content ul li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #0F766E;
    font-size: 1.2rem;
    font-weight: bold;
    top: -0.1rem;
}

.article-body ol, .article-content ol {
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

.article-body ol li, .article-content ol li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    line-height: 1.75;
}

.article-body a, .article-content a {
    color: #0F766E;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #99F6E4;
    text-underline-offset: 3px;
    transition: all 0.2s;
}

.article-body a:hover, .article-content a:hover {
    color: #115E59;
    text-decoration-color: #0F766E;
}

.article-body code, .article-content code {
    background: #F1F5F9;
    color: #0F766E;
    padding: 0.2rem 0.45rem;
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Link aktif nav */
.nav-link.active {
    color: #0F766E;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: #0F766E;
    margin-top: 2px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-success,
.badge-approved {
    background: #DCFCE7;
    color: #166534;
}

.badge-rejected {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Messages chat */
.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-out {
    background: #0F766E;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-in {
    background: #F1F5F9;
    color: #0F172A;
    border-bottom-left-radius: 4px;
}

/* Profile picture hover */
.profile-pic-wrapper {
    position: relative;
    display: inline-block;
}

.profile-pic-wrapper:hover .pic-overlay {
    opacity: 1;
}

.pic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    gap: 2px;
    font-size: 11px;
    flex-direction: column;
}

@media (min-width: 768px) {
    .pic-overlay {
        flex-direction: row;
        font-size: 12px;
    }
}

/* Dropdown */
.dropdown-content {
    display: none;
}

.dropdown.open .dropdown-content {
    display: block;
}