/**
 * Admin Dashboard Styles
 *
 * Styles for admin transaction management interface
 */

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.login-box .subtitle {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #5568d3;
}

/* Admin Dashboard */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-header h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-info span {
    color: #666;
    font-size: 14px;
}

.admin-info strong {
    color: #333;
    text-transform: uppercase;
}

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Transactions Section */
.transactions-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.transactions-section h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.help-text {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Transactions Table */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table thead {
    background: #f8f9fa;
}

.transactions-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
    color: #333;
}

.transactions-table tbody tr {
    transition: background 0.2s;
}

.transactions-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-authcapturedpendingsettlement {
    background: #fff3cd;
    color: #856404;
}

.status-settledsuccessfully {
    background: #d4edda;
    color: #155724;
}

.status-voided {
    background: #e2e3e5;
    color: #383d41;
}

/* Buttons */
.btn-void {
    padding: 6px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-void:hover {
    background: #c82333;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c82333;
}

/* No Transactions */
.no-transactions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-transactions p {
    margin: 0;
    font-size: 16px;
}

/* Actions Section */
.actions-section {
    text-align: right;
    padding: 20px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.modal-content p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.modal-content p strong {
    color: #333;
}

.modal-content .warning {
    color: #dc3545;
    font-weight: 600;
    margin-top: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Loading Overlay */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2000;
}

#loading-overlay p {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #333;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Info Card */
.info-card {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-card h3 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 18px;
}

.info-card h4 {
    margin: 15px 0 8px 0;
    color: #333;
    font-size: 15px;
}

.info-card p {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.info-card ul {
    margin: 0 0 15px 20px;
    color: #555;
    font-size: 14px;
}

.info-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-card code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d32f2f;
}

.warning-text {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-waiting {
    background: #fff3cd;
    color: #856404;
}

/* Button Spinner */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner-small {
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Text */
.loading-text {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Date Columns */
.date-col {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .transactions-table {
        font-size: 12px;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 8px;
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .transactions-section {
        padding: 20px;
        overflow-x: auto;
    }

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

    .modal-content {
        margin: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}

/* Duplicate invoice badge */
.dup-badge {
    background: #e65100;
    color: #fff;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: bold;
    vertical-align: middle;
}

/* Refund button */
.refund-btn {
    background: #6a1b9a;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.refund-btn:hover {
    background: #4a148c;
}

/* ===============================================
 * Async Status Loading Styles
 * =============================================== */

/* Spinner animation */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.spinner-small {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading states */
.status-loading,
.action-loading {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* Row update animation */
@keyframes row-highlight {
    0% { background-color: #ffffcc; }
    100% { background-color: transparent; }
}

tr.just-updated {
    animation: row-highlight 1s ease-out;
}

/* Status badge styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-settled {
    background-color: #d4edda;
    color: #155724;
}

.status-voided {
    background-color: #e9ecef;
    color: #495057;
}

.status-refunded {
    background-color: #e8daef;
    color: #6a1b9a;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-unknown {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-pending {
    background-color: #cce5ff;
    color: #004085;
}

/* Status text for "Captured (Pending Settlement)" */
.status-settled {
    background-color: #fff3cd;
    color: #856404;
}

/* =========================================================================
   Reports Tab Styles
   ========================================================================= */

.reports-section {
    padding: 20px;
}

.reports-section h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.reports-section h3 {
    margin: 20px 0 10px 0;
    color: #333;
    font-size: 18px;
}

.reports-section h4 {
    margin: 15px 0 8px 0;
    color: #333;
    font-size: 15px;
}

/* Statistics Cards Grid */
/* Stats Bar */
.stat-bar-item {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-right: 1px solid #e0e0e0;
    min-width: 140px;
}

.stat-bar-item:last-child {
    border-right: none;
}

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

.stat-bar-value.stat-bar-warn {
    color: #e67e22;
}

.stat-bar-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stat-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.stat-bar-sub {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

/* Charts Grid */
.reports-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.chart-container {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #dde8e0;
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.07);
}

.chart-container h3 {
    margin: 0 0 18px 0;
    color: #2d6a4f;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Data Quality Section */
.reports-quality-section {
    margin: 40px 0;
}

.reports-quality-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.help-text {
    color: #666;
    font-size: 14px;
    margin: 10px 0 20px 0;
}

/* Quality Cards */
.quality-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quality-card h4 {
    padding: 15px 20px;
    margin: 0;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quality-card h4:hover {
    background: #efefef;
}

.toggle-icon {
    display: inline-block;
    font-size: 12px;
    color: #666;
    min-width: 16px;
}

.quality-table-container {
    padding: 15px 20px;
    background: white;
}

/* Reports Table */
.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.reports-table thead {
    background: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
}

.reports-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
}

.reports-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 13px;
}

.reports-table tbody tr:hover {
    background: #fafafa;
}

.reports-table strong {
    color: #333;
}

/* Loading state */
.loading-text {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Spinner */
.spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: spin 0.8s linear infinite;
    margin-right: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-text,
.btn-spinner {
    display: inline;
}

/* Responsive design */
@media (max-width: 768px) {
    .stat-bar-item {
        flex: 1 1 calc(33% - 1px);
        min-width: 120px;
    }

    .stat-bar-value {
        font-size: 20px;
    }

    .reports-charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .reports-table {
        font-size: 12px;
    }

    .reports-table th,
    .reports-table td {
        padding: 8px;
    }
}

/* =========================================================================
   Pagination Styles
   ========================================================================= */

/* Controls bar above table: record count (left) + per-page selector (right) */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 4px;
    font-size: 13px;
    color: #555;
}

.pagination-total {
    font-weight: 500;
}

.pagination-per-page-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-per-page-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.pagination-per-page {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: white;
    cursor: pointer;
}

.pagination-per-page:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Navigation bar below table */
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 12px 0 4px;
}

.pagination-page-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: #f0f0f0;
    border-color: #ccc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

.pagination-prev,
.pagination-next {
    font-weight: 500;
}

.pagination-ellipsis {
    padding: 6px 4px;
    color: #999;
    font-size: 13px;
}

.pagination-page {
    min-width: 34px;
    text-align: center;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .pagination-nav {
        flex-wrap: wrap;
    }
}

/* ===============================================
 * Logs Viewer Tab (#191)
 * =============================================== */

/* Controls Layout */
.logs-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.logs-controls-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.logs-controls-row:last-child {
    margin-bottom: 0;
}

.logs-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logs-control-group label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

.logs-search-group {
    flex: 1;
    min-width: 200px;
}

.logs-search-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.logs-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.logs-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

/* Level Filter Buttons */
.logs-level-buttons {
    display: flex;
    gap: 4px;
}

.logs-level-btn {
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.logs-level-btn:hover {
    background: #e9ecef;
}

.logs-level-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.logs-level-error.active {
    background: #dc3545;
    border-color: #dc3545;
}

.logs-level-warning.active {
    background: #e67e22;
    border-color: #e67e22;
}

.logs-level-info.active {
    background: #2196f3;
    border-color: #2196f3;
}

.logs-level-debug.active {
    background: #6c757d;
    border-color: #6c757d;
}

/* Auto-refresh Toggle */
.logs-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* Log Status */
.logs-status {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-size: 14px;
}

/* Log Entries Container */
.logs-entries-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #1e1e1e;
}

/* Audit log — dark theme matching app logs */
#audit-entries-container {
    max-height: 700px;
}

#audit-entries-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
}

#audit-entries-table thead th {
    background: #252526;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
    text-align: left;
}

#audit-entries-table tbody tr {
    border-bottom: 1px solid #333;
}

#audit-entries-table tbody tr:last-child {
    border-bottom: none;
}

#audit-entries-table tbody tr:hover {
    background: #2a2a2a;
}

#audit-entries-table td {
    vertical-align: top;
    padding: 7px 10px;
    max-width: 240px;
    overflow: hidden;
    color: #d4d4d4;
    line-height: 1.5;
}

#audit-entries-table td:first-child {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
}

#audit-entries-table td pre {
    max-width: 220px;
    max-height: 100px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 11px;
    margin: 0;
    background: #2d2d2d;
    color: #9cdcfe;
    padding: 4px 6px;
    border-radius: 3px;
}

/* Action badges — match log level badge style */
.log-level-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-level-created      { background: #0e7a0e; color: #fff; }
.log-level-cancelled    { background: #6c757d; color: #fff; }
.log-level-admin_voided { background: #8b0000; color: #fff; }
.log-level-payment_declined { background: #dc3545; color: #fff; }
.log-level-reactivated  { background: #1565c0; color: #fff; }
.log-level-payment_updated { background: #5a3e9b; color: #fff; }

/* Individual Log Entry */
.logs-entry {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
}

.logs-entry:last-child {
    border-bottom: none;
}

.logs-entry-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 2px;
}

.logs-entry-timestamp {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
}

.logs-entry-channel {
    color: #888;
    font-size: 11px;
}

.logs-entry-message {
    color: #d4d4d4;
    word-break: break-word;
}

.logs-entry-context {
    margin-top: 4px;
    padding: 6px 8px;
    background: #2d2d2d;
    border-radius: 3px;
    color: #9cdcfe;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Level Badges */
.logs-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-entry-error .logs-badge,
.logs-badge.logs-entry-error {
    background: #dc3545;
    color: white;
}

.logs-entry-warning .logs-badge,
.logs-badge.logs-entry-warning {
    background: #e67e22;
    color: white;
}

.logs-entry-info .logs-badge,
.logs-badge.logs-entry-info {
    background: #2196f3;
    color: white;
}

.logs-entry-debug .logs-badge,
.logs-badge.logs-entry-debug {
    background: #6c757d;
    color: white;
}

.logs-entry-critical .logs-badge,
.logs-badge.logs-entry-critical {
    background: #8b0000;
    color: white;
}

.logs-entry-notice .logs-badge,
.logs-badge.logs-entry-notice {
    background: #17a2b8;
    color: white;
}

/* Color-coded left border per level */
.logs-entry.logs-entry-error {
    border-left: 3px solid #dc3545;
}

.logs-entry.logs-entry-warning {
    border-left: 3px solid #e67e22;
}

.logs-entry.logs-entry-info {
    border-left: 3px solid #2196f3;
}

.logs-entry.logs-entry-debug {
    border-left: 3px solid #6c757d;
}

.logs-entry.logs-entry-critical {
    border-left: 3px solid #8b0000;
}

/* Error entry message text color */
.logs-entry.logs-entry-error .logs-entry-message {
    color: #f8a0a0;
}

.logs-entry.logs-entry-warning .logs-entry-message {
    color: #f5c77e;
}

/* File Info Bar */
.logs-file-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .logs-controls-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .logs-level-buttons {
        flex-wrap: wrap;
    }

    .logs-entries-container {
        max-height: 400px;
    }
}
