/* Admin Page Container */
.wpaic-admin-wrap {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Header */
.wpaic-admin-header {
    margin-bottom: 30px;
    text-align: center;
}

.wpaic-admin-header h1 {
    font-weight: 700;
    color: #333;
    font-size: 2.5em;
    margin: 0;
}

.wpaic-admin-header p {
    color: #666;
    font-size: 1.1em;
}

/* Cards */
.wpaic-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    padding: 30px;
    margin-bottom: 30px;
}

/* Form Styles */
.wpaic-settings-form h2 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    color: #444;
}

.wpaic-settings-form table.form-table tr {
    display: block;
    margin-bottom: 20px;
}

.wpaic-settings-form table.form-table th {
    display: block;
    width: 100%;
    padding: 0 0 10px 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wpaic-settings-form table.form-table td {
    display: block;
    padding: 0;
    width: 100%;
}

.wpaic-settings-form input[type="text"],
.wpaic-settings-form input[type="password"],
.wpaic-settings-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Rounded inputs */
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.wpaic-settings-form input[type="text"]:focus,
.wpaic-settings-form input[type="password"]:focus,
.wpaic-settings-form textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Color Picker tweak */
.wpaic-settings-form input[type="color"] {
    height: 40px;
    width: 60px;
    border: none;
    background: none;
    cursor: pointer;
}

/* Submit Button */
.wpaic-submit-btn {
    text-align: right;
    margin-top: 20px;
}

.wpaic-submit-btn .button-primary {
    background: #007bff;
    border-color: #007bff;
    padding: 10px 30px;
    font-size: 16px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.1s ease;
}

.wpaic-submit-btn .button-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Logs Table (Responsive Card View for Desktop too if minimal, or just cleaner table) */
/* Modern wp-list-table override */
/* Logs Table */
.wpaic-admin-wrap table.wp-list-table {
    table-layout: fixed;
    width: 100%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.wpaic-admin-wrap table.wp-list-table thead th {
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    color: #444;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    padding: 15px;
    vertical-align: middle;
}

.wpaic-admin-wrap table.wp-list-table tbody td {
    padding: 15px;
    vertical-align: top;
    color: #555;
    font-size: 13px;
    word-wrap: break-word;
    /* Ensure long words break */
    overflow-wrap: break-word;
}

.wpaic-admin-wrap table.wp-list-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Specific Column Widths (optional adjustment) */
.wpaic-admin-wrap table.wp-list-table th:first-child {
    width: 120px;
}

/* Date */
.wpaic-admin-wrap table.wp-list-table th:nth-child(2) {
    width: 25%;
}

/* User Message */
.wpaic-admin-wrap table.wp-list-table th:nth-child(3) {
    width: 30%;
}

/* AI Reply */
/* Context gets remaining space */

/* Context Pre tag */
.wpaic-admin-wrap pre {
    background: #f0f0f1;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    /* Wrap long JSON lines */
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    font-size: 11px;
    border: 1px solid #ddd;
}

.wpaic-logs-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Responsive for Mobile */
@media screen and (max-width: 782px) {
    .wpaic-admin-wrap {
        margin: 10px;
    }

    .wpaic-card {
        padding: 20px;
    }

    /* ... Existing mobile card styles logic would go here or be enhanced ... */
}