* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    height: 100%;
}
body {
    display: flex;
	flex-direction: column;
	min-height: 100vh;
    margin: 0;
	font-family: Inter, system-ui, -apple-system, sans-serif;
    background: url('/static/background.avif') no-repeat center center fixed;
    background-size: cover;
    background: #f5f7fb;
    color: #111827;
    position: relative;
}

/* Затемнение фона для читаемости текста */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 247, 251, 0.85);
    z-index: -1;
}

.login-container {
	max-width: 400px;
	width: 100%;
	padding: 20px;
}

.login-card {
	background: white;
	border-radius: 20px;
	padding: 40px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 {
	text-align: center;
	color: #284b73;
	margin-bottom: 10px;
}

.login-card input {
	width: 100%;
	padding: 12px;
	margin: 10px 0;
	border: 2px solid #e5e7eb;
	border-radius: 10px;
	font-size: 14px;
}

.login-card button {
	width: 100%;
	padding: 12px;
	background: #284b73;
	color: white;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	cursor: pointer;
	margin-top: 20px;
}

.login-card button:hover {
	background: #3d85c6;
}

.subtitle {
	text-align: center;
	color: #6b7280;
	font-size: 14px;
	margin-bottom: 30px;
}

.error {
	color: #ef4444;
	text-align: center;
	margin-top: 15px;
	font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-indicator.loading .status-icon {
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 12px;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    background: black;
    border-radius: 50%;
    animation: pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.status-indicator {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-icon {
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.status-indicator.idle .status-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
}

.status-indicator.loading .status-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f59e0b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'%3E%3C/path%3E%3C/svg%3E");
    animation: spin 1s linear infinite;
}

.status-indicator.success .status-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
}

.status-indicator.error .status-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ef4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'%3E%3C/path%3E%3C/svg%3E");
}

.loading-dots div:nth-child(1) { animation-delay: 0s; }
.loading-dots div:nth-child(2) { animation-delay: 0.2s; }
.loading-dots div:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* CONTAINER */
.container {
    max-width: 1500px;
	/*min-width: 960px;*/
	width: 98vw;
	min-height: 90vh;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.cart-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}
.cart-image {
    width: 28px;
    height: 28px;
    display: block;
	align-items: center;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: Arial, sans-serif;
}
#cartCount {
    background: #f44336;
    color: White;
    border-radius: 10px;
    padding: 0px 5px;
    margin-left: 5px;
    font-weight: bold;
}
.cart-add-btn {
    border-radius: 6px;
	background: #284B73;
    cursor: pointer;
    width: 38px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.cart-image-add {
    width: 20px;
    height: 20px;
    display: block;
	background: transparent;
	align-items: center;
}
.cart-add-btn:hover {
    background: #3d85c6;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(61, 133, 198, 0.35);
    letter-spacing: 0.3px;
}
.cart-add-btn:active {
    transform: scale(0.95);
}
/* уведомления */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #3d85c6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-notification.error {
    background: #ef4444;
}
.toast-notification.warning {
    background: #f59e0b;
}
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Убираем стрелки у поля ввода наценки */
#nsv_E30_input, #nsp_E31_input, #nsj_E25_input {
    -moz-appearance: textfield;
    appearance: textfield;
}
#nsv_E30_input::-webkit-inner-spin-button,
#nsv_E30_input::-webkit-outer-spin-button,
#nsp_E31_input::-webkit-inner-spin-button,
#nsp_E31_input::-webkit-outer-spin-button,
#nsj_E25_input::-webkit-inner-spin-button,
#nsj_E25_input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Модальное окно для запросов */
.modal-confirm {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.modal-confirm-content {
    background: white;
    border-radius: 12px;
    padding: 14px;
    width: 380px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideInUp 0.2s ease;
}

.modal-confirm-icon {
    font-size: 32px;
    text-align: center;
    margin-bottom: 16px;
}

.modal-confirm-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #374151;
}

.modal-confirm-message {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 14px;
}

.modal-confirm-buttons {
    display: flex;
    gap: 13px;
    justify-content: center;
}

.modal-confirm-buttons button {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.btn-cancel:hover {
    background: #d1d5db;
}

.btn-confirm {
    background: #ef4444;
    color: white;
}

.btn-confirm:hover {
    background: #dc2626;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Скрытие элементов до применения прав пользователя */
.hide-on-load {
    display: none !important;
}

.price-field {
    display: none;
}

.results-block .price-field {
    display: none;
}

/* Группировка параметров - все сужаются равномерно */
.params-grid {
    display: flex;
	flex-direction: column;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

/* Карточка параметров - все элементы получают одинаковую ширину */
.param {
    flex: 1 1 0; /* Ключевой момент - все растут и сужаются равномерно */
    min-width: 80px; /* Минимальная ширина, чтобы не съехало */
    display: flex;
    flex-direction: column;
}

.param select,
.param input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    box-sizing: border-box;
}

.param input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    color: #374151;
    background: #fff;
    box-sizing: border-box;
}

.param label {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Адаптив */
@media (max-width: 768px) {
    .params-grid {
        gap: 15px;
    }
    
    .param select,
    .param input[type="number"] {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .param label {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .param {
        min-width: 100px; /* Чуть больше минимальная ширина */
    }
}

@media (max-width: 480px) {
    .params-grid {
        flex-direction: column; /* На мобильных вертикально */
    }
    
    .param {
        min-width: auto;
    }
}

/* HEADER */
.header {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
	height: 80px;
    flex-wrap: wrap; /* Важно! Позволяет переносить элементы */
    gap: 15px; /* Отступы между строками при переносе */
}

.header > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Не сжимается */
}

.logo-area h1 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* RATES */
.rates-panel {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* Перенос курсов на новую строку */
    flex: 1; /* Занимает доступное место */
    justify-content: center; /* Центрирует курсы */
    min-width: 200px; /* Минимальная ширина */
}

.rate {
    text-align: center;
    background: #f9fafb;
    padding: 5px 10px;
    min-width: 65px;
    border-radius: 15px;
    border: 1px solid #e5e7eb;
    /* display: flex; */
    align-items: center;
    gap: 5px;
}

.rate-label {
    text-align: center;
	font-size: 10px;
    color: #6b7280;
}

.rate-value {
    font-size: 12px;
    font-weight: 600;
}

/* USER */
.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Перенос кнопок */
    flex-shrink: 0; /* Не сжимается */
}

.user-name {
    font-weight: 600;
    font-size: 13px;
}

.role-badge {
    background: #e5e7eb;
    color: #374151;
    padding: 3px 8px;
	cursor: pointer
	transition: opacity 0.2s;
    border-radius: 6px;
    font-size: 10px;
    width: 60px;           /* фиксированная ширина */
    display: inline-block; /* чтобы ширина применялась */
    text-align: center;    /* текст по центру (опционально) */
}
/* .role-badge:hover { */
    /* opacity: 0.8; */
/* } */

.invoice-btn {
    background: white;
    border: none;
    padding: 3px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 10px;
    transition: background 0.2s;
}

.invoice-btn:hover {
    background: #eeeeee;
}

.history-row {
    display: grid;
    align-items: center;
    gap: 20px;
    padding: 10px 14px;
    font-size: 13px;
}

.history-row-with-user {
    grid-template-columns: 50px 50px 130px 1fr 100px 100px 60px auto;
}

.history-row-without-user {
    grid-template-columns: 50px 130px 1fr 100px 100px 60px;
}

/* Новости */
.news-item {
    background: white;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.news-header-main {
    cursor: pointer;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: background 0.2s;
}

.news-header-main:hover {
    background: #f9fafb;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.news-date {
    font-size: 12px;
    color: #6b7280;
}

.news-badge-small {
    display: inline-block;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
}

/* Сворачивание - важные стили */
.news-content-wrapper {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
}

.news-content-wrapper.expanded {
    max-height: 2000px !important;
    overflow: visible !important;
}

.news-content-inner {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #e5e7eb;
}

/* Глобальная кнопка новостей в user-area */
.news-global-btn {
    background: #284b73;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-global-btn:hover {
    background: #1e3a5f;
}

.news-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 1s infinite;
}

@keyframes newAppear {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.news-badge {
    animation: newAppear 0.5s ease-out;
}

.news-item.unread {
    background: white;
    border-left: 3px solid #ef4444;;
}

.news-item.read {
    background: white;
    border-left: 3px solid transparent;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.news-date {
    font-size: 12px;
    color: #6b7280;
}

.news-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 15px 0;
}

/* Комментарии */
.comments-section {
    margin-top: 5px;
    border-top: 1px solid #e5e7eb;
    padding-top: 5px;
}

.comments-header {
    cursor: pointer;
	padding: 10px;
	background: #F5F5F5;
	border-radius: 8px;
	margin-top: 5px;
	font-size: 12px;
	border: 1px solid #F5F5F5;
}

.comments-header:hover {
	font-size: 12px;
	border: 1px solid #ADADAD;
}

.comment-item {
    transition: all 0.2s;
}

.comment-item[data-highlighted="true"] {
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107 !important;
}

/* Мигание новых сообщений */
@keyframes blinkOrange {
    0% { background-color: #fff3cd; border-left: 3px solid #ffc107; }
    50% { background-color: #ffe8a3; border-left: 3px solid #ff9800; }
    100% { background-color: #fff3cd; border-left: 3px solid #ffc107; }
}

.comment-item.blink-new {
    animation: blinkOrange 0.5s ease-in-out 4;
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107 !important;
}

.comment-item[data-is-new="true"] {
    /* Стиль для новых непросмотренных сообщений */
    border-left: 2px solid #ffc107;
}

.comment-item {
    transition: background-color 0.3s ease;
}

.admin-reply {
    /* Стиль для комментариев админа */
}

.comment-item:hover {
    background: #f9fafb !important;
}

.btn-reply-comment:hover {
    text-decoration: underline;
}

.btn-all-mark-read {
    background: #808080;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
	width: 110px;
    font-size: 11px;
	margin-right: 20px;
}

.btn-all-mark-read:hover {
    background: #525252;
}

.btn-mark-read {
    background: #10b981;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
	width: 110px;
    font-size: 12px;
}

.btn-mark-read:hover {
    background: #059669;
}

.btn-delete-news {
    border: 1px solid #d1d5db;
	background: #FFF0F0;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
	width: 130px;
    margin-left: 10px;
}

.btn-delete-news:hover {
    border: 1px solid #1a56db;
}

/* Админская форма */
.admin-news-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-news-form input,
.admin-news-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.admin-news-form textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit-news {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
	background: White;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-submit-news:hover {
    border: 1px solid #1a56db;
}

/* Чекбоксы выбора ролей */
.role-checkbox {
    margin-right: 0px;
    cursor: pointer;
}

.admin-news-form label {
    cursor: pointer;
    font-size: 12px;
}

.btn-edit-news {
    border: 1px solid #d1d5db;
	background: #FFF0E0;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
	width: 130px; 
    margin-right: 5px;
}

.btn-edit-news:hover {
	border: 1px solid #1a56db;
}

/* BUTTONS */
button {
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.container { max-width: 1400px; margin: 0 auto; }
/* .header { font-size: 13px; background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; } */
h1 { color: #1a56db; }
.btn { border: none; cursor: pointer; ; padding: 5px 10px; border-radius: 6px; font-size: 11px; }
.btn-primary { background: #284b73; color: white; padding: 5px 10px; border-radius: 6px; font-size: 11px; }
.btn-danger { background: #f44336; color: white; }
.btn-warning { background: #f6b26b; color: white; }
.btn-success { background: #10b981; color: white; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
table { width: 100%; background: white; border-radius: 10px; overflow: hidden; border-collapse: collapse; }
th, td { font-size: 13px; padding: 2px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { padding: 10px; background: #f3f4f6; }
.badge-pending { background: #f59e0b; color: white; padding: 2px 8px; border-radius: 20px; font-size: 11px; }
.badge-user { background: #6b7280; color: white; padding: 2px 8px; border-radius: 20px; font-size: 11px; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.modal-content { background: white; padding: 30px; border-radius: 10px; width: 400px; }
.modal-content input, .modal-content select { width: 100%; padding: 8px; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.role-admin { background: #0c343d; color: white; }
.role-globe { background: #3d85c6; color: white; }
.role-alevada { background: #38761d; color: white; }
.role-wellmix { background: #990000; color: white; }
.role-cnp { background: #f59e0b; color: white; }
.role-user { background: #6b7280; color: white; }
.file-link { color: #1a56db; text-decoration: none; }
.file-link:hover { text-decoration: underline; }

.history-btn,
.logout-btn {
    background: #284b73;
    color: white;
	height: 24px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.admin-btn {
	background: #284b73;
	color: white;
	width: 24px;
	height: 24px;
	padding: 5px;
	border-radius: 6px;
    font-size: 11px;
}

.history-btn:hover,
.admin-btn:hover,
.logout-btn:hover {
    background: #3d85c6;
}

/* TABS */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: -1px; /* Важно! Чтобы вкладки налезали на карточку */
    position: relative;
    z-index: 2;
}

.tab {
    width: 180px;
    padding: 10px 16px;
    background: #e5e7eb;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border: none;
}

/* Свечение сверху при наведении */
.tab:hover {
    background: #d1d5db;
    color: #1a56db;
    box-shadow: 0 -2px 8px rgba(26, 86, 219, 0.2);
}

.tab.active {
    background: white;
    color: #1a56db;
    box-shadow: none;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
	opacity: 40;
}

@keyframes slideGlow {
    0% {
        left: 10%;
        right: 90%;
        opacity: 0.5;
    }
    50% {
        left: 5%;
        right: 5%;
        opacity: 1;
    }
    100% {
        left: 90%;
        right: 10%;
        opacity: 0.5;
    }
}

/* Активная вкладка - сливается с карточкой */
.tab.active {
    background: white;
    color: #1a56db;
    position: relative;
    z-index: 3;
    /* Убираем свечение и тени */
    box-shadow: none;
    /* Нижняя граница перекрывается карточкой */
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

/* Убираем свечение при наведении на активную вкладку */
.tab.active:hover::before {
    display: none;
}

/* Карточка - поднимаем выше, чтобы перекрыть границу вкладки */
.card {
    background: white;
    border-radius: 0 10px 10px 10px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-top: none; /* Убираем верхнюю границу, так как она будет у вкладок */
    position: relative;
    z-index: 1;
    margin-top: 0;
}

/* Если у карточки есть верхняя граница - убираем */
.card {
    border-top: none;
}

/* Альтернативный вариант - более плавное слияние */
.tab.active {
    background: white;
    color: #1a56db;
    box-shadow: 0 1px 0 white, 0 -1px 0 #e5e7eb; /* Маскируем стык */
    position: relative;
    z-index: 3;
}

/* Чтобы активная вкладка визуально была частью карточки */
.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    z-index: 4;
}

/* Для мобильных устройств */
@media (max-width: 640px) {
    .tab {
        width: auto;
        flex: 1;
        font-size: 12px;
        padding: 10px 8px;
    }
}

/* CARD */
.card {
    background: white;
    border-radius: 0 10px 10px 10px;
    padding: 20px;
    border: 0px solid #e5e7eb;
}

/* SECTION */
.section-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
	font-size: 12px;
    font-weight: 600;
}

.sortable:hover {
    background-color: #e5e7eb;
}

.sort-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.3;
}

.sortable.asc .sort-icon::after {
    content: '▲';
    opacity: 1;
}

.sortable.desc .sort-icon::after {
    content: '▼';
    opacity: 1;
}

/* GRID */
.params-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 колонок */
    gap: 20px;
    margin-bottom: 30px;
}

/* Раскладка «фото продукции слева + параметры справа» (пропорция 3fr : 5×1fr) */
.params-with-photo {
    display: flex;
    gap: 20px;
    align-items: stretch;
}
.params-with-photo .product-photo {
    flex: 0 0 auto;
    width: 400px;
    height: 275px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;        /* обрезаем картинку по контуру блока */
    box-sizing: border-box;
}
@keyframes productPhotoIn {
    from { opacity: 0; transform: scale(1.08); }
    to   { opacity: 1; transform: scale(1.05); }
}
.params-with-photo .product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* заполняет блок целиком, лишнее обрезается */
    transform: scale(1.05);  /* «чуть больше блока» — крутить по вкусу */
    opacity: 0;              /* до загрузки скрыт; появление — анимацией */
}
/* Анимация появления — надёжно перезапускается при смене типа (в т.ч. из кэша),
   т.к. keyframes всегда играют с 0%, в отличие от transition. */
.params-with-photo .product-photo img.is-loaded {
    opacity: 1;
    animation: productPhotoIn 0.1s ease;
}
.params-with-photo .params-side {
    flex: 5;
    min-width: 0;
}
.params-with-photo .params-side .params-grid:last-child {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .params-with-photo { flex-direction: column; }
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

/* Если полей больше 5, они автоматически перейдут на следующую строку */

/* Для остальных элементов - новая строка */
.param:nth-child(n+6) {
    /* Автоматически будут в новой строке */
}

/* FORM */
.param label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.param select,
.param input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
}

/* Адаптив */
@media (max-width: 768px) {
    .params-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .accessories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .params-grid {
        grid-template-columns: 1fr;
    }

    .accessories-grid {
        grid-template-columns: 1fr;
    }
}

/* Hover эффект */
.param select:hover {
    border-color: #1a56db;
    background-color: #f9fafb;
}

/* Focus эффект */
.param select:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* Disabled состояние */
.param select:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Стиль для опций */
.param select option {
    padding: 12px;
    background: white;
    color: #374151;
}

/* Для Firefox */
.param select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #374151;
}

/* Анимация при фокусе */
.param select {
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

/* Стиль для обязательных полей */
.param select:required:invalid {
    color: #6b7280;
}

.param select option[value=""][disabled] {
    display: none;
}

/* RESULTS */
.results-header {
    margin-top: 20px;
}

.results-grid {
    margin-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.info-label {
    font-size: 12px;
	padding-left: 8px;
    color: #6b7280;
}

.info-value {
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

/* PRICE */
.info-value.price {
    font-weight: 700;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.block-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 2px solid #bcbcbc;
}

/* Стиль для ползунка наценки */
.markup-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.markup-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #e5e7eb 0%, #284b73 100%);
    border-radius: 3px;
    padding: 0;
    min-width: 0; /* Важно для правильного сужения */
}

.markup-control input[type="range"]:focus {
    outline: none;
}

.markup-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #284b73;
    border: 1px solid #f3f6f4;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.markup-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    border: 2px solid #284b73;
	background: #f3f6f4;
}

.markup-control input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
	border: 1px solid #284b73;
	background: #284b73;
}

.markup-value {
    min-width: 50px;
    font-weight: 600;
    padding: 7px 10px;
    font-size: 14px;
    text-align: center;
}

/* TOTAL BLOCK (делает акцент) */
#nsv_pump_station_title,
#nsp_pump_station_title,
#nsj_pump_station_title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* BUTTON CALCULATE */
/* Контейнер для кнопки и индикатора */
.button-container {
    position: relative;
    display: inline-block;
}

.calculate-btn {
    background: #284b73;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Фиксированный размер */
    width: 120px;
    height: 32px;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.calculate-btn:hover {
    background: #3d85c6;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(61, 133, 198, 0.35);
    letter-spacing: 0.3px;
}

.calculate-btn:active {
    transform: scale(0.95);
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Индикатор - наполовину наезжает на кнопку */
.calculate-btn .status-indicator {
    position: absolute;
    right: -6px;
    top: -6px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 10;
}

.calculate-btn .status-icon {
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.calculate-btn.loading .status-indicator {
    display: flex !important;
}

/* Спиннер */
.calculate-btn.loading .status-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23284b73' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'%3E%3C/path%3E%3C/svg%3E");
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== HISTORY ENTERPRISE ===== */

.history-item {
    border-bottom: 1px solid #E3E3E3;
    cursor: pointer;
    transition: background 0.15s ease;
}

.history-item:hover {
    background: #f9fafb;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
	font-size: 13px;
    font-weight: 400;
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.user-checkbox {
	left: 0;
    cursor: pointer;
}

#usersCheckboxList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#usersCheckboxList label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    padding: 4px 0;
}

#usersCheckboxList input[type="checkbox"] {
    margin: 0;
    margin-right: 10px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

#usersCheckboxList span {
    line-height: 1.0;
}

/* строка */
.history-row-with-user {
    display: grid;
    grid-template-columns: 210px 10px 110px 1fr 100px 100px 60px;
    align-items: center;
    /*gap: 20px;
    padding: 10px 5px;
    font-size: 13px;*/
}

.history-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

/* Для обычного пользователя - 6 колонок (без колонки пользователя) */
.history-row-without-user {
    display: grid;
    grid-template-columns: 10px 110px 1fr 100px 100px 60px;
    align-items: center;
    gap: 20px;
    padding: 10px 14px;
    font-size: 13px;
}

.history-rate:last-child {
    font-weight: 600;
	text-align: right;
}

.history-user {
    font-weight: 600;
    text-align: left;
    text-transform: none !important;
}

.history-expand div {
    display: flex;
}

.history-expand strong {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-radius: 6px;
	column-gap: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* тип */
.history-type {
    font-size: 12px;
	font-weight: 700;
    text-align: left;
    border-radius: 4px;
    padding: 2px 4px;
}

.type-nsv {
    font-weight: 600;    
    color: #2563eb;
}

.type-nsp {
    font-weight: 600;
    color: #ef4444;
}

.btn-filter {
	font-size: 11px;
	min-width: 60px;
	background: #284B73;
	color: white;
	padding: 5px 10px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
}

.btn-filter:hover {
	background: #3d85c6;
}

.btn-freset {
	font-size: 11px;
	min-width: 60px;
	background: #38761d;
	color: white;
	padding: 5px 10px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
}

.btn-freset:hover {
	background: #6aa84f;
}

/* дата */
.history-date {
    font-size: 12px;
    font-weight: 600;
}

/* название */
.history-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

/* QH */
.history-qh, .history-power {
    font-size: 12px;
    font-weight: 600;
}

/* цена */
.history-price {
    font-size: 12px;
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

/* раскрытие */
.history-expand {
    display: none;
    padding: 12px 14px;
    background: #f3f4f6;
    font-size: 12px;
    color: #374151;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* активное состояние */
.history-item.expanded .history-expand {
    display: grid;
}

/* эффект при раскрытии */
.history-item.expanded {
    background: #f3f4f6;
}

/* Стили для курсов */
.history-rates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
}

.history-rates-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.history-rates-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.history-rates strong {
    display: inline-block;
    color: #374151;
    font-weight: 600;
}

.history-rate {
    font-weight: 400 !important;
	background: white;
    padding: 2px 8px;
    border-radius: 15px;
    font-size: 11px;
    color: #374151;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    white-space: nowrap;
}

/* Выделяем наценку другим цветом и стилем */
.markup-rate {
    font-size: 12px;
    padding: 3px 12px;
	font-weight: 400 !important;
}

.history-expand {
    display: none;
    padding: 12px 14px;
    background: #f3f4f6;
    font-size: 12px;
    color: #374151;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Чтобы курсы занимали всю ширину */
.history-expand .history-rates {
    grid-column: 1 / -1;
    width: 100%;
}

/* STATUS */
.status {
    font-size: 16px;
}

/* MODAL */
.modal {
    background: rgba(0,0,0,0.35);
}

.modal-content {
    background: white;
    border-radius: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .params-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-indicator.loading .status-icon {
    animation: spin 1s linear infinite;
}

.footer {
	padding: 16px 24px;
	border-top: 1px solid #ddd;
	opacity: 0.2;
	background: white;
}

.footer-content {
	max-width: 1500px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
	color: black;
}

.footer-left, .footer-right {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.footer-separator {
	color: #ccc;
}

.footer a {
	color: #007bff;
	text-decoration: none;
}

.footer a:hover {
	text-decoration: underline;
}


/* ===================== SIDEBAR ===================== */
:root {
    --sidebar-collapsed: 48px;
    --sidebar-expanded: 224px;
    --sidebar-transition: 0.22s cubic-bezier(.4,0,.2,1);
}

/* app-layout — flex-строка для sidebar + контент */
.app-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    flex-shrink: 0;
    width: var(--sidebar-collapsed);
    height: 100vh;              /* всегда высотой экрана */
    position: sticky;          /* липнет к верху при прокрутке длинной страницы */
    top: 0;
    align-self: flex-start;    /* не растягиваться по высоте контента страницы */
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    z-index: 100;
    overflow-x: hidden;        /* свёрнутый вид — без горизонтальной прокрутки */
    overflow-y: auto;          /* если контент выше экрана — прокрутка внутри, «Выйти» не теряется */
    transition: width var(--sidebar-transition), box-shadow var(--sidebar-transition);
    display: flex;
    flex-direction: column;
    box-shadow: 1px 0 4px rgba(0,0,0,0.06);
}

.sidebar:hover,
.sidebar.pinned,
html.sb-pinned .sidebar {
    width: var(--sidebar-expanded);
    box-shadow: 2px 0 12px rgba(0,0,0,0.10);
}

/* Основной контент занимает оставшееся место */
.main-wrap {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* container теперь 100% доступной ширины */
.main-wrap .container {
    width: 100%;
    max-width: 100%;
}

/* Кнопка-сэндвич */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-collapsed);
    height: var(--sidebar-collapsed);
    min-height: var(--sidebar-collapsed);
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--sidebar-transition);
}

.sidebar-toggle:hover {
    background: #f3f4f6;
}

.sidebar-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.sidebar-toggle-icon span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #284b73;
    transition: transform var(--sidebar-transition), opacity var(--sidebar-transition);
}

.sidebar.pinned .sidebar-toggle-icon span:nth-child(1),
html.sb-pinned .sidebar .sidebar-toggle-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sidebar.pinned .sidebar-toggle-icon span:nth-child(2),
html.sb-pinned .sidebar .sidebar-toggle-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.sidebar.pinned .sidebar-toggle-icon span:nth-child(3),
html.sb-pinned .sidebar .sidebar-toggle-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Заголовок секции */
.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 10px 0 4px 14px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--sidebar-transition);
}

.sidebar:hover .sidebar-section-title,
.sidebar.pinned .sidebar-section-title,
html.sb-pinned .sidebar .sidebar-section-title {
    opacity: 1;
}

/* Строка курса */
.sidebar-rate {
    display: flex;
    align-items: center;
    height: 40px;
    cursor: default;
    transition: background var(--sidebar-transition);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-rate:hover {
    background: #f3f4f6;
}

.sidebar-rate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    height: 40px;
    flex-shrink: 0;
}

.sidebar-rate-icon img {
    height: 20px;
    width: auto;
    object-fit: contain;
}

.sidebar-rate-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
    flex: 1;
    min-width: 0;
    padding-right: 14px;
    white-space: nowrap;
}

.sidebar:hover .sidebar-rate-info,
.sidebar.pinned .sidebar-rate-info,
html.sb-pinned .sidebar .sidebar-rate-info {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-rate-name {
    font-size: 11px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.sidebar-rate-value {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 44px;
    flex-shrink: 0;
}

/* Навигационный пункт (Управление и др.) */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    transition: background var(--sidebar-transition);
    flex-shrink: 0;
}

.sidebar-nav-item:hover {
    background: #f0f4fa;
}

.sidebar-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    color: #284b73;
    flex-shrink: 0;
}

.sidebar-nav-label {
    font-size: 13px;
    font-weight: 500;
    color: #284b73;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
    white-space: nowrap;
}

.sidebar:hover .sidebar-nav-label,
.sidebar.pinned .sidebar-nav-label,
html.sb-pinned .sidebar .sidebar-nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* Тонкий разделитель между курсами */
.sidebar-rate-sep {
    height: 1px;
    background: #f0f1f3;
    margin: 0 8px;
}

/* Разделитель-полоска (широкий) */
.sidebar-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* Блок пользователя вверху */
.sidebar-user {
    display: flex;
    align-items: center;
    padding: 6px 0;
    min-height: 44px;
    flex-shrink: 0;
}

.sidebar-user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    color: #284b73;
    flex-shrink: 0;
}

.sidebar-user-info {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar:hover .sidebar-user-info,
.sidebar.pinned .sidebar-user-info,
html.sb-pinned .sidebar .sidebar-user-info {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

/* Кнопка выйти внизу */
.sidebar-bottom {
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    min-height: 44px;
    transition: background var(--sidebar-transition);
    text-align: left;
}

.sidebar-logout:hover {
    background: #fff0f0;
}

.sidebar-logout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
    color: #dc2626;
    flex-shrink: 0;
}

.sidebar-logout-label {
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
    white-space: nowrap;
}

.sidebar:hover .sidebar-logout-label,
.sidebar.pinned .sidebar-logout-label,
html.sb-pinned .sidebar .sidebar-logout-label {
    opacity: 1;
    transform: translateX(0);
}
