/* Reset и базовые */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f7fa; color: #1a202c; line-height: 1.6; }
a { text-decoration: none; color: #2b6cb0; }
a:hover { text-decoration: underline; }
/* Убираем подчёркивания у ссылок и кнопок */
a, .btn, .btn:hover, .btn:focus {
    text-decoration: none !important;
}

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .logo {
    padding: 0 20px 30px;
    font-size: 1.4em;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .logo span { font-size: 0.8em; font-weight: 300; color: #a0aec0; }
.sidebar ul { list-style: none; }
.sidebar li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e0;
    border-left: 3px solid transparent;
    transition: 0.2s;
}
.sidebar li a:hover,
.sidebar li a.active {
    background: #4a5568;
    color: #fff;
    border-left-color: #63b3ed;
}
.sidebar li a .icon { width: 20px; text-align: center; }

.main {
    flex: 1;
    padding: 30px;
    background: #f5f7fa;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.header h1 { font-size: 1.8em; font-weight: 300; }

/* Карточки */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    text-align: center;
    padding: 24px;
}
.stat-card .number { font-size: 2.4em; font-weight: 600; color: #2b6cb0; }
.stat-card .label { color: #718096; font-size: 0.9em; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background: #edf2f7; color: #4a5568; font-weight: 600; }
tr:hover { background: #f7fafc; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 18px;
    background: #edf2f7;
    color: #1a202c;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: 0.2s;
    text-decoration: none;
}
.btn-primary { background: #2b6cb0; color: #fff; border-color: #2b6cb0; }
.btn-primary:hover { background: #2c5282; }
.btn-danger { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-success { background: #38a169; color: #fff; border-color: #38a169; }
.btn-sm { padding: 4px 12px; font-size: 0.8em; }

/* Формы */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; color: #4a5568; }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1em;
}
.form-control:focus { outline: 2px solid #63b3ed; outline-offset: -1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Уведомления */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}
.alert.success { background: #c6f6d5; color: #22543d; }
.alert.error { background: #fed7d7; color: #742a2a; }

/* Модалка (если нужна) */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 10px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; padding: 30px; }

/* Адаптив */
@media (max-width: 768px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .form-row { grid-template-columns: 1fr; }
}







/* Бургер-меню */
.burger {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 28px;
    color: #2d3748;
    cursor: pointer;
    padding: 8px 16px;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.burger:hover {
    background: #f7fafc;
}
.sidebar {
    transition: transform 0.3s ease;
}

@media (max-width: 1023px) {
    .burger {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
        overflow-y: auto;
        background: #2d3748;
        padding-top: 60px;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        padding: 20px 15px;
        padding-top: 70px;
    }
    .header h1 {
        font-size: 1.4em;
    }
}

/* ============================================
   ГЛОБАЛЬНЫЕ СТИЛИ ДЛЯ СПИСКОВ
   ============================================ */
   ul, ol {
    padding-left: 20px;
    margin: 0 0 16px 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Для списков внутри карточек */
.card ul,
.card ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card ul li,
.card ol li {
    padding: 8px 12px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card ul li:last-child,
.card ol li:last-child {
    border-bottom: none;
}

/* Убираем маркеры у всех списков в интерфейсе */
.sidebar ul,
.main ul,
.main ol {
    list-style: none;
    padding: 0;
}

/* Выравнивание текста в списках */
.main li,
.sidebar li {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ============================================
   СТИЛИ ДЛЯ ИНФОРМАЦИОННЫХ БЛОКОВ (инфо-сетка)
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.info-value {
    color: #1a202c;
    font-size: 1.1em;
    overflow-wrap: break-word;
    word-break: break-word;
}

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

/* ============================================
   СТИЛИ ДЛЯ ДАШБОРДА (ПОСЛЕДНИЕ ЛОГИ)
   ============================================ */
.dashboard-logs {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.dashboard-logs li {
    padding: 6px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.9em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.dashboard-logs li:last-child {
    border-bottom: none;
}

/* ============================================
   СТИЛИ ДЛЯ ИНФОРМАЦИОННЫХ БЛОКОВ (инфо-сетка)
   ============================================ */
   .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.info-value {
    color: #1a202c;
    font-size: 1.1em;
    overflow-wrap: break-word;
    word-break: break-word;
}

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