/* Admin Dashboard Page Styles */

/* Full Width Layout */
.aichat-admin-wrap {
    margin-right: 20px;
    max-width: 100%;
}

.aichat-admin-container {
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
}

/* Stats Grid */
.aichat-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.aichat-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: box-shadow 0.2s;
}

.aichat-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.stat-content h3 {
    margin: 0 0 5px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-sub {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Quick Actions */
.aichat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.aichat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.aichat-action-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.aichat-action-btn.primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.aichat-action-btn.primary:hover {
    background: #0056b3;
    color: white;
}

.aichat-action-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.action-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0;
}

/* Recent Table */
.aichat-recent-table {
    width: 100%;
    table-layout: auto;
}

.aichat-recent-table th {
    font-weight: 600;
    background: #f8f9fa;
}

.aichat-recent-table .column-visitor {
    width: auto;
    min-width: 180px;
}

.aichat-recent-table .column-contact {
    width: auto;
    min-width: 200px;
}

.aichat-recent-table .column-messages {
    width: 80px;
    text-align: center;
}

.aichat-recent-table .column-last-message {
    width: auto;
    min-width: 220px;
}

.aichat-recent-table .column-status {
    width: 110px;
}

.aichat-recent-table .column-date {
    width: 130px;
}

.aichat-recent-table .column-actions {
    width: 80px;
}

.visitor-location {
    display: block;
    color: #666;
    font-size: 11px;
    margin-top: 3px;
}

.visitor-location .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #0073aa;
    font-size: 12px;
}

.contact-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.message-count {
    display: inline-block;
    background: #e0e0e0;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.last-msg-preview {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.last-msg-preview .sender {
    font-size: 14px;
}

.last-msg-preview .msg-text {
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-ago {
    color: #999;
    font-size: 11px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

.no-data {
    color: #999;
}

/* Empty State */
.aichat-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.aichat-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
}

/* Info Table */
.aichat-info-table {
    width: 100%;
    border-collapse: collapse;
}

.aichat-info-table th,
.aichat-info-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.aichat-info-table th {
    width: 200px;
    font-weight: 600;
    color: #666;
}

/* Pending Notice */
.aichat-pending-notice p {
    display: flex;
    align-items: center;
}

.aichat-pending-notice .dashicons {
    margin-right: 8px;
    font-size: 20px;
}
