

.header {
    width: 100%;
    height: 84px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #FFFFFF;
}


.logo-button {
    width: 175px;
    height: 48px;
    background: #EAB308;
    border-radius: 8px;
    font-size: 18px;
    line-height: 20px;
}

.logo-button,
.action-button,
.footer-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #FFFFFF;
    text-decoration: none;
}


.nav-link {
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    color: #000000;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link.active {
    color: #CA9345;
}

.nav-link:hover {
    color: #EAB308;
}


.header-buttons {
    display: flex;
    gap: 16px;
}

.action-button {
    height: 40px;
    padding: 0 24px;
    background: #EAB308;
    border-radius: 7px;
    font-size: 15px;
    line-height: 18px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.action-button:hover,
.footer-nav-button:hover {
    background: #d4a107;
}

.action-button--notifications {
    position: relative;
}

.header-buttons .action-button[href="chat.html"] {
    display: none;
}

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #DC2626;
}

.notification-badge.is-hidden,
.messenger-widget__badge.is-hidden {
    display: none;
}

.messenger-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.messenger-widget__panel {
    width: min(380px, calc(100vw - 48px));
    height: min(560px, calc(100vh - 132px));
    border: 1px solid rgba(202, 147, 69, 0.22);
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 24px 50px rgba(17, 24, 39, 0.18);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.messenger-widget.is-open .messenger-widget__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

.messenger-widget__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-bottom: 1px solid rgba(202, 147, 69, 0.18);
}

.messenger-widget__panel-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.messenger-widget__title {
    font-size: 16px;
    line-height: 20px;
    color: #374151;
}

.messenger-widget__panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.messenger-widget__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 700;
    text-decoration: none;
}

.messenger-widget__link,
.messenger-widget__icon-btn {
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #92400E;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.messenger-widget__link:hover,
.messenger-widget__icon-btn:hover {
    background: #FFFFFF;
    color: #78350F;
}

.messenger-widget__icon-btn {
    width: 34px;
    border: none;
    font-size: 22px;
    line-height: 22px;
    cursor: pointer;
}

.messenger-widget__frame-wrap {
    width: 100%;
    height: calc(100% - 63px);
    background: #FFFFFF;
}

.messenger-widget__frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #FFFFFF;
}

.messenger-widget__toggle {
    position: relative;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #FACC15 0%, #EAB308 100%);
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(202, 147, 69, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.messenger-widget__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(202, 147, 69, 0.32);
}

.messenger-widget__toggle:focus-visible,
.messenger-widget__icon-btn:focus-visible,
.messenger-widget__link:focus-visible {
    outline: 2px solid #CA8A04;
    outline-offset: 3px;
}

.messenger-widget__toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.messenger-widget__toggle-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.messenger-widget__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border: 2px solid #FFFFFF;
    border-radius: 999px;
    background: #DC2626;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 12px;
    font-weight: 700;
}

.main-content {
    padding: 20px 24px;
    flex: 1;
}


.footer {
    width: 100%;
    height: 178px;
    background: #A16207;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: center;
    background-repeat: repeat;
}

.footer-column {
    height: 138px;
    background: #FEF08A;
    border-radius: 11px;
    padding: 18px 44px 18px 44px;
}


.footer-left {
    width: 272px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-link {
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    text-align: center;
    text-decoration-line: underline;
    color: #374151;
    width: 228px;
}


.footer-center {
    margin: 0 24px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 126px);
    grid-template-rows: repeat(2, 41px);
    gap: 17px;
    height: 100%;
    align-items: start; 
    justify-content: center;
    box-sizing: border-box; 
}

.footer-nav-button {
    width: 126px;
    height: 41px;
    background: #EAB308;
    border-radius: 8px;
    font-size: 15px;
    line-height: 18px;
    transition: background-color 0.2s;
}


.footer-right {
    width: 272px;
    height: 138px;
    background: #FEF08A;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.footer-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
    color: #374151;
    margin-bottom: 8px;
}

.footer-text {
    font-weight: 400;
    font-size: 15px;
    line-height: 18px;
    color: #374151;
}


@media (max-width: 1200px) {
    .site-container {
        max-width: 95%;
        min-height: auto;
    }
    
    .documents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer {
        flex-wrap: wrap;
        height: auto;
        padding: 20px;
        position: static;
        margin-top: 40px;
    }
    
    .footer-column,
    .footer-right {
        width: 100%;
        margin: 10px 0;
    }
    
    .footer-center {
        margin: 20px 0;
    }
}


@media (max-width: 768px) {
    .site-container {
        width: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .header {
        flex-direction: column;
        height: auto;
        padding: 16px;
    }
    
    body .header .action-button[href="notifications.html"],
    body .header .action-button[href="profile.html"] {
        font-size: 15px;
        line-height: 18px;
    }

    body .header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        height: auto !important;
    }

    body .header .logo-button {
        flex: 0 0 160px !important;
        width: 160px !important;
    }

    body .header .nav-link {
        flex: 1 1 auto !important;
        order: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body .header .header-buttons {
        display: flex !important;
        flex: 0 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        margin-top: 0 !important;
    }

    body .header .action-button {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        height: 40px;
        padding: 0 14px !important;
        font-weight: 600;
        font-size: 13px;
        line-height: 16px;
        letter-spacing: 0.01em;
        text-align: center;
        white-space: nowrap !important;
    }
    
    .daily-phrase {
        height: auto;
        padding: 20px;
        margin: 16px 0;
    }
    
    #daily-message {
        font-size: 20px;
        line-height: 24px;
    }
    
    .announcement-container {
        padding: 16px;
    }
    
    #admin-announcement {
        font-size: 16px;
        line-height: 20px;
        padding: 16px;
    }
    
    .tasks-container {
        padding: 20px 16px;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer {
        margin-top: 10px;
        gap: 8px;
    }

    .footer-column,
    .footer-right {
        margin: 0;
    }

    .footer-center {
        margin: 0;
    }
    
    .footer-nav {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .footer-nav-button {
        width: 100%;
        font-size: 14px;
        line-height: 17px;
    }

}


@media (max-width: 768px) {
    .messenger-widget {
        display: none;
    }
}

@media (max-width: 1024px) and (min-width: 481px) {
    body .footer {
        height: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: center !important;
        gap: clamp(8px, 1.6vw, 16px) !important;
        padding: clamp(12px, 2vw, 20px) !important;
        overflow: visible !important;
    }

    body .footer .footer-column,
    body .footer .footer-right {
        height: 138px !important;
        min-height: 138px !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    body .footer .footer-left,
    body .footer .footer-right {
        flex: 0 1 clamp(150px, 22vw, 220px) !important;
        width: clamp(150px, 22vw, 220px) !important;
        min-width: 0 !important;
    }

    body .footer .footer-center {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: 138px !important;
        min-height: 138px !important;
        margin: 0 !important;
        padding: 18px clamp(10px, 1.8vw, 20px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    body .footer .footer-nav {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(2, 41px) !important;
        width: min(100%, 360px) !important;
        height: 100% !important;
        gap: clamp(8px, 1.6vw, 17px) !important;
        align-items: center !important;
        justify-content: stretch !important;
        align-content: center !important;
        overflow: visible !important;
    }

    body .footer .footer-nav-button {
        width: 100% !important;
        min-width: 0 !important;
        height: 41px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        font-size: clamp(12px, 1.4vw, 14px) !important;
        line-height: 16px !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    body .footer .privacy-link,
    body .footer .footer-text {
        width: 100% !important;
        max-width: 100% !important;
        font-size: clamp(13px, 1.55vw, 15px) !important;
        line-height: 1.25 !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
    }

    body .footer .footer-title {
        font-size: clamp(14px, 1.7vw, 16px) !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
}

@media (max-width: 820px) and (min-width: 701px) {
    body .footer {
        gap: 10px !important;
        padding: 12px !important;
    }

    body .footer .footer-left,
    body .footer .footer-right {
        flex: 0 0 clamp(170px, 24vw, 195px) !important;
        width: clamp(170px, 24vw, 195px) !important;
        padding: 14px 12px !important;
    }

    body .footer .footer-center {
        flex: 1 1 0 !important;
        padding: 18px 12px !important;
    }

    body .footer .footer-nav {
        width: min(100%, 340px) !important;
        gap: 10px !important;
    }

    body .footer .footer-nav-button {
        padding: 0 8px !important;
        font-size: 12px !important;
        line-height: 16px !important;
    }

    body .footer .privacy-link,
    body .footer .footer-text {
        font-size: 14px !important;
        line-height: 1.25 !important;
    }
}

@media (max-width: 700px) and (min-width: 481px) {
    body .footer {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    body .footer .footer-column,
    body .footer .footer-right,
    body .footer .footer-left,
    body .footer .footer-center {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body .footer .footer-left,
    body .footer .footer-right {
        padding: 18px 20px !important;
    }

    body .footer .footer-center {
        padding: 18px 20px !important;
    }

    body .footer .footer-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(2, 41px) !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    body .footer {
        height: auto !important;
        align-items: stretch !important;
        overflow: visible !important;
    }

    body .footer .footer-column,
    body .footer .footer-right {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    body .footer .footer-center {
        height: auto !important;
        min-height: 0 !important;
        padding: 16px 14px !important;
        overflow: visible !important;
    }

    body .footer .footer-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(3, 41px) !important;
        grid-auto-rows: 41px !important;
        width: 100% !important;
        height: auto !important;
        gap: 10px !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        overflow: visible !important;
    }

    body .footer .footer-nav-button {
        width: 100% !important;
        min-width: 0 !important;
        height: 41px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}


@media (max-width: 480px) {
    body .header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        height: auto !important;
        padding: 10px 8px !important;
    }

    body .header .logo-button {
        flex: 0 0 88px !important;
        width: 88px !important;
        height: 40px !important;
    }

    body .header .nav-link {
        display: none !important;
    }

    body .header .header-buttons {
        display: flex !important;
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        justify-content: stretch !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin-top: 0 !important;
    }

    body .header .action-button {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 40px !important;
        padding: 0 10px !important;
        font-weight: 600 !important;
        font-size: 12px !important;
        line-height: 15px !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .footer-nav-button {
        width: 100%;
        font-size: 13px;
        line-height: 16px;
    }
    
    .document-card {
        padding: 16px;
    }
    
    .document-date {
        position: static;
        display: block;
        margin-bottom: 8px;
    }
}
