/* Общие стили */
body, html {
    margin: 0;
    padding: 0;
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
}

/* Чат */
#chat-container {
    display: flex;
    flex-direction: column;
    
    width: 100%;
    background-color: #fff;
}

#chat-window {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 22px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e9e9eb;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

#input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
}

#message-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
}
#message-input:focus {
    border-color: #007bff;
}

#send-button {
    border: none;
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}
#send-button:hover {
    background-color: #0056b3;
}

/* Админка */
.admin-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 95%;
}
.admin-container h1, .admin-container h2 {
    color: #333;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width: 600px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f8f9fa;
}
.actions a, .actions button {
    color: #007bff;
    text-decoration: none;
    margin-right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1em;
    padding: 0;
}
.actions form {
    display: inline;
}
.actions a:hover {
    text-decoration: underline;
}
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.flash-success { background-color: #d4edda; color: #155724; }
.flash-danger { background-color: #f8d7da; color: #721c24; }
.flash-info { background-color: #cce5ff; color: #004085; }

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
form input, form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}
form button {
    padding: 12px;
    border-radius: 5px;
    border: none;
    background-color: #28a745;
    color: white;
    font-size: 1em;
    cursor: pointer;
    width: 100%;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }
    #message-input, #send-button {
        font-size: 14px;
        padding: 10px;
    }
    .admin-container {
        padding: 10px;
    }
    table th, table td {
        font-size: 12px;
        padding: 8px;
    }
}

