/* Additional Admin Styles */

/* Page Actions */
.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    width: 100%;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.search-btn {
    padding: 10px 15px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #2563eb;
}

.clear-search {
    padding: 10px 15px;
    background: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.3s;
}

.clear-search:hover {
    background: #4b5563;
}

/* Filters */
.filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #64748b;
}

/* Table Enhancements */
.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.no-image {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #64748b;
    font-size: 12px;
}

.truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-tag,
.general-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.company-tag {
    background: #dbeafe;
    color: #1e40af;
}

.general-tag {
    background: #f3f4f6;
    color: #6b7280;
}

.highlight-row {
    background-color: #fef3c7 !important;
    border-left: 4px solid #f59e0b;
}

.highlight-row:hover {
    background-color: #fde68a !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination .btn {
    padding: 8px 12px;
    min-width: 40px;
    text-align: center;
}

.pagination .btn-outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.pagination .btn-outline:hover {
    background: #f3f4f6;
}

/* Inquiry View */
.inquiry-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.view-header h2 {
    margin: 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.inquiry-details {
    padding: 30px;
}

.detail-section {
    margin-bottom: 40px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.9em;
}

.detail-item span {
    color: #1e293b;
}

.email-link {
    color: #3b82f6;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

.message-content {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    line-height: 1.6;
    white-space: pre-wrap;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-action {
    display: flex;
}

.quick-action .btn {
    flex: 1;
    justify-content: center;
}

/* Form Error States */
.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification i {
    font-size: 1.2em;
}

.notification .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: inherit;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .search-box {
        max-width: none;
        order: -1;
    }
    
    .stats-row {
        justify-content: center;
    }
    
    .view-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .status-actions {
        justify-content: center;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .notification {
        min-width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}