/* === Рабочий стол === */
.dashWrap {
    width: 100%;
}

/* Фильтры */
.dashFilter {
    margin: 0 0 16px 0;
}
.dashFilterPeriods { float: left; }
.dashFilterDates { float: left; margin-left: 12px; }
.dashFilterDates input {
    width: 240px;
    height: 32px;
}
.dashFilterUser { float: right; width: 220px; }
.dashFilterUser select { height: 32px; }
@media (max-width: 700px){
    .dashFilterPeriods, .dashFilterDates, .dashFilterUser {
        float: none; width: 100%; margin: 0 0 8px 0;
    }
    .dashFilterDates input { width: 100%; }
}

/* Онлайн */
.dashOnline {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 14px;
    margin: 0 0 16px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dashOnlineAvatars { display: inline-block; margin-right: 12px; }
.dashOnlineAva {
    width: 28px;
    height: 28px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    margin-right: -10px;
    display: inline-block;
    vertical-align: middle;
}
.dashOnlineText { color: #6b7c8d; font-size: 13px; }

/* Лэйаут */
.dashLayout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.dashMain {
    flex: 1 1 auto;
    min-width: 0;
}
.dashAside {
    flex: 0 0 320px;
    width: 320px;
}
@media (max-width: 1100px){
    .dashLayout { flex-direction: column; }
    .dashMain, .dashAside { width: 100%; flex-basis: auto; }
}

.dashSection { margin-bottom: 24px; }
.dashSectionHead { margin-bottom: 12px; }
.dashSectionTitle {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7c8d;
    letter-spacing: 0.4px;
}

/* Плитки метрик */
.dashTiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.dashTile {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    min-height: 96px;
    transition: box-shadow 0.15s;
}
.dashTile:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.dashTileIcon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    flex: 0 0 48px;
    margin-right: 14px;
    background: linear-gradient(135deg, #3e8bcf, #5fa3dd);
}

.dashTileBody { flex: 1 1 auto; min-width: 0; }
.dashTileName {
    font-size: 12px;
    color: #8c9cac;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    line-height: 1.2;
}
.dashTileCount {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 600;
    color: #1a1a2e;
}
.dashTileSum {
    font-size: 13px;
    color: #4caf50;
    font-weight: 500;
    margin-top: 4px;
}

/* Графики */
.dashCharts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 12px;
}
.dashChart {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dashChartTitle {
    font-size: 13px;
    color: #6b7c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}
.dashChartBox { position: relative; height: 360px; }
.dashChartBox canvas { max-height: 360px !important; max-width: 100% !important; }

/* === Блок новостей === */
.newsBlock {
    background: #ffffff;
    border-radius: 8px;
    padding: 18px 18px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    position: sticky;
    top: 90px;
}
.newsBlockHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.newsBlockTitle {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #4c96d8;
    letter-spacing: 0.4px;
}
.newsBlockAdd { padding: 4px 10px; line-height: 1; }
.newsBlockEmpty {
    text-align: center;
    color: #9ba9b7;
    padding: 20px 0;
    font-size: 13px;
}
.newsBlockList {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 4px;
}
.newsItem {
    border-bottom: 1px solid #eef0f3;
    padding: 12px 0;
}
.newsItem:last-child { border-bottom: none; }
.newsItemImage {
    width: 100%;
    height: 110px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-bottom: 10px;
}
.newsItemTitle {
    display: block;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
    text-decoration: none;
}
.newsItemTitle:hover { color: #3e8bcf; text-decoration: none; }
.newsItemMeta {
    color: #9ba9b7;
    font-size: 12px;
    margin-bottom: 6px;
}
.newsItemPreview,
.newsItemText {
    color: #2a2a3a;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
    word-break: break-word;
}
.newsItemText p { margin: 0 0 8px 0; }
.newsItemText p:last-child { margin-bottom: 0; }
.newsItemText img { max-width: 100%; height: auto; border-radius: 4px; }
.newsItemActions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.newsItemAdminTools {
    margin-left: auto;
    display: inline-flex;
    gap: 8px;
}
.newsItemAdminTools .newsAction { color: #b0b9c2; }
.newsItemAdminTools .newsAction:hover { color: #3e8bcf; }
.newsAction {
    color: #8c9cac;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.newsAction:hover, .newsAction:focus { color: #3e8bcf; text-decoration: none; }
.newsAction.active { color: #3e8bcf; font-weight: 600; }

/* === Модалка просмотра новости === */
.newsModalHeader { border-bottom: 1px solid #eef0f3; }
.newsModalHeader .modal-title {
    color: #1a1a2e;
    font-weight: 600;
    margin-right: 30px;
}
.newsModalMeta { color: #9ba9b7; font-size: 13px; margin-top: 6px; }
.newsModalActions { margin-bottom: 12px; text-align: right; }
.newsModalActions .btn { margin-left: 6px; }
.newsModalImage { margin-bottom: 14px; text-align: center; }
.newsModalImage img { max-width: 100%; border-radius: 6px; }
.newsModalText {
    font-size: 14px;
    line-height: 1.6;
    color: #2a2a3a;
    margin-bottom: 16px;
}
.newsModalLikes {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #eef0f3;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 18px;
}
.newsModalLikes .newsAction { font-size: 14px; }
.newsCommentsTitle {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a2e;
}
.newsCommentForm {
    margin-bottom: 18px;
    background: #f7f8fa;
    border-radius: 6px;
    padding: 10px;
}
.newsCommentForm textarea {
    width: 100%;
    border: 1px solid #d8dde5;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 8px;
    font-family: inherit;
}
.newsCommentForm button { margin: 0; }
.newsCommentsEmpty {
    color: #9ba9b7;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}
.newsComment {
    padding: 10px 0;
    border-bottom: 1px solid #eef0f3;
}
.newsComment:last-child { border-bottom: none; }
.newsCommentReply {
    margin-left: 30px;
    padding-left: 12px;
    border-left: 2px solid #e7eaef;
    border-bottom: none;
}
.newsCommentReplies { margin-top: 8px; }
.newsCommentHead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 12px;
}
.newsCommentAuthor { font-weight: 600; color: #1a1a2e; }
.newsCommentDate { color: #9ba9b7; }
.newsCommentTools { margin-left: auto; display: flex; gap: 8px; }
.newsCommentTools a { color: #b0b9c2; font-size: 12px; }
.newsCommentTools a:hover { color: #3e8bcf; }
.newsCommentText {
    font-size: 13px;
    line-height: 1.5;
    color: #2a2a3a;
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}
.newsCommentText.editing { display: none; }
.newsCommentEditForm { margin-bottom: 8px; }
.newsCommentEditForm textarea {
    width: 100%;
    border: 1px solid #d8dde5;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    margin-bottom: 6px;
    font-family: inherit;
    resize: vertical;
}
.newsCommentActions {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 12px;
}
