/**
 * COL323 Integration Admin Styles
 */

/* Status Cards */
.col323-int-status-overview .status-cards {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.status-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    min-width: 150px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.status-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-card .status-value {
    font-size: 32px;
    font-weight: bold;
    color: #23282d;
    line-height: 1;
}

.status-card .status-value.error {
    color: #d63638;
}

/* Sync Status Page */
/* v2.2.8 FIX - Grid layout: max 3 cards per row, wraps to next row */
.col323-int-sync-status .sync-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.col323-int-sync-status .stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.stat-card .stat-numbers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card .stat-numbers span {
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card .stat-numbers .total {
    font-size: 24px;
    font-weight: bold;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.stat-card .stat-numbers .synced {
    color: #00a32a;
}

.stat-card .stat-numbers .pending {
    color: #dba617;
}

.stat-card .stat-numbers .errors {
    color: #d63638;
}

/* v2.2.9 ADD - Stat card action buttons */
.stat-card-actions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stat-card-actions .button {
    font-size: 12px !important;
    line-height: 1.8 !important;
    min-height: 28px !important;
    padding: 0 10px !important;
}

/* Sync Actions */
.sync-actions {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.sync-actions h3 {
    margin: 0 0 15px 0;
}

.sync-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.sync-results {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.sync-results.success {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.sync-results.error {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* Recent Syncs Table */
.recent-syncs {
    margin: 30px 0;
}

.sync-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.sync-status-synced {
    background: #d1e7dd;
    color: #0f5132;
}

.sync-status-pending {
    background: #fff3cd;
    color: #664d03;
}

.sync-status-error {
    background: #f8d7da;
    color: #842029;
}

/* Quick Actions */
.col323-int-quick-actions {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

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

/* Connection Test */
#test-connection-result {
    margin-left: 10px;
    font-weight: 600;
}

#test-connection-result.success {
    color: #00a32a;
}

#test-connection-result.error {
    color: #d63638;
}

#test-connection-result.loading {
    color: #dba617;
}

/* Logs Page */
.col323-int-log-filters {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-row label {
    font-weight: 600;
    min-width: 80px;
}

.filter-row input, 
.filter-row select {
    margin: 0;
}

.col323-int-logs-summary {
    margin: 15px 0;
    font-style: italic;
    color: #666;
}

/* Logs Table */
.col323-int-logs-table {
    margin-top: 20px;
}

.col323-int-logs-table .column-timestamp {
    width: 150px;
}

.col323-int-logs-table .column-level {
    width: 80px;
}

.col323-int-logs-table .column-message {
    width: 200px;
}

.col323-int-logs-table .column-context {
    width: 300px;
}

.col323-int-logs-table .column-references {
    width: 150px;
}

.log-level {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.log-level-error {
    background: #f8d7da;
    color: #842029;
}

.log-level-warning {
    background: #fff3cd;
    color: #664d03;
}

.log-level-info {
    background: #d1ecf1;
    color: #0c5460;
}

.log-level-debug {
    background: #e2e3e5;
    color: #383d41;
}

.log-message {
    max-width: 400px;
    word-wrap: break-word;
}

/* Improved Context Display with collapsible details/summary */
.col323-int-context-details {
    margin-top: 10px;
}

.col323-int-context-summary {
    cursor: pointer;
    color: #0073aa;
    font-weight: 500;
    padding: 5px 0;
    font-size: 12px;
    outline: none;
}

.col323-int-context-summary:hover {
    color: #005a87;
}

.col323-int-context-summary::-webkit-details-marker {
    color: #0073aa;
}

.context-indicator {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

.col323-int-context-content {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-top: 8px;
    padding: 12px;
    max-width: 400px;
    max-height: 300px;
    overflow: auto;
}

.context-json {
    margin: 0;
    font-family: Monaco, Consolas, 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #2c3e50;
    background: none;
    border: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-references {
    font-size: 12px;
}

.log-references .reference {
    margin: 2px 0;
}

.log-references .reference strong {
    display: inline-block;
    min-width: 40px;
}

.log-references .reference a {
    color: #0073aa;
    text-decoration: none;
}

.log-references .reference a:hover {
    text-decoration: underline;
}

.no-context,
.no-references,
.no-logs {
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Log Management */
.col323-int-log-actions {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.clear-logs-form .form-table th {
    width: 200px;
}

/* Documentation */
.col323-int-documentation {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.col323-int-documentation ul {
    margin: 15px 0;
}

.col323-int-documentation li {
    margin: 8px 0;
}

/* Loading States */
.button.loading {
    position: relative;
    color: transparent !important;
}

.button.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Row highlighting for log levels */
.col323-int-logs-table tbody tr.log-level-error {
    border-left: 4px solid #d63638;
}

.col323-int-logs-table tbody tr.log-level-warning {
    border-left: 4px solid #dba617;
}

.col323-int-logs-table tbody tr.log-level-info {
    border-left: 4px solid #007cba;
}

.col323-int-logs-table tbody tr.log-level-debug {
    border-left: 4px solid #666;
}

/* v2.4.0 ADD START - Collapsible Section Toggles (COL323 Shipping reference pattern) */
.col323-section-header {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.col323-section-header + .col323-section-header {
    margin-top: 10px;
}

.col323-section-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
}

.col323-section-header-bar:hover {
    background: #f9f9f9;
}

.col323-section-header-bar h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    flex: 1;
}

.col323-section-header-bar .mw-section-summary {
    font-size: 13px;
    color: #666;
    margin-right: 15px;
    white-space: nowrap;
}

.col323-section-header-bar .mw-section-summary .mw-stat-synced {
    color: #00a32a;
}

.col323-section-header-bar .mw-section-summary .mw-stat-pending {
    color: #dba617;
}

.col323-section-header-bar .mw-section-summary .mw-stat-errors {
    color: #d63638;
}

/* Pill toggle slider */
.col323-section-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: #007cba;
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.col323-section-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    transform: translateX(16px);
}

.col323-section-collapsed .col323-section-toggle {
    background: #ccc;
}

.col323-section-collapsed .col323-section-toggle::after {
    transform: translateX(0);
}

/* Section body */
.col323-section-body {
    padding: 15px 20px 20px;
    border-top: 1px solid #eee;
}

.col323-section-collapsed .col323-section-body {
    display: none;
}

/* Section action buttons row */
.mw-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.mw-section-actions .button {
    font-size: 12px !important;
    line-height: 1.8 !important;
    min-height: 28px !important;
    padding: 0 10px !important;
}

/* Records Browser Container */
.mw-records-browser {
    margin-top: 10px;
}

/* Records Filter Bar */
.mw-records-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mw-records-filter-bar select,
.mw-records-filter-bar input[type="text"] {
    height: 30px;
    font-size: 13px;
    margin: 0;
}

.mw-records-filter-bar input[type="text"] {
    min-width: 180px;
}

.mw-records-filter-bar .button {
    height: 30px;
    line-height: 28px;
    font-size: 13px;
}

/* Records Selection Bar */
.mw-records-selection-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 8px;
}

.mw-records-selection-bar label {
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mw-records-selection-bar .mw-selected-count {
    font-size: 13px;
    color: #666;
}

.mw-records-selection-bar .mw-selected-count strong {
    color: #007cba;
}

.mw-records-selection-bar .button-primary {
    margin-left: auto;
}

/* Records Table */
.mw-records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mw-records-table thead th {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #50575e;
    white-space: nowrap;
}

.mw-records-table thead th.mw-col-checkbox {
    width: 30px;
    text-align: center;
}

.mw-records-table tbody td {
    border: 1px solid #dcdcde;
    padding: 6px 10px;
    vertical-align: middle;
}

.mw-records-table tbody td.mw-col-checkbox {
    text-align: center;
}

.mw-records-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.mw-records-table tbody tr:hover {
    background: #f0f6fc;
}

.mw-records-table tbody tr.mw-row-selected {
    background: #e8f0fe;
}

/* Status badges in records table */
.mw-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.mw-status-badge.mw-status-synced {
    background: #d1e7dd;
    color: #0f5132;
}

.mw-status-badge.mw-status-pending {
    background: #fff3cd;
    color: #664d03;
}

.mw-status-badge.mw-status-error,
.mw-status-badge.mw-status-failed {
    background: #f8d7da;
    color: #842029;
}

/* Records Pagination */
.mw-records-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    color: #50575e;
}

.mw-records-pagination .mw-pagination-info {
    color: #666;
}

.mw-records-pagination .mw-pagination-links {
    display: flex;
    gap: 4px;
}

.mw-records-pagination .mw-pagination-links a,
.mw-records-pagination .mw-pagination-links span {
    display: inline-block;
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    padding: 0 6px;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.mw-records-pagination .mw-pagination-links a:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.mw-records-pagination .mw-pagination-links span.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    cursor: default;
}

.mw-records-pagination .mw-pagination-links span.disabled {
    color: #a7aaad;
    cursor: default;
    border-color: #dcdcde;
}

/* Records loading/empty states */
.mw-records-loading {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-style: italic;
}

.mw-records-loading .spinner {
    float: none;
    margin: 0 8px 0 0;
    visibility: visible;
}

.mw-records-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.mw-records-error {
    text-align: center;
    padding: 15px 20px;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f1b0b7;
    border-radius: 4px;
}

/* Sync progress within records */
.mw-sync-progress {
    padding: 12px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
    margin-bottom: 12px;
}

.mw-sync-progress .mw-progress-bar {
    height: 6px;
    background: #dcdcde;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.mw-sync-progress .mw-progress-fill {
    height: 100%;
    background: #007cba;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.mw-sync-progress .mw-progress-text {
    font-size: 12px;
    color: #50575e;
}
/* v2.4.1 ADD START - Error cell styling + Log viewer modal */

/* Error cell in records table */
.mw-error-cell {
    color: #842029;
    font-size: 12px;
    max-width: 280px;
    word-wrap: break-word;
}

/* v2.5.3 ADD - Warning cell for synced records with stale errors */
.mw-warning-cell {
    color: #664d03;
    font-size: 12px;
    max-width: 280px;
    word-wrap: break-word;
    background: #fff3cd;
}

/* Log column */
.mw-col-log {
    text-align: center;
    width: 40px;
}

.mw-view-log-btn {
    text-decoration: none;
    cursor: pointer;
}

.mw-view-log-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.mw-view-log-btn:hover .dashicons {
    opacity: 0.7;
}

/* Log Viewer Modal Overlay */
.mw-log-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Log Viewer Modal */
.mw-log-modal {
    background: #fff;
    border-radius: 6px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.mw-log-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #dcdcde;
    flex-shrink: 0;
}

.mw-log-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
}

.mw-log-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
    line-height: 1;
}

.mw-log-modal-close:hover {
    color: #d63638;
}

.mw-log-modal-body {
    padding: 15px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.mw-log-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #dcdcde;
    color: #666;
    font-size: 12px;
    flex-shrink: 0;
}

/* Log table inside modal */
.mw-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mw-log-table thead th {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mw-log-table tbody td {
    border: 1px solid #dcdcde;
    padding: 6px 10px;
    vertical-align: top;
}

.mw-log-table .mw-log-time {
    white-space: nowrap;
    font-size: 12px;
    color: #666;
    width: 100px;
}

.mw-log-table .mw-log-msg {
    max-width: 300px;
    word-wrap: break-word;
}

.mw-log-table .mw-log-details {
    max-width: 300px;
}

/* Log level badges in modal */
.mw-log-level-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.mw-log-level-error .mw-log-level-badge,
.mw-log-level-badge.mw-log-level-error {
    background: #f8d7da;
    color: #842029;
}

.mw-log-level-warning .mw-log-level-badge,
.mw-log-level-badge.mw-log-level-warning {
    background: #fff3cd;
    color: #664d03;
}

.mw-log-level-info .mw-log-level-badge,
.mw-log-level-badge.mw-log-level-info {
    background: #d1ecf1;
    color: #0c5460;
}

.mw-log-level-debug .mw-log-level-badge,
.mw-log-level-badge.mw-log-level-debug {
    background: #e2e3e5;
    color: #383d41;
}

/* Error rows in log table */
.mw-log-table tr.mw-log-level-error {
    border-left: 3px solid #d63638;
}

/* Error detail text within log */
.mw-log-error-detail {
    color: #842029;
    font-weight: 500;
    padding: 4px 8px;
    background: #f8d7da;
    border-radius: 3px;
    margin-bottom: 6px;
    font-size: 12px;
    word-wrap: break-word;
}

/* Context details collapse in log */
.mw-log-context-details summary {
    cursor: pointer;
    color: #2271b1;
    font-size: 12px;
}

.mw-log-context-details summary:hover {
    text-decoration: underline;
}

.mw-log-context-json {
    font-family: Monaco, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    background: #f6f7f7;
    padding: 8px;
    border-radius: 3px;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 6px;
}

/* Empty log state */
.mw-log-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.mw-log-empty code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
}
/* v2.4.1 ADD END */

/* v2.4.2 ADD START - Record popup + clickable links + column filters + MW response detail */

/* Clickable record links in browse tables */
.mw-record-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.mw-record-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* MW response detail in log modal */
.mw-log-response-detail {
    color: #664d03;
    padding: 4px 8px;
    background: #fff3cd;
    border-radius: 3px;
    margin-bottom: 6px;
    font-size: 12px;
    word-wrap: break-word;
}

.mw-log-http-code {
    display: inline-block;
    padding: 2px 6px;
    background: #f0f0f1;
    border-radius: 3px;
    font-size: 11px;
    margin-bottom: 4px;
    color: #50575e;
}

/* Record preview iframe popup */
.mw-record-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mw-record-popup {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.mw-record-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #dcdcde;
    flex-shrink: 0;
    background: #f6f7f7;
    border-radius: 8px 8px 0 0;
}

.mw-record-popup-header h3 {
    margin: 0;
    font-size: 15px;
    color: #1d2327;
}

.mw-record-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mw-record-popup-actions .button {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.mw-record-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    color: #666;
    line-height: 1;
}

.mw-record-popup-close:hover {
    color: #d63638;
}

.mw-record-popup-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.mw-record-popup-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
}

.mw-record-popup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
    font-size: 14px;
    z-index: 1;
}

.mw-record-popup-loading .spinner {
    float: none;
    margin: 0 auto 10px;
    display: block;
}

/* Per-column filter row in records table */
.mw-records-table thead tr.mw-column-filters th {
    padding: 4px 6px;
    background: #f0f0f1;
    border-bottom: 2px solid #c3c4c7;
}

.mw-records-table thead tr.mw-column-filters input {
    width: 100%;
    padding: 3px 6px;
    font-size: 12px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    box-sizing: border-box;
}

.mw-records-table thead tr.mw-column-filters input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.mw-records-table thead tr.mw-column-filters input::placeholder {
    color: #a7aaad;
    font-style: italic;
}

/* Column sort indicators */
.mw-records-table thead th.mw-sortable {
    cursor: pointer;
    user-select: none;
}

.mw-records-table thead th.mw-sortable:hover {
    background: #e8e8e8;
}

.mw-records-table thead th.mw-sortable:after {
    content: ' \2195';
    font-size: 10px;
    color: #999;
}

/* v2.5.3 ADD - Sort direction indicators */
.mw-records-table thead th.mw-sortable.mw-sort-asc:after {
    content: ' \2191';
    color: #2271b1;
}
.mw-records-table thead th.mw-sortable.mw-sort-desc:after {
    content: ' \2193';
    color: #2271b1;
}
.mw-records-table thead th.mw-sortable.mw-sort-asc,
.mw-records-table thead th.mw-sortable.mw-sort-desc {
    background: #e8f0fe;
}
/* v2.5.3 ADD END */

/* v2.4.2 ADD END */

/* v2.4.0 ADD END */

/* v2.5.0 ADD START - MW product type badges in records browser */
.mw-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.mw-type-badge.mw-type-product { background: #d1e7dd; color: #0f5132; }
.mw-type-badge.mw-type-resource { background: #d1ecf1; color: #0c5460; }
.mw-type-badge.mw-type-time { background: #fff3cd; color: #664d03; }
.mw-type-badge.mw-type-shipping { background: #e2e3e5; color: #383d41; }
.mw-type-badge.mw-type-other { background: #f8d7da; color: #842029; }
/* v2.5.0 ADD END */

/* Responsive design */
@media (max-width: 768px) {
    .col323-int-sync-status .sync-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .col323-int-status-overview .status-cards {
        flex-direction: column;
        gap: 15px;
    }
    
    .sync-buttons,
    .quick-action-buttons {
        flex-direction: column;
    }
    
    .sync-buttons .button,
    .quick-action-buttons .button {
        width: 100%;
        text-align: center;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-row label {
        min-width: auto;
    }

    /* v2.4.0 ADD - Responsive records browser */
    .mw-records-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .mw-records-filter-bar input[type="text"] {
        min-width: auto;
        width: 100%;
    }

    .mw-records-selection-bar {
        flex-wrap: wrap;
    }

    .mw-records-table {
        font-size: 12px;
    }

    .mw-records-pagination {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Admin notices integration */
.notice.col323-int-notice {
    position: relative;
    padding-left: 50px;
}

.notice.col323-int-notice:before {
    content: '';
    position: absolute;
    left: 15px;
    top: 15px;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M12 6v6l4 2"/></svg>');
    background-size: contain;
}

/* Password Toggle Buttons */
.col323-int-password-toggle {
    margin-left: 8px !important;
    font-size: 12px !important;
    min-width: 50px !important;
    height: 28px !important;
    vertical-align: middle !important;
}

.col323-int-password-toggle:hover {
    background-color: #f0f0f1 !important;
}

.col323-int-password-toggle:focus {
    box-shadow: 0 0 0 1px #0073aa !important;
}

/* Ensure password fields and toggle buttons are aligned */
input[type="password"] + .col323-int-password-toggle,
input[type="text"].password-revealed + .col323-int-password-toggle {
    display: inline-block;
    vertical-align: middle;
}

/* Reset Sync Status Section */
.reset-sync-status {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    border-left: 4px solid #d63638;
}

.reset-sync-status h3 {
    margin: 0 0 15px 0;
    color: #d63638;
    font-weight: 600;
}

.reset-sync-status .description {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
    color: #664d03;
    font-size: 14px;
}

.reset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.reset-buttons .button {
    font-weight: 600;
    border-width: 2px;
    transition: all 0.2s ease;
}

.reset-buttons .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reset-buttons .button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reset-results {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.reset-results.success {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.reset-results.error {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.reset-results .notice {
    margin: 0;
    padding: 12px;
}