/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
}

/* Кнопки */
.btn-primary {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    display: inline-block;
    background-color: #e2e8f0;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-edit {
    display: inline-block;
    background-color: #f59e0b;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-right: 5px;
}

.btn-edit:hover {
    background-color: #d97706;
}

.btn-delete {
    display: inline-block;
    background-color: #ef4444;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #dc2626;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #475569;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    color: #ef4444;
    margin-top: 10px;
    font-size: 14px;
}

/* Страница авторизации */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
}

/* Админ-панель */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 24px;
    color: #1e293b;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.table-actions {
    margin-bottom: 20px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.user-table th,
.user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.user-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.user-table tr:hover {
    background-color: #f8fafc;
}

/* Формы создания/редактирования */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* База знаний */
.kb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.kb-header h1 {
    font-size: 24px;
    color: #1e293b;
}

.kb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.kb-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.kb-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.kb-rectangle {
    height: 150px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 12px 12px 0 0;
}

.kb-title {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
}