* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    line-height: 1.5;
}

body.sidebar-open {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ---------- Logo ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo__image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.logo__text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #000000;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #1f2933;
    border-radius: 2px;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #694747;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: #eb2525;
}

/* ---------- User box / profile ---------- */
.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-box__profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default; /* profil funksiyasi ulanganda "pointer" ga o'zgartiring */
}

.user-box__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eb2525;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-box__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-box__name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2933;
}

.logout-form {
    display: inline;
}

.logout-btn {
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #694747;
}

.logout-btn:hover {
    background: #f1f5f9;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100vh;
    background: #ffffff;
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.15);
    z-index: 60;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.mobile-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #1f2933;
}

.mobile-sidebar__close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: #475569;
    cursor: pointer;
}

.mobile-sidebar__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav a {
    text-decoration: none;
    color: #694747;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}

.mobile-user-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
}

.mobile-sidebar__overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 50;
}

.mobile-sidebar__overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    .header-actions--desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .logo__text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container,
    .container-header {
        padding: 0 14px;
    }

    .logo__image {
        width: 28px;
        height: 28px;
    }

    .logo__text {
        font-size: 0.72rem;
        letter-spacing: 0.02em;
    }
}

/* Main content */
.main-content {
    min-height: 70vh;
    padding: 40px 20px;
}

/* Messages */
.messages {
    margin-bottom: 20px;
}

.message {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

.message.success {
    background: #dcfce7;
    color: #166534;
}

/* Login form */
.login-container {
    max-width: 380px;
    margin: 60px auto;
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

.login-container label {
    display: block;
    margin-top: 14px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #694747;
}

.login-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background: #eb2525;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.login-container button:hover {
    background: #d81d1d;
}

.error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.profile-picture {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #e2e8f0;
    background: #e2e8f0;
}

.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #475569;
}

.article-image {
    width: 500px;
    height: auto;
    object-fit: cover;
    display: flex;
    border: 2px solid #e2e8f0;
    background: #e2e8f0;
}

.article-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #475569;
}