/* layout.css - Макет сайта и навигация */

/* ===== ШАПКА САЙТА ===== */
.site-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo h1 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.site-logo p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 12px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== ГЛАВНАЯ НАВИГАЦИЯ ===== */
.main-nav {
    background: white;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.nav-menu li {
    flex: 0 0 auto;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #666;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-menu a:hover {
    color: #1a237e;
    background: #f8f9fa;
}

.nav-menu a.active {
    color: #1a237e;
    border-bottom-color: #1a237e;
    background: #f8f9fa;
}

.nav-menu .nav-icon {
    font-size: 16px;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    padding: 20px;
    min-height: calc(100vh - 160px);
    background: #f5f7fa;
}

.content-header {
    background: white;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.content-header h1 {
    margin: 0 0 10px 0;
    color: #1a237e;
}

.content-header p {
    margin: 0;
    color: #666;
}

.content-body {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* ===== СЕТКА ДАШБОРДА ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #3f51b5;
}

.dashboard-card .card-icon {
    margin-bottom: 20px;
    font-size: 40px;
    color: #3f51b5;
}

.dashboard-card h3 {
    margin: 0 0 10px 0;
    color: #1a237e;
    font-size: 18px;
}

.dashboard-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== ФУТЕР ===== */
.site-footer {
    background: #1a237e;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ===== КНОПКА МОБИЛЬНОГО МЕНЮ ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* ===== ФОРМЫ ===== */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

.form-card-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 25px 30px;
}

.form-card-header h2 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-body {
    padding: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group label.required:after {
    content: " *";
    color: #f44336;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== ТАБЛИЦЫ ===== */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 15px;
    font-size: 14px;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
    color: #333;
    font-size: 14px;
}

.table tr:hover {
    background: #f9f9f9;
}

/* ===== КНОПКИ ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.3);
}

.btn-outline {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* ===== СТАТУС-БЭДЖИ ===== */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

.status-expired {
    background: #ffebee;
    color: #c62828;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}