/* МОЙ ЦЭЛТ v2.2.0 - Профессиональный CSS */

:root {
    --primary: #0e2f76;
    --primary-light: #1e4fa3;
    --primary-dark: #0a1f4d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-400: #ced4da;
    --gray-600: #6c757d;
    --gray-800: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
}

.profile-info{
    padding: 3px;
}
.profile-info p{
    margin: 5px;
}

/* HOME PAGE */
.showAllArticles{
margin-top: 10px;
}

.home-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.home-container #logoCanvas {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.1;
    z-index: 1;
}

.logo-text {
    text-align: center;
    color: white;
    z-index: 10;
    position: relative;
}

.logo-text h1 {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-in-out;
    letter-spacing: 3px;
}

.logo-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LOGIN СТРАНИЦА - КРИТИЧЕСКИЙ Z-INDEX */
.login-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    z-index: 9999 !important;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
    z-index: 10000;
    position: relative;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: bold;
}

.login-box > p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ФОРМЫ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-400);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 47, 118, 0.1);
}

/* КНОПКИ */
.btn-text {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: #0a1f4d;
}
.btn-text:hover{
color: #274891;
}


.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 47, 118, 0.3);
}

.btn-block {
    width: 100%;
}

/* NAVBAR */
.navbar {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* КОНТЕНТ */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.item:last-child {
    border-bottom: none;
}

.item h4 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* ALERT */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

/* ТЕКСТ */
.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }

footer {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 2rem;
}


/* Статьи, новости, обучение */
.articles-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ЗАГОЛОВОК СТРАНИЦЫ */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0066cc;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #0e2f76;
    margin: 0 0 10px 0;
}

.page-description {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* ============ ПОИСК ============ */
.search-section {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-wrapper {
    flex: 1;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-btn {
    padding: 10px 20px;
    background: #0e2f76;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #0052a3;
}

.reservation-container {
    text-align: right;
}

.reservation-container a{
    text-decoration: none;  
    padding: 10px 20px;
    background: #0e2f76;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.reservation-container a:hover{
    background: #0052a3;
}


/* Предложения при поиске */
.search-suggestions {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item strong {
    color: #0066cc;
}

/* Информация о поиске */
.search-info {
    background: #cfe9f3;
    padding: 15px;
    border-radius: 5px;
    color: #0c5460;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-count {
    font-weight: bold;
    font-size: 1.2rem;
}


/* Бейджи статуса */
.badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-visible {
    background: #d4edda;
    color: #155724;
}

.badge-hidden {
    background: #f8d7da;
    color: #721c24;
}

/* Содержимое карточки */
.card-content {
    padding: 15px;
    flex: 1;
}

.card-preview {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 120px;
    overflow: hidden;
}

/* Футер карточки */
.card-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-meta {
    display: flex;
    gap: 15px;
    flex: 1;
}

.meta-date,
.meta-views {
    font-size: 0.85rem;
    color: #999;
}

.card-actions {
    display: flex;
    gap: 5px;
}

/* Кнопки */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #ffb300;
}

/* ============ ПАГИНАЦИЯ ============ */
.pagination-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.pagination-controls {
    margin-bottom: 20px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #0066cc;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: #f5f5f5;
    border-color: #0066cc;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    box-shadow: 0 2px 5px rgba(0, 102, 204, 0.3);
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.per-page-selector label {
    font-weight: 600;
    color: #333;
}

.per-page-select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.per-page-select:focus {
    outline: none;
    border-color: #0066cc;
}

.pagination-counter {
    font-size: 0.95rem;
    color: #666;
}

.pagination-counter strong {
    color: #0066cc;
    font-weight: 600;
}

/* ============ ПУСТАЯ СТРАНИЦА ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #0e2f76;
    margin-bottom: 15px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

.materials-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 20px;
    background: #e8f4f8;
    border: 1px solid #b3dae6;
    border-radius: 6px;
    margin-bottom: 20px;
}

.search-info p {
    margin: 0;
    color: #0e2f76;
}

.search-info strong {
    color: #0e2f76;
}

.result-count {
    font-weight: 600;
    color: #0e2f76;
}

.link-reset {
    white-space: nowrap;
    color: #0e2f76;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.link-reset:hover {
    color: #0066cc;
    text-decoration: underline;
}


/* ============ АДАПТИВНЫЙ ДИЗАЙН ============ */

@media (max-width: 600px) {
    .search-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-wrapper {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .pagination-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pagination-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-buttons {
        gap: 3px;
    }

    .page-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}





@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 1rem; }
    .navbar-menu { justify-content: center; flex-wrap: wrap; }
    .logo-text h1 { font-size: 3rem; }
    .login-box { padding: 2rem; }
}
