/* API Logs Page Styles - Light Theme */
.api-logs-container {
    width: 100%;
    padding: 2rem 2.5rem;
    background: transparent;
}

/* Hard Refresh Button */
.btn-refresh {
    padding: 0.75rem 1.5rem;
    background-color: #31a4a0;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-refresh:hover:not(:disabled) {
    background-color: #2a8f8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 164, 160, 0.3);
}

.btn-refresh:active:not(:disabled) {
    transform: translateY(0);
}

.btn-refresh:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.2);
}

.btn-refresh:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-refresh i {
    font-size: 14px;
}

.btn-refresh i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Search and Filter Section */
.search-filter-section {
    margin-bottom: 1.5rem;
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-form {
    width: 100%;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    flex: 1;
    min-width: 300px;
}

.status-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: #31566D;
    font-size: 14px;
    white-space: nowrap;
}

.status-filter {
    padding: 0.75rem 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #FFFFFF;
    color: #31566D;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.status-filter:hover {
    border-color: #D0D0D0;
}

.status-filter:focus {
    outline: none;
    border-color: #31a4a0;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.1);
}

.status-filter option {
    background: #FFFFFF;
    color: #31566D;
    padding: 0.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #4C7189;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    color: #31566D;
    background-color: #FFFFFF;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #31a4a0;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.1);
}

.search-input::placeholder {
    color: #9E9E9E;
}

.btn-clear-search {
    background: transparent;
    border: none;
    color: #4C7189;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-clear-search:hover {
    background-color: #F5F5F5;
    color: #31566D;
}

.btn-clear-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.2);
}

.btn-search {
    padding: 0.75rem 1.5rem;
    background-color: #31a4a0;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: #2a8f8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 164, 160, 0.3);
}

.btn-search:active {
    transform: translateY(0);
}

.btn-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.2);
}

/* Table Styles */
.logs-table-wrapper {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.logs-table thead {
    background-color: #F5F5F5;
    border-bottom: 2px solid #E0E0E0;
}

.logs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #31566D;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E0E0E0;
}

.logs-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.logs-table th.sortable:hover {
    background-color: #F0F0F0;
}

.sort-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #31566D;
    text-decoration: none;
    width: 100%;
    transition: color 0.2s ease;
}

.sort-link:hover {
    color: #31a4a0;
    text-decoration: none;
}

.sort-icon {
    font-size: 12px;
    color: #4C7189;
    transition: color 0.2s ease;
}

.sort-link:hover .sort-icon {
    color: #31a4a0;
}

.logs-table tbody tr {
    border-bottom: 1px solid #E0E0E0;
    transition: background-color 0.2s ease;
}

.logs-table tbody tr:hover {
    background-color: #F9F9F9;
}

.logs-table tbody tr:last-child {
    border-bottom: none;
}

.logs-table td {
    padding: 1rem;
    color: #31566D;
    vertical-align: middle;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-error {
    background-color: #FFEBEE;
    color: #C62828;
}

.status-running {
    background-color: #E3F2FD;
    color: #1565C0;
}

.status-default {
    background-color: #F5F5F5;
    color: #4C7189;
}

/* Action Button */
.btn-view-details {
    background-color: #31a4a0;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-view-details:hover {
    background-color: #2a8f8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 164, 160, 0.3);
}

.btn-view-details:active {
    transform: translateY(0);
}

.btn-view-details:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 164, 160, 0.2);
}

.btn-view-details i {
    font-size: 14px;
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 14px;
    color: #4C7189;
    font-weight: 500;
}

.pagination-nav {
    display: flex;
    align-items: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    color: #31566D;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-link:hover:not(.disabled) {
    background-color: #F5F5F5;
    border-color: #D0D0D0;
    color: #31566D;
}

.page-item.active .page-link {
    background-color: #31a4a0;
    border-color: #31a4a0;
    color: #FFFFFF;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #F5F5F5;
    color: #9E9E9E;
}

.page-link i {
    font-size: 12px;
}

/* No Logs Message */
.no-logs-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #4C7189;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
}

.no-logs-message i {
    font-size: 48px;
    color: #D0D0D0;
    margin-bottom: 1rem;
    display: block;
}

.no-logs-message p {
    font-size: 16px;
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.btn-clear-all-filters {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #31a4a0;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-clear-all-filters:hover {
    background-color: #2a8f8c;
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 164, 160, 0.3);
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: 1px solid #E0E0E0;
}

.modal-header {
    background-color: #F5F5F5;
    border-bottom: 1px solid #E0E0E0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #31566D;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

/* Log Details Styles */
.log-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F5F5F5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row-full {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #4C7189;
    font-size: 14px;
}

.detail-value {
    color: #31566D;
    font-size: 14px;
    word-break: break-word;
}

.message-content {
    background-color: #F5F5F5;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: 1px solid;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #FFEBEE;
    border-color: #EF5350;
    color: #C62828;
}

.alert-success {
    background-color: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-logs-container {
        padding: 1.5rem;
    }

    .logs-table-wrapper {
        overflow-x: auto;
    }

    .logs-table {
        min-width: 800px;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .api-logs-container {
        padding: 1rem;
    }

    .search-filter-section {
        padding: 1rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        min-width: auto;
    }

    .search-icon {
        left: 0.75rem;
    }

    .search-input {
        padding-left: 2.5rem;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
    }

    .status-filter-wrapper {
        width: 100%;
    }

    .status-filter {
        width: 100%;
        min-width: auto;
    }
}

    .logs-table th,
    .logs-table td {
        padding: 1rem 1rem;
        font-size: 13px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

