/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background-color: #0753A6;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Меню для админа */
.admin-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-menu-item {
    background-color: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-menu-item:hover {
    background-color: rgba(255,255,255,0.2);
}

.logout-btn {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.logout-btn:hover {
    background-color: white;
    color: #0753A6;
}

/* Кнопки авторизации */
.auth-buttons {
    display: flex;
    gap: 1rem;
}

.login-btn, .register-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover, .register-btn:hover {
    background-color: white;
    color: #0753A6;
}

/* Герой-баннер */
.hero {
    background: linear-gradient(135deg, #0753A6 0%, #99CAFA 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: white;
    color: #0753A6;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Основной контент */
.main {
    padding: 3rem 0;
}

.layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

/* Приветствие пользователя */
.user-welcome {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #99CAFA 0%, #0753A6 100%);
    color: white;
    border-radius: 8px;
}

.user-welcome h2 {
    margin-bottom: 0.5rem;
}

/* Быстрые действия */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
}

.action-card:hover {
    border-color: #0753A6;
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    color: #0753A6;
    margin-bottom: 0.5rem;
}

.action-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Карточки контента */
.content-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.content-card h3 {
    color: #0753A6;
    margin-bottom: 1rem;
    border-bottom: 2px solid #99CAFA;
    padding-bottom: 0.5rem;
}

/* История начислений */
.history-list {
    margin-bottom: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-info h4 {
    margin-bottom: 0.3rem;
    color: #333;
}

.history-date {
    color: #666;
    font-size: 0.8rem;
}

.points-badge {
    background-color: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
}

/* Рейтинг */
.rating-list {
    margin-bottom: 1rem;
}

.rating-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.rating-item.current-user {
    background-color: #f8f9fa;
    margin: 0 -1rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
}

.rating-position {
    width: 30px;
    text-align: center;
    margin-right: 1rem;
}

.medal {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    line-height: 25px;
    text-align: center;
    font-size: 0.8rem;
}

.medal-1 { background-color: #ffc107; }
.medal-2 { background-color: #6c757d; }
.medal-3 { background-color: #cd7f32; }

.position {
    color: #666;
    font-weight: bold;
}

.rating-user {
    flex-grow: 1;
}

.you-badge {
    background-color: #17a2b8;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.rating-points {
    font-weight: bold;
    color: #0753A6;
}

/* Боковая панель */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quick-links,
.calendar {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #99CAFA;
}

.quick-links h3,
.calendar h3 {
    color: #0753A6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.quick-link {
    display: block;
    padding: 0.8rem 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: color 0.3s;
}

.quick-link:hover {
    color: #0753A6;
}

.quick-link:last-child {
    border-bottom: none;
}

/* Календарь событий */
.event {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
}

.event:last-child {
    border-bottom: none;
}

.event-date {
    background-color: #99CAFA;
    color: #0753A6;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.event-title {
    font-weight: bold;
    margin-bottom: 0.2rem;
}

.event-time {
    font-size: 0.9rem;
    color: #666;
}

/* Новости */
.content h2 {
    color: #0753A6;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.news-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #0753A6;
}

.news-date {
    color: #99CAFA;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.news-title {
    color: #0753A6;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.read-more {
    color: #0753A6;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Подвал */
.footer {
    background-color: #0753A6;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #99CAFA;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #99CAFA;
    color: #0753A6;
}

.footer-bottom {
    border-top: 1px solid #99CAFA;
    padding-top: 1rem;
    text-align: center;
    color: #99CAFA;
}


.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #0753A6;
}

/* Формы */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0753A6;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #99CAFA;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0753A6;
}

.modal-switch {
    text-align: center;
    margin-top: 1rem;
}

.modal-switch a {
    color: #0753A6;
    text-decoration: none;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* Сообщения */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

/* Кнопка outline */
.btn-outline {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #0753A6;
    color: #0753A6;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: #0753A6;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state p {
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
    }
    
    .user-badges {
        justify-content: center;
    }
    
    .admin-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-menu-item {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Стили для административных таблиц */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: #2c3e50;
    color: white;
}

.admin-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #34495e;
}

.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Кнопки действий */
.btn-action {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-admin {
    background: #3498db;
    color: white;
}

.btn-remove-admin {
    background: #e74c3c;
    color: white;
}

.btn-delete {
    background: #c0392b;
    color: white;
}

.btn-save {
    background: #27ae60;
    color: white;
}

.btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 4px;
    }
    
    .btn-action {
        padding: 4px 8px;
        font-size: 11px;
        margin: 1px;
    }
}

/* Статусы */
.status-admin {
    color: #e74c3c;
    font-weight: bold;
}

.status-user {
    color: #27ae60;
}

.status-active {
    color: #2ecc71;
}

/* Поиск и фильтры */
.admin-search {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    width: 300px;
    margin-bottom: 20px;
}

.admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    margin-top: 5px;
}

/* Дополнительные стили для админ-панели */
.user-welcome {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #99CAFA 0%, #0753A6 100%);
    color: white;
    border-radius: 8px;
}

.user-welcome h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.user-welcome p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0753A6;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

/* Стили для таблиц в update.php */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.users-table th {
    background-color: #0753A6;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.users-table input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.users-table input:focus {
    outline: none;
    border-color: #0753A6;
    box-shadow: 0 0 0 2px rgba(7, 83, 166, 0.2);
}

/* Стили для actions.php */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-left: 4px solid #0753A6;
}

.filter-buttons {
    margin-bottom: 1.5rem;
}

.filter-btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-stats,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Дополнительные стили для новых страниц */

/* Стили для таблиц */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.users-table th {
    background-color: #0753A6;
    color: white;
    font-weight: bold;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.users-table tr.current-user {
    background-color: #e3f2fd;
    font-weight: bold;
}

/* Бейдж "Вы" */
.you-badge {
    background-color: #17a2b8;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

/* Адаптивность для таблиц */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
}

/* Стили для истории начислений */
.history-list {
    margin-bottom: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-info h4 {
    margin-bottom: 0.3rem;
    color: #333;
}

.history-date {
    color: #666;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.2rem;
}

.points-badge {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Текст по центру */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.text-muted {
    color: #666 !important;
}

/* Стили для рейтинга - компактное отображение */
.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.you-badge {
    background-color: #17a2b8;
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1;
}

/* Улучшенные стили для таблицы рейтинга */
.users-table tr.current-user {
    background-color: #e3f2fd;
    font-weight: bold;
}

/* Адаптивность для таблиц */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
    
    .user-name-wrapper {
        gap: 0.25rem;
    }
    
    .you-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
}

/* Кнопки авторизации - обновленный дизайн */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.login-btn, .register-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    font-size: 0.9rem;
}

.login-btn {
    background-color: #0753A6; /* Темно-синий фон */
    color: white;
    border-color: #0753A6;
}

.login-btn:hover {
    background-color: #06428a;
    border-color: #06428a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 83, 166, 0.4);
}

.register-btn {
    background-color: white; /* Белый фон */
    color: #0753A6; /* Темно-синий текст */
    border-color: white;
}

.register-btn:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Кнопки в герое-баннере */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-register {
    background-color: white;
    color: #0753A6;
    border: 2px solid white;
}

.btn-register:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

/* Кнопки в модальных окнах с темно-синим контуром */
.modal-content .btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem;
    font-size: 1rem;
    background-color: white;
    color: #0753A6;
    border: 2px solid #0753A6; /* Темно-синий контур */
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal-content .btn:hover {
    background-color: #0753A6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 83, 166, 0.3);
}

/* Улучшенные стили для модальных окон */
.modal-content h2 {
    color: #0753A6;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Специфические стили для формы регистрации */
#registerForm .form-group {
    margin-bottom: 1.2rem;
}

#registerForm label {
    color: #0753A6;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: block;
}

#registerForm input {
    border: 2px solid #99CAFA;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#registerForm input:focus {
    border-color: #0753A6;
    box-shadow: 0 0 0 3px rgba(7, 83, 166, 0.1);
    outline: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .login-btn, .register-btn {
        width: 100%;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
    }
}

/* Стили для таблицы последних начислений на главной */
.content h2 {
    color: #0753A6;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #99CAFA;
    padding-bottom: 0.5rem;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.users-table th {
    background-color: #0753A6;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.users-table tr:last-child td {
    border-bottom: none;
}

/* Удлиненный блок быстрых ссылок */
.quick-links {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #99CAFA;
    margin-bottom: 0; /* Убираем отступ снизу */
}

.quick-links h3 {
    color: #0753A6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.quick-link {
    display: block;
    padding: 0.8rem 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.quick-link:hover {
    color: #0753A6;
    background-color: rgba(7, 83, 166, 0.05);
    padding-left: 0.5rem;
}

.quick-link:last-child {
    border-bottom: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
    
    .quick-links {
        padding: 1rem;
    }
    
    .quick-link {
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }
}

/* Стили для страницы руководства */

/* Основная навигация */
.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid white;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background-color: white;
    color: #0753A6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Сетка руководителей */
.leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.leader-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.leader-photo {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.leader-card:hover .leader-photo img {
    transform: scale(1.05);
}

.leader-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.leader-badge.chairman {
    background: linear-gradient(135deg, #ffc107, #ff8c00);
}

.leader-badge.vice-chairman {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.leader-badge.committee {
    background: linear-gradient(135deg, #0753A6, #99CAFA);
}

.leader-info {
    padding: 1.5rem;
}

.leader-name {
    color: #0753A6;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.leader-position {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.leader-contacts {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 20px;
    text-align: center;
}

.leader-bio {
    color: #555;
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        width: 140px;
    }
    
    .leaders-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .leader-photo {
        height: 200px;
    }
    
    .leader-info {
        padding: 1rem;
    }
    
    .leader-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .leaders-grid {
        grid-template-columns: 1fr;
    }
    
    .leader-card {
        margin: 0 0.5rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Стили для страницы плана работы */

/* Фильтры */
.filter-section {
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #0753A6;
    background: white;
    color: #0753A6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #0753A6;
    color: white;
}

/* Таблица плана */
.plan-table td {
    vertical-align: top;
    padding: 1rem 0.8rem;
}

.event-action {
    min-width: 200px;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.status-badge.completed {
    background: #6c757d;
    color: white;
}

.status-badge.upcoming {
    background: #28a745;
    color: white;
}

.event-date {
    min-width: 120px;
    position: relative;
}

.days-left {
    margin-top: 0.3rem;
}

.today-badge,
.tomorrow-badge,
.soon-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
}

.today-badge {
    background: #dc3545;
    color: white;
}

.tomorrow-badge {
    background: #fd7e14;
    color: white;
}

.soon-badge {
    background: #ffc107;
    color: black;
}

.event-directions {
    min-width: 150px;
}

.direction-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin: 0.1rem;
    color: white;
    font-weight: bold;
}

.culture-badge {
    background: linear-gradient(135deg, #e83e8c, #6f42c1);
}

.sports-badge {
    background: linear-gradient(135deg, #20c997, #198754);
}

.education-badge {
    background: linear-gradient(135deg, #0dcaf0, #0d6efd);
}

.media-badge {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.all-badge {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.event-responsible {
    min-width: 120px;
}

/* Состояния мероприятий */
.past-event {
    opacity: 0.7;
}

.past-event td {
    color: #6c757d;
}

.future-event {
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .plan-table {
        font-size: 0.8rem;
    }
    
    .direction-badge {
        display: block;
        margin: 0.2rem 0;
        text-align: center;
    }
    
    .event-date,
    .event-directions,
    .event-responsible {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .plan-table {
        font-size: 0.7rem;
    }
    
    .status-badge,
    .today-badge,
    .tomorrow-badge,
    .soon-badge,
    .direction-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }
}

/* Стили для страницы правил и положений */

/* Секции правил */
.rules-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.rules-section:last-child {
    border-bottom: none;
}

.rules-section h4 {
    color: #0753A6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.rule-item.penalty {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.rule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rule-points {
    background: #0753A6;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    min-width: 80px;
    text-align: center;
}

.rule-item.penalty .rule-points {
    background: #dc3545;
}

.rule-description {
    flex-grow: 1;
    margin-left: 1rem;
    font-size: 0.95rem;
}

/* Важные заметки */
.important-note {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-top: 1.5rem;
}

.important-note h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.important-note ul {
    margin: 0;
    padding-left: 1.2rem;
}

.important-note li {
    margin-bottom: 0.5rem;
    color: #856404;
}

.important-note li:last-child {
    margin-bottom: 0;
}

/* Секция документа */
.document-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.document-info h4 {
    color: #0753A6;
    margin-bottom: 1rem;
}

.document-details {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.detail-item {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.document-download {
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    font-weight: bold;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.download-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* PDF просмотр */
.pdf-preview {
    margin-top: 2rem;
}

.pdf-preview h4 {
    color: #0753A6;
    margin-bottom: 1rem;
}

.pdf-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Контактная информация */
.contact-info {
    text-align: center;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 300px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .document-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .document-details {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .rule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .rule-points {
        align-self: flex-start;
    }
    
    .rule-description {
        margin-left: 0;
    }
    
    .contact-methods {
        align-items: stretch;
    }
    
    .contact-method {
        min-width: auto;
    }
    
    .pdf-container iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .rules-list {
        gap: 0.5rem;
    }
    
    .rule-item {
        padding: 0.6rem 0.8rem;
    }
    
    .pdf-container iframe {
        height: 300px;
    }
    
    .download-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Стили для профиля */
.profile-header {
    margin-bottom: 30px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    margin-top: 5px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.detail-item label {
    font-weight: bold;
    color: #7f8c8d;
}

.status-badge {
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* Блоки информации */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Быстрые ссылки в сайдбаре */
.profile-quick-link {
    background-color: #e8f4fd !important;
    border-left: 3px solid #3498db !important;
}

/* Разделитель в выпадающем меню */
.dropdown-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 5px 0;
}

.admin-link {
    background-color: #fff8e1 !important;
    color: #f57c00 !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .user-panel {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
}

/* Компактная навигация пользователя */
.user-nav-container {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2c3e50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-dropbtn:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.user-avatar {
    font-size: 16px;
}

.user-name-short {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 280px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
}

.user-dropdown:hover .user-dropdown-content {
    display: block;
}

/* Карточка информации о пользователе */
.user-info-card {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-main-info {
    font-size: 16px;
    margin-bottom: 12px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.detail-label {
    opacity: 0.9;
}

.detail-value {
    font-weight: 600;
}

.role-3 { color: #ffeb3b; }
.role-1 { color: #4caf50; }
.role-0 { color: #bdc3c7; }

/* Ссылки в выпадающем меню */
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-link:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 5px 0;
}

/* Секция админа */
.admin-section {
    padding: 0 5px;
}

.admin-label {
    display: block;
    padding: 8px 15px;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-link {
    color: #e74c3c;
    font-weight: 500;
}

.admin-link:hover {
    color: #c0392b;
    background: #ffeaea;
}

.logout-link {
    color: #e74c3c;
    font-weight: 500;
}

.logout-link:hover {
    color: #c0392b;
    background: #ffeaea;
}

/* Адаптивность */
@media (max-width: 768px) {
    .user-dropdown-content {
        right: -50px;
        min-width: 250px;
    }
    
    .user-name-short {
        display: none;
    }
    
    .user-dropbtn {
        padding: 8px 12px;
    }
}

/* ОБНОВЛЕННАЯ ШАПКА С ГРАДИЕНТОМ КАК В HERO */

/* Компактная навигация пользователя */
.user-nav-container {
    display: flex;
    align-items: center;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

/* Новая кнопка с градиентом как в hero */
.user-dropbtn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0753A6 0%, #99CAFA 100%); /* Градиент как в hero */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 83, 166, 0.3);
}

.user-dropbtn-new:hover {
    background: linear-gradient(135deg, #06428a 0%, #7bb4f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 83, 166, 0.4);
}

.user-avatar {
    font-size: 16px;
}

.user-name-short {
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Новое выпадающее меню с улучшенным дизайном */
.user-dropdown-content-new {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 12px;
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.user-dropdown:hover .user-dropdown-content-new {
    display: block;
}

/* Новая карточка информации о пользователе с градиентом */
.user-info-card-new {
    padding: 20px;
    background: linear-gradient(135deg, #0753A6 0%, #99CAFA 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.user-info-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}

.user-main-info {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.detail-label {
    opacity: 0.9;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
}

.role-3 { 
    color: #ffeb3b; 
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.role-1 { 
    color: #4caf50; 
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.role-0 { 
    color: #e3f2fd; 
    font-weight: 500;
}

/* Ссылки в новом выпадающем меню */
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
    position: relative;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #0753A6;
    padding-left: 25px;
    border-left-color: #0753A6;
}

.dropdown-link.active {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0753A6;
    border-left-color: #0753A6;
    font-weight: 600;
}

.dropdown-link.active::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #0753A6;
    font-weight: bold;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ecf0f1 50%, transparent 100%);
    margin: 8px 0;
}

/* Секция админа с выделением */
.admin-section {
    padding: 0 5px;
}

.admin-label {
    display: block;
    padding: 10px 15px 5px;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: #f8f9fa;
}

.admin-link {
    color: #e74c3c;
    font-weight: 500;
}

.admin-link:hover {
    color: #c0392b;
    background: linear-gradient(135deg, #ffeaea 0%, #ffd1d1 100%);
}

.logout-link {
    color: #e74c3c;
    font-weight: 600;
    border-top: 1px solid #f8f9fa;
}

.logout-link:hover {
    color: #c0392b;
    background: linear-gradient(135deg, #ffeaea 0%, #ffd1d1 100%);
}

/* Анимация появления меню */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-content-new {
    animation: slideDown 0.3s ease;
}

/* Адаптивность для новой шапки */
@media (max-width: 768px) {
    .user-dropdown-content-new {
        right: -20px;
        min-width: 280px;
    }
    
    .user-name-short {
        display: none;
    }
    
    .user-dropbtn-new {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .user-dropdown-content-new {
        min-width: 260px;
    }
    
    .dropdown-link {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .user-dropdown-content-new {
        right: -10px;
        min-width: 240px;
    }
    
    .user-dropbtn-new {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .user-avatar {
        font-size: 14px;
    }
    
    .user-info-card-new {
        padding: 15px;
    }
    
    .user-main-info {
        font-size: 14px;
    }
    
    .user-detail {
        font-size: 12px;
    }
}

/* ОБНОВЛЕННАЯ КНОПКА СВЕТЛО-СИНЯЯ КВАДРАТНАЯ */

/* Новая кнопка со светло-синим фоном и квадратной формой */
.user-dropbtn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #99CAFA; /* Светло-синий цвет - самый светлый тон градиента */
    color: #0753A6; /* Темно-синий текст для контраста */
    padding: 10px 16px;
    border: 2px solid #99CAFA;
    border-radius: 8px; /* Более квадратные углы вместо 25px */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(153, 202, 250, 0.4);
}

.user-dropbtn-new:hover {
    background: #7bb4f0; /* Немного темнее при наведении */
    border-color: #7bb4f0;
    color: #06428a; /* Темнее текст при наведении */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(153, 202, 250, 0.6);
}

.user-dropbtn-new:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(153, 202, 250, 0.4);
}

.user-avatar {
    font-size: 16px;
    color: #0753A6; /* Темно-синий цвет иконки */
}

.user-name-short {
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 12px;
    color: #0753A6; /* Темно-синий цвет стрелки */
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Обновляем выпадающее меню для согласованности */
.user-dropdown-content-new {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 320px;
    box-shadow: 0 8px 25px rgba(7, 83, 166, 0.15);
    border-radius: 8px; /* Согласуем с кнопкой */
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.user-dropdown:hover .user-dropdown-content-new {
    display: block;
}

/* Карточка информации о пользователе оставляем с градиентом для контраста */
.user-info-card-new {
    padding: 20px;
    background: linear-gradient(135deg, #0753A6 0%, #99CAFA 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.user-info-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}

.user-main-info {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.detail-label {
    opacity: 0.9;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
}

.role-3 { 
    color: #ffeb3b; 
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.role-1 { 
    color: #4caf50; 
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.role-0 { 
    color: #e3f2fd; 
    font-weight: 500;
}

/* Ссылки в выпадающем меню */
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
    position: relative;
}

.dropdown-link:hover {
    background: #f8f9fa;
    color: #0753A6;
    padding-left: 25px;
    border-left-color: #99CAFA; /* Светло-синий акцент */
}

.dropdown-link.active {
    background: #e3f2fd; /* Светло-голубой фон для активного пункта */
    color: #0753A6;
    border-left-color: #0753A6;
    font-weight: 600;
}

.dropdown-link.active::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #0753A6;
    font-weight: bold;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #ecf0f1 50%, transparent 100%);
    margin: 8px 0;
}

/* Секция админа */
.admin-section {
    padding: 0 5px;
}

.admin-label {
    display: block;
    padding: 10px 15px 5px;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: #f8f9fa;
}

.admin-link {
    color: #e74c3c;
    font-weight: 500;
}

.admin-link:hover {
    color: #c0392b;
    background: #ffeaea;
}

.logout-link {
    color: #e74c3c;
    font-weight: 600;
    border-top: 1px solid #f8f9fa;
}

.logout-link:hover {
    color: #c0392b;
    background: #ffeaea;
}

/* Анимация появления меню */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-content-new {
    animation: slideDown 0.3s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .user-dropdown-content-new {
        right: -20px;
        min-width: 280px;
    }
    
    .user-name-short {
        display: none;
    }
    
    .user-dropbtn-new {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .user-dropdown-content-new {
        min-width: 260px;
        border-radius: 6px;
    }
    
    .dropdown-link {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .user-dropdown-content-new {
        right: -10px;
        min-width: 240px;
    }
    
    .user-dropbtn-new {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 5px;
    }
    
    .user-avatar {
        font-size: 14px;
    }
    
    .user-info-card-new {
        padding: 15px;
    }
    
    .user-main-info {
        font-size: 14px;
    }
    
    .user-detail {
        font-size: 12px;
    }
    
    .user-dropdown-content-new {
        border-radius: 5px;
    }
}

/* Решение с минимальным расстоянием и задержкой */
.user-dropdown-content-new {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 320px;
    box-shadow: 0 8px 25px rgba(7, 83, 166, 0.15);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 2px; /* Минимальное расстояние */
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.user-dropdown:hover .user-dropdown-content-new {
    display: block;
}

/* Добавляем задержку закрытия через JavaScript-эмуляцию */
.user-dropdown {
    position: relative;
}

.user-dropdown-content-new {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.user-dropdown:hover .user-dropdown-content-new {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow: visible;
    }
    
    /* ШАПКА ДЛЯ МОБИЛЬНЫХ - ИСПРАВЛЕНА */
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
        flex-wrap: nowrap;
        position: relative;
        z-index: 1000;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo img {
        height: 32px;
    }
    
    .logo span {
        display: none;
    }
    
    /* КНОПКА МЕНЮ - ИСПРАВЛЕНА */
    .user-dropbtn-new {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
        min-width: auto;
        cursor: pointer;
        z-index: 1001;
    }
    
    .user-name-short {
        display: none;
    }
    
    .user-avatar {
        font-size: 14px;
        margin-right: 0;
    }
    
    /* ВЫПАДАЮЩЕЕ МЕНЮ - ПОЛНОСТЬЮ ПЕРЕДЕЛАНО */
    .user-dropdown-content-new {
        display: none;
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        min-width: auto;
        max-width: calc(100vw - 20px);
        margin: 0;
        border-radius: 12px;
        z-index: 10000;
        background: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-dropdown.active .user-dropdown-content-new {
        display: block;
    }
    
    .user-dropdown-content-new::before {
        display: none;
    }
    
    /* ГЛАВНЫЙ КОНТЕНТ - ИСПРАВЛЕН СКРОЛЛ */
    .main {
        padding: 1.5rem 0;
        position: relative;
        z-index: 1;
        overflow: visible;
    }
    
    .layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        overflow: visible;
    }
    
    /* БОКОВАЯ ПАНЕЛЬ */
    .sidebar {
        order: 2;
    }
    
    .quick-links {
        padding: 1rem;
    }
    
    .quick-link {
        padding: 0.7rem 0;
        font-size: 0.9rem;
        display: block;
        cursor: pointer;
    }
    
    /* ТАБЛИЦЫ - ИСПРАВЛЕН СКРОЛЛ */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
        width: calc(100% + 30px);
        position: relative;
    }
    
    .users-table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.6rem 0.4rem;
        white-space: nowrap;
    }
    
    /* КАРТОЧКИ */
    .content-card {
        padding: 1rem;
        margin-bottom: 1rem;
        position: relative;
        overflow: visible;
    }
    
    /* ССЫЛКИ И КНОПКИ - УВЕЛИЧИМ РАЗМЕР ДЛЯ КАСАНИЯ */
    .action-card, 
    .btn, 
    .btn-outline, 
    .quick-link,
    .dropdown-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .action-card {
        padding: 1.2rem;
        text-align: center;
    }
    
    /* ПРОФИЛЬ */
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    /* ИСТОРИЯ НАЧИСЛЕНИЙ */
    .history-item {
        padding: 0.8rem 0;
        min-height: auto;
    }
    
    /* МОДАЛЬНЫЕ ОКНА */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: none;
        padding: 1.5rem;
        position: relative;
        z-index: 10002;
    }
    
    .modal {
        position: fixed;
        z-index: 10001;
        -webkit-overflow-scrolling: touch;
    }
    
    /* ФИКС ДЛЯ IOS */
    .main .container {
        transform: translateZ(0);
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header .container {
        padding: 8px 10px;
    }
    
    .user-dropbtn-new {
        padding: 10px 12px; /* Увеличиваем для лучшего касания */
    }
    
    .action-card,
    .quick-link {
        padding: 1rem 0.8rem;
    }
    
    /* УВЕЛИЧИВАЕМ РАЗМЕРЫ ВСЕХ КЛИКАБЕЛЬНЫХ ЭЛЕМЕНТОВ */
    a, button, .btn, .action-card, .quick-link {
        min-height: 44px;
        font-size: 16px; /* Предотвращает zoom в iOS */
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Предотвращает zoom в iOS */
    }
}

/* КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ ВСЕХ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    /* РАЗРЕШАЕМ СКРОЛЛ */
    body, html {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* УБИРАЕМ ВСЕ ПРЕПЯТСТВИЯ ДЛЯ СКРОЛЛА */
    .header, .main, .footer {
        position: relative;
        overflow: visible;
    }
    
    /* УВЕЛИЧИВАЕМ КЛИКАБЕЛЬНЫЕ ОБЛАСТИ */
    .auth-buttons .register-btn,
    .auth-buttons .login-btn {
        min-height: 44px;
        min-width: 80px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* ИСПРАВЛЯЕМ ВЫПАДАЮЩЕЕ МЕНЮ */
    .user-dropdown {
        position: static; /* Меняем на static для мобильных */
    }
    
    .user-dropdown-content-new {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
    }
}

/* ФИКС ДЛЯ IOS SAFARI */
@supports (-webkit-touch-callout: none) {
    .main {
        -webkit-overflow-scrolling: touch;
    }
    
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
}
