/* ========== БАЗА ========== */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:system-ui,sans-serif;background:#1e3a5f;color:#1e293b}

/* ========== ЛЭЙАУТ АДМИНКИ ========== */
.layout{display:flex;min-height:100vh}
.sidebar{width:240px;background:#1e293b;color:#e2e8f0;padding:24px 0;position:fixed;top:0;left:0;bottom:0;overflow-y:auto;z-index:10}
.sidebar h2{padding:0 20px 20px;font-size:1.3rem;border-bottom:1px solid #334155}
.sidebar a{display:block;padding:12px 20px;color:#94a3b8;text-decoration:none;font-size:0.95rem}
.sidebar a:hover{background:#334155;color:#fff}
.main{margin-left:240px;flex:1;padding:24px 32px}

/* ========== УВЕДОМЛЕНИЯ ========== */
.alert{padding:14px 20px;border-radius:12px;margin-bottom:20px;font-weight:500}
.alert-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}
.alert-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}

/* ========== СТАТИСТИКА ========== */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
.stat-card{background:#fff;padding:20px;border-radius:12px;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.stat-num{font-size:2rem;font-weight:700;color:#3b82f6}
.stat-lbl{color:#64748b;font-size:0.9rem;margin-top:4px}

/* ========== КАРТОЧКИ ========== */
.card{background:#fff;padding:24px;border-radius:16px;margin-bottom:24px;box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.card h3{margin-bottom:16px;font-size:1.2rem}

/* ========== ФОРМЫ ========== */
.form-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px;align-items:flex-end}
.form-group{display:flex;flex-direction:column;gap:4px}
.form-group label{font-size:0.85rem;font-weight:600;color:#475569}
input,select,textarea{padding:10px 14px;border:1px solid #d1d5db;border-radius:10px;font-size:14px;outline:none;font-family:inherit}
input:focus,select:focus,textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.1)}
textarea{resize:vertical;min-height:60px}

/* ========== КНОПКИ ========== */
.btn{padding:8px 18px;border:none;border-radius:10px;cursor:pointer;font-size:14px;font-weight:600;white-space:nowrap;display:inline-block;text-decoration:none}
.btn-blue{background:#3b82f6;color:#fff}
.btn-green{background:#10b981;color:#fff}
.btn-red{background:#ef4444;color:#fff}
.btn-gray{background:#6b7280;color:#fff}
.btn:hover{opacity:0.9}

/* ========== ТАБЛИЦЫ ========== */
table{width:100%;border-collapse:collapse;margin-top:12px}
th,td{padding:10px 14px;text-align:left;border-bottom:1px solid #e5e7eb}
th{background:#f9fafb;font-weight:600;font-size:0.85rem;color:#6b7280}

/* ========== ТЕГИ СТОЛБЦОВ ========== */
.cols-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px;align-items:center}
.col-tag{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:20px;font-size:0.85rem;font-weight:500}
.col-tag.standard{background:#dbeafe;color:#1e40af}
.col-tag.custom{background:#fef3c7;color:#92400e}
.col-tag .col-edit{cursor:pointer;color:#3b82f6;font-size:0.9rem}
.col-tag .col-edit:hover{color:#2563eb;transform:scale(1.2)}
.col-tag .col-del{cursor:pointer;color:#ef4444;font-weight:bold;font-size:1rem;line-height:1}
.col-tag .col-del:hover{color:#dc2626}

/* ========== ЛЕНТА ========== */
.timeline-item{padding:16px;border:1px solid #e5e7eb;border-radius:10px;margin-bottom:12px;background:#f9fafb}
.meta{color:#9ca3af;font-size:0.85rem;margin-bottom:8px}

/* ========== ПУБЛИЧНАЯ СТРАНИЦА ========== */
body.public-page{background:linear-gradient(135deg,#1e3a5f,#2d1b69);min-height:100vh}
.public-container{max-width:1900px;margin:0 auto;padding:20px}
.public-header{text-align:center;color:#fff;padding:50px 20px 30px}
.public-header h1{font-size:2.4rem;font-weight:700;text-shadow:0 2px 10px rgba(0,0,0,0.3);margin-bottom:10px}
.subtitle{opacity:0.85;font-size:1.1rem}
.public-stats{display:flex;gap:16px;justify-content:center;margin-bottom:30px;flex-wrap:wrap}
.stat-badge{background:rgba(255,255,255,0.15);backdrop-filter:blur(10px);color:#fff;padding:12px 24px;border-radius:30px;font-weight:600;border:1px solid rgba(255,255,255,0.2)}
.timeline-container{background:#fff;border-radius:24px;padding:32px;box-shadow:0 20px 60px rgba(0,0,0,0.15);min-height:400px}
.timeline-block{margin-bottom:32px;padding-bottom:32px;border-bottom:1px solid #f1f5f9}
.timeline-block:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.timeline-time{font-size:0.85rem;color:#94a3b8;margin-bottom:14px;font-weight:500}
.block-title{font-size:1.2rem;font-weight:700;color:#1e293b;margin-bottom:6px}
.block-description{color:#64748b;font-size:0.9rem;margin-bottom:14px;line-height:1.6;padding:12px 16px;background:#f8fafc;border-radius:10px;border-left:3px solid #3b82f6}
.file-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #f9fafb}
.file-item:last-child{border-bottom:none}
.file-download{color:#2563eb;text-decoration:none;font-weight:500;font-size:0.9rem;white-space:nowrap}
.file-download:hover{text-decoration:underline}
.table-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px}
.public-table{width:100%;border-collapse:collapse}
.public-table th{text-align:left;padding:12px 14px;background:#f8fafc;font-weight:600;color:#475569;font-size:0.85rem;border-bottom:2px solid #e2e8f0}
.public-table td{padding:12px 14px;border-bottom:1px solid #f1f5f9;font-size:0.9rem}
.empty-state{text-align:center;color:#94a3b8;padding:60px 20px;font-size:1.1rem}
.public-footer{text-align:center;color:rgba(255,255,255,0.7);padding:24px;font-size:0.9rem}

/* ========== ГЛАВНАЯ СТРАНИЦА ========== */
.main-page {
    background: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Приветственный блок */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #334155 100%);
    color: #fff;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
}

.welcome-section h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.welcome-text {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.welcome-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 14px 28px;
    background: #f59e0b;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #d97706;
}

.btn-secondary {
    padding: 14px 28px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

/* Контакты */
.contacts-section {
    padding: 40px 0 60px;
}

.contacts-section h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: #1e3a5f;
    text-align: center;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.contact-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.contact-card h3 {
    margin-bottom: 12px;
    color: #1e3a5f;
}

.contact-card p {
    margin: 6px 0;
    color: #475569;
    line-height: 1.5;
}
/* Футер */
.site-footer {
    background: #1e3a5f;
    color: #94a3b8;
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 4px 0;
}

/* Услуги */
.services-section {
    padding: 40px 0;
    text-align: center;
}

.services-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #1e3a5f;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.service-card h3 {
    margin-bottom: 10px;
    color: #1e3a5f;
}

.service-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Обновления */
.update-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.update-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.update-date {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.update-type {
    background: #f1f5f9;
    color: #475569;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.update-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
    line-height: 1.4;
}

.update-text {
    color: #475569;
    line-height: 1.7;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    margin: 12px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
}
/*  блок */

.text-block {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.block-text-content {
    line-height: 1.8;
    color: #334155;
}

.block-text-content p {
    margin-bottom: 12px;
}

.block-text-content ul,
.block-text-content ol {
    margin: 12px 0;
    padding-left: 20px;
}


/* ========== АДАПТИВ ========== */
@media(max-width:768px){
    .sidebar{width:100%;position:relative}
    .layout{flex-direction:column}
    .main{margin-left:0;padding:16px}
    .stats{grid-template-columns:repeat(2,1fr)}
    .public-header h1{font-size:1.6rem}
    .timeline-container{padding:20px 16px;border-radius:16px}
    .public-stats{flex-direction:column;align-items:center}
}