/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

h1 {
    color: #25D366;
    font-size: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin: 10px 0 20px 0;
}

.tab-button {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.tab-button.active {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

.admin-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background-color: #e9ecef;
}

/* Admin */
.hidden {
    display: none;
}

.admin {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.admin input[type="text"],
.admin input[type="number"],
.admin input[type="password"] {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-right: 8px;
}

.admin button {
    padding: 8px 12px;
    border: 1px solid #25D366;
    background: #25D366;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.kb-actions,
.kb-upload,
.keys-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px 0;
    flex-wrap: wrap;
}

.wa-actions,
.wa-test {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px 0;
    flex-wrap: wrap;
}

.kb-list table,
.kb-list th,
.kb-list td {
    border: 1px solid #eee;
}

.kb-list table {
    width: 100%;
    border-collapse: collapse;
}

.kb-list th,
.kb-list td {
    padding: 8px 10px;
    text-align: left;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.leads-container {
    overflow-x: auto;
}

table.leads-table {
    width: 100%;
    border-collapse: collapse;
}

table.leads-table th,
table.leads-table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

table.leads-table th {
    background: #f9f9f9;
}

/* Message Options Styles */
.message-options {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #25D366;
}

.options-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.option-button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s ease;
}

.option-button:hover {
    border-color: #25D366;
    background: #f0f8f0;
    transform: translateY(-1px);
}

.option-button:active {
    transform: translateY(0);
    background: #e8f5e8;
}

/* Message Styles */
.message {
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: #25D366;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-right: auto;
}

.message.system {
    background: #f0f0f0;
    color: #666;
    text-align: center;
    margin: 5px auto;
    font-style: italic;
    font-size: 0.9em;
}

.typing-indicator {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
}

.typing-dots {
    animation: typing 1.5s infinite;
}

@keyframes typing {

    0%,
    60%,
    100% {
        opacity: 0.3;
    }

    30% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }
}