/* Скрыть контент до инициализации Alpine (SPA) */
[x-cloak] {
    display: none !important;
}

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background) url('../img/anya-chernykh-huX8hfbrEh4-unsplash.jpg') no-repeat center fixed;
    background-size: cover;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    min-width: 1440px;
    overflow-x: hidden;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Кнопки */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Страница авторизации (SPA) */
.container--auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 560px;
}

.auth-card__row {
    display: flex;
    align-items: center;
    gap: 40px;
}

.auth-card__row .auth-form {
    flex: 1;
    min-width: 0;
}

.auth-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:disabled {
    background: #f9f9f9;
    cursor: not-allowed;
}

/* Шапка */
.header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background: #000000e0;
    padding: 14px 0;
    margin-bottom: 30px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.header-container.container {
    max-width: 1200px;
}

.header-title {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.header-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    min-height: 40px;
    box-sizing: border-box;
}

.header-admin-btn,
.header-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.header-admin-btn:hover,
.header-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.header-admin-icon,
.header-logout-icon {
    width: 18px;
    height: 18px;
}

.header--sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header-modes {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    min-height: 40px;
    box-sizing: border-box;
}

.header-mode-btn {
    padding: 6px 12px;
    margin: 0;
    min-height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.header-mode-btn:hover:not(:disabled) {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-mode-btn--active {
    color: #fff;
    background: var(--primary-color);
}

.header-mode-btn--active:hover:not(:disabled) {
    background: var(--primary-hover);
}

.header-mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.header .header-container {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-state-block {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    min-height: 40px;
    box-sizing: border-box;
}

.header-state-block .header-state-btn {
    border-radius: 6px;
    border: none;
    background: transparent;
}

.header-state-block .header-state-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-state-block .header-state-btn--active {
    color: #fff;
    background: var(--primary-color);
}

.header-state-block .header-state-btn--active:hover {
    background: var(--primary-hover);
}

.header-state-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.header-state-icon {
    width: 18px;
    height: 18px;
}

.header-rating-btns {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    min-height: 40px;
    box-sizing: border-box;
}

.header-rating-btn {
    padding: 6px 10px;
    margin: 0;
    min-height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.header-rating-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-rating-btn--active {
    color: #fff;
    background: var(--primary-color);
}

.header-rating-btn--active:hover {
    background: var(--primary-hover);
}




.header-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    min-height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.header-refresh:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-refresh-icon {
    width: 18px;
    height: 18px;
}

/* Основной контент */
.main-content {
    padding-bottom: 0;
}

/* Элементы управления (в шапке и общие) */
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 500;
    white-space: nowrap;
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Компактная таблица статей */
.articles-wrap {
    padding: 4px;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.articles-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

.article-row {
}

.article-cell {
    --article-left: 110px;
    width: 100%;
    max-width: 0;
    padding: 5px 12px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.article-row-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 52px;
}

.article-left-block {
    width: var(--article-left);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 6px 0 6px 0;
    gap: 6px;
}

.article-left-block .article-time {
    flex-shrink: 0;
}

.article-left-block .article-line-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.article-expand-block {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    margin: 0 4px 0 10px;
}

.article-expand-block .article-expand-btn {
    min-width: 26px;
    width: auto;
    min-height: 28px;
    height: 100%;
    margin: 0;
    padding: 0 6px;
}

.article-content-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.article-content-block--expand-all {
    margin-left: 22px;
}

.article-content-block .article-line--main {
    flex: 0 0 auto;
}

.article-content-block .article-line--main .article-title {
    display: block;
}

.article-line {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 5px 0;
    min-width: 0;
}

.article-line--main {
    padding-top: 6px;
    padding-bottom: 3px;
    cursor: pointer;
}

.article-content-block .article-line--main {
    padding-bottom: 2px;
}

.article-line--main .article-line-left {
    flex-shrink: 0;
    width: var(--article-left);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-time {
    width: 100px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    white-space: nowrap;
}

.article-title {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    word-break: break-word;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-line--meta {
    align-items: center;
    overflow: hidden;
    padding-top: 2px;
    padding-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.article-line--meta .article-line-left {
    flex-shrink: 0;
    width: var(--article-left);
    display: flex;
    align-items: center;
}

.article-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0 8px;
    height: 32px;
    border-radius: 0;
    box-sizing: border-box;
}

.article-state-btns {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    margin-right: 4px;
}

.article-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.article-state-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-color);
}

.article-state-btn--ignore:hover:not(.article-state-btn--active) {
    background: rgba(244, 67, 54, 0.2);
    color: #b71c1c;
}

.article-state-btn--later:hover:not(.article-state-btn--active) {
    background: rgba(76, 175, 80, 0.2);
    color: #1b5e20;
}

.article-state-btn--active {
    background: var(--primary-color);
    color: white;
}

.article-state-btn--active:hover {
    background: var(--primary-hover);
    color: white;
}

.article-state-icon {
    width: 16px;
    height: 16px;
}

.article-tags {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.article-row--expanded .article-tags {
    overflow: visible;
    white-space: normal;
}

.article-tags .tag-rating-wrap {
    margin-right: 6px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 12px;
}

.tag-rating-wrap,
.author-rating-wrap {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px 8px;
    margin-right: 6px;
    margin-bottom: 2px;
    background: #e9ecef;
    color: var(--text-secondary);
    border-radius: 10px;
    border-width: 1px;
    border-style: solid;
    border-color: var(--border-color);
    transition: padding 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tag-rating-wrap--expanded,
.author-rating-wrap--expanded {
    padding: 6px 10px 8px;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    box-shadow: var(--shadow), 0 0 0 1px var(--border-color);
    background: #e9ecef;
    z-index: 10;
}

/* Градация обводки и фона по рейтингу: красный (негатив) → серый (только 0) → зелёный (позитив). Фон приглушённый для читаемости. */
.rating-border--n20 { border-color: #b71c1c; background-color: #fde8e8; }
.rating-border--n10 { border-color: #c62828; background-color: #fce4e4; }
.rating-border--n5  { border-color: #e57373; background-color: #fcf0f0; }
.rating-border--n1  { border-color: #ef9a9a; background-color: #fdf5f5; }   /* -5 … -1 */
.rating-border--0   { border-color: var(--border-color); background-color: #e9ecef; }  /* только 0 */
.rating-border--1   { border-color: #a5d6a7; background-color: #f0f9f0; }   /* 1 … 5 */
.rating-border--5   { border-color: #81c784; background-color: #e8f5e9; }
.rating-border--10  { border-color: #43a047; background-color: #e0f2e1; }
.rating-border--20  { border-color: #2e7d32; background-color: #c8e6c9; }

.rating-inline-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rating-inline-label {
    font-size: 12px;
}

.rating-habr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.rating-habr-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.rating-inline-row {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.rating-inline-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.rating-inline-loading {
    font-size: 11px;
    color: var(--text-secondary);
}

.rating-inline-current {
    min-width: 22px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.rating-inline-btn {
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-color);
    transition: background 0.2s, color 0.2s;
}

.rating-inline-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
}

.rating-inline-btn--neg {
    color: var(--danger-color);
}

.rating-inline-btn--neg:hover:not(:disabled) {
    background: rgba(244, 67, 54, 0.2);
    color: #b71c1c;
}

.rating-inline-btn--pos {
    color: var(--success-color);
}

.rating-inline-btn--pos:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.2);
    color: #1b5e20;
}

.rating-inline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Оверлей для закрытия диалога рейтинга по клику вне */
.rating-outside-overlay {
    position: fixed;
    inset: 0;
    z-index: 5;
}

.article-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.article-expand-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-color);
}

.article-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.article-expand-icon svg {
    width: 14px;
    height: 14px;
}

.article-details {
    padding: 8px 0 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-details-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1em 1.5em;
    margin-bottom: 8px;
}

.article-author {
    margin: 0;
}

.article-habr-rating {
    color: var(--text-secondary);
    font-size: inherit;
}

.article-details-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.article-description-wrap {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 216px); /* 200px картинка + 16px gap, чтобы картинка прижалась к краю */
}

.article-image-wrap {
    flex-shrink: 0;
    width: 200px;
}

.article-image {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
}

.article-image:hover {
    opacity: 0.9;
}

.article-description {
    padding: 12px 14px;
    margin-bottom: 4px;
    background: #f0f4f8;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

.article-description :first-child {
    margin-top: 0;
}

.article-description :last-child {
    margin-bottom: 0;
}

.article-description a {
    color: var(--primary-color);
}

/* Модальное окно администрирования */
.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.admin-modal-content {
    position: relative;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.admin-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.admin-modal-close:hover {
    background: var(--background);
    color: var(--text-color);
}

.admin-modal-close svg {
    width: 20px;
    height: 20px;
}

.admin-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.admin-add-section,
.admin-users-section {
    margin-bottom: 24px;
}

.admin-add-section:last-child,
.admin-users-section:last-child {
    margin-bottom: 0;
}

.admin-add-section h3,
.admin-users-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.admin-input--sm {
    width: 140px;
}

.admin-add-form .admin-input {
    min-width: 120px;
}

.admin-add-section .error-message {
    margin-top: 10px;
}

.admin-users-loading,
.admin-users-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.admin-users-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-user-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
}

.admin-user-inactive {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-action-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-action-btn:hover:not(:disabled) {
    background: var(--background);
}

.admin-action-btn--ok {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.admin-action-btn--ok:hover:not(:disabled) {
    background: #218838;
}

.admin-action-btn--danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.admin-action-btn--danger:hover:not(:disabled) {
    background: #f8d7da;
}

.admin-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-password-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Модальное окно изображения */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Пагинация (в стиле шапки — тёмный фон, во всю ширину) */
.pagination {
    margin-top: 30px;
    padding: 14px 0;
    width: 100%;
    background: #000000e0;
    box-sizing: border-box;
}

.pagination__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.pagination__btn {
    padding: 0 16px;
    min-height: 36px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.pagination__btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pagination__btn:disabled {
    background: rgba(255, 255, 255, 0.04);
    opacity: 0.7;
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.5);
}

.pagination__info {
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* Состояния */
.loading,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.loading p,
.empty-state p {
    color: var(--text-secondary);
    font-size: 18px;
}

.error-message {
    padding: 16px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
        max-width: 400px;
    }

    .auth-card__row {
        flex-direction: column;
    }
    
    .header-title {
        font-size: 14px;
        left: 12px;
    }
    
    .header-actions {
        right: 12px;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .header-right {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
    
    .header-rating-btns {
        flex-wrap: wrap;
    }
    
    .control-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group select {
        width: 100%;
    }
    
    .article-cell {
        --article-left: 120px;
        padding: 6px 10px;
    }
    
    .article-time {
        width: 85px;
        font-size: 12px;
    }
    
    .pagination__inner {
        flex-direction: column;
        gap: 8px;
    }
}
