/* Webmaster Central Hub Admin CSS */

.webmaster-hub-wrap {
    margin: 20px 20px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.hub-title {
    font-size: 24px;
    font-weight: 600;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-title .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #dc2626;
}

.hub-version {
    font-size: 12px;
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.hub-stat-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hub-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: #94a3b8;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #0284c7;
    line-height: 1.1;
}

.stat-num.online-num {
    color: #16a34a;
}

.stat-num.api-error-num {
    color: #e11d48;
}

.stat-num.offline-num {
    color: #dc2626;
}

.stat-num.maint-num {
    color: #ea580c;
}

.stat-num.update-num {
    color: #d97706;
}

.stat-num.inactive-num {
    color: #64748b;
}

.hub-maint-active-badge {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.1);
}

.hub-btn-maint.hub-btn-maint-active {
    background: #ea580c !important;
    border-color: #c2410c !important;
    color: #ffffff !important;
}

.hub-btn-maint.hub-btn-maint-active:hover {
    background: #c2410c !important;
    border-color: #9a3412 !important;
}

.stat-lbl {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 5px;
}

.hub-main-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.hub-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.hub-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-card-header h3 .dashicons {
    color: #dc2626;
}

.js-apply-bulk-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    vertical-align: middle !important;
}

.js-apply-bulk-actions .dashicons {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
}

.hub-card-body {
    padding: 20px;
}

.hub-table {
    margin-top: 10px;
}

.hub-table td .button-small {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 26px !important;
    padding: 0 4px !important;
    vertical-align: middle !important;
}

.hub-table td .button-small .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
    margin: 0 !important;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-critical {
    background: #fee2e2;
    color: #991b1b;
}

.notice-area {
    margin-top: 15px;
}

/* Category Health Badges */
.health-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}
.health-badge.badge-good {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.health-badge.badge-warn {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fef08a;
}
.health-badge.badge-bad {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Detailed Site Modal (Go Bag Check - Health Index & Diagnostic Details) */
.hub-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: rgba(15, 23, 42, 0.75) !important;
    z-index: 2147483647 !important; /* Highest valid 32-bit signed int z-index, guaranteed on top of all page divs, menus, and headers */
    display: none; /* Hidden by default - do not use !important here so script toggling works */
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    box-sizing: border-box !important;
    isolation: isolate !important;
}

/* Explicitly enforce display:none when modal is hidden inline or closed */
.hub-modal-overlay[style*="display: none"],
.hub-modal-overlay[style*="display:none"] {
    display: none !important;
}

.hub-modal-content {
    position: relative !important;
    z-index: 2147483647 !important;
    background: #fff;
    border-radius: 12px;
    width: 95%;
    max-width: 1250px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.hub-modal-header {
    background: #0f172a;
    color: #fff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.hub-modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.hub-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.hub-modal-close:hover {
    color: #fff;
}

.hub-modal-body {
    padding: 24px;
}

.modal-scores-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.modal-score-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
}

.modal-score-num {
    font-size: 24px;
    font-weight: 800;
}

.modal-score-num.high { color: #16a34a; }
.modal-score-num.mid { color: #d97706; }
.modal-score-num.low { color: #dc2626; }

.modal-score-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 4px;
}

.modal-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

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

.dashicons.spin, .spin {
    animation: webmasterSpin 1.2s infinite linear !important;
    display: inline-block;
}

.webmaster-ai-progress-card {
    background: #0f172a !important;
    border: 2px solid #0284c7 !important;
    border-radius: 10px !important;
    padding: 22px !important;
    margin: 15px 0 !important;
    color: #ffffff !important;
    text-align: center !important;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==========================================================================
   Front-End Shortcode & Theme Compatibility Styles
   ========================================================================== */

.webmaster-hub-wrap.webmaster-hub-frontend {
    margin: 20px auto;
    max-width: none !important;
    width: 100% !important;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

.webmaster-hub-wrap.webmaster-hub-frontend *,
.webmaster-hub-wrap.webmaster-hub-frontend *:before,
.webmaster-hub-wrap.webmaster-hub-frontend *:after {
    box-sizing: border-box;
}

/* Unified Centered Button Styles for Hub Admin, Front-End & Modals */
.webmaster-hub-wrap .button,
.webmaster-hub-wrap button.button,
.webmaster-hub-wrap a.button,
.hub-modal-content .button,
.hub-modal-content button.button,
.hub-modal-content a.button,
.modal-actions-bar .button,
.hub-header-actions .button,
.hub-bulk-actions-bar .button,
.webmaster-hub-auth-card .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
    height: 32px !important;
    min-height: 32px !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* All Buttons Hover Red */
.webmaster-hub-wrap .button:hover,
.webmaster-hub-wrap button.button:hover,
.webmaster-hub-wrap a.button:hover,
.hub-modal-content .button:hover,
.hub-modal-content button.button:hover,
.hub-modal-content a.button:hover,
.modal-actions-bar .button:hover,
.hub-header-actions .button:hover,
.hub-bulk-actions-bar .button:hover,
.webmaster-hub-auth-card .button:hover,
.webmaster-hub-wrap .button-primary:hover,
.hub-modal-content .button-primary:hover,
.modal-actions-bar .button-primary:hover,
.webmaster-hub-auth-card .button-primary:hover,
.webmaster-hub-wrap .button-secondary:hover,
.hub-modal-content .button-secondary:hover,
.modal-actions-bar .button-secondary:hover,
.webmaster-hub-auth-card .button-secondary:hover,
.hub-table td .button-small:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #b91c1c !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25) !important;
}

.webmaster-hub-wrap .button:hover .dashicons,
.webmaster-hub-wrap button.button:hover .dashicons,
.webmaster-hub-wrap a.button:hover .dashicons,
.hub-modal-content .button:hover .dashicons,
.modal-actions-bar .button:hover .dashicons,
.hub-header-actions .button:hover .dashicons,
.hub-bulk-actions-bar .button:hover .dashicons,
.webmaster-hub-auth-card .button:hover .dashicons,
.hub-table td .button-small:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .button:active,
.hub-modal-content .button:active,
.modal-actions-bar .button:active {
    background: #b91c1c !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

.webmaster-hub-wrap .button-primary,
.hub-modal-content .button-primary,
.modal-actions-bar .button-primary,
.webmaster-hub-auth-card .button-primary {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0369a1 !important;
}

.webmaster-hub-wrap .button-secondary,
.hub-modal-content .button-secondary,
.modal-actions-bar .button-secondary,
.webmaster-hub-auth-card .button-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.webmaster-hub-wrap .button-large,
.hub-modal-content .button-large,
.modal-actions-bar .button-large,
.webmaster-hub-auth-card .button-large {
    height: 38px !important;
    min-height: 38px !important;
    line-height: 1 !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    gap: 8px !important;
}

.webmaster-hub-wrap .button-small,
.hub-modal-content .button-small {
    height: 28px !important;
    min-height: 28px !important;
    line-height: 1 !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    gap: 4px !important;
}

/* Perfect Dashicon Alignment & Centering Inside Buttons */
.webmaster-hub-wrap .button .dashicons,
.webmaster-hub-wrap button.button .dashicons,
.webmaster-hub-wrap a.button .dashicons,
.hub-modal-content .button .dashicons,
.hub-modal-content button.button .dashicons,
.hub-modal-content a.button .dashicons,
.modal-actions-bar .button .dashicons,
.hub-header-actions .button .dashicons,
.hub-bulk-actions-bar .button .dashicons,
.webmaster-hub-auth-card .button .dashicons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    position: static !important;
    top: auto !important;
    float: none !important;
    transform: none !important;
}

.webmaster-hub-wrap .button .dashicons:before,
.webmaster-hub-wrap button.button .dashicons:before,
.webmaster-hub-wrap a.button .dashicons:before,
.hub-modal-content .button .dashicons:before,
.hub-modal-content button.button .dashicons:before,
.hub-modal-content a.button .dashicons:before,
.modal-actions-bar .button .dashicons:before,
.hub-header-actions .button .dashicons:before,
.hub-bulk-actions-bar .button .dashicons:before,
.webmaster-hub-auth-card .button .dashicons:before {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    font-size: inherit !important;
    margin: 0 !important;
}

.webmaster-hub-wrap .button-large .dashicons,
.hub-modal-content .button-large .dashicons,
.modal-actions-bar .button-large .dashicons,
.webmaster-hub-auth-card .button-large .dashicons {
    font-size: 19px !important;
    width: 19px !important;
    height: 19px !important;
}

.webmaster-hub-wrap .button-small .dashicons,
.hub-modal-content .button-small .dashicons {
    font-size: 15px !important;
    width: 15px !important;
    height: 15px !important;
}

/* Responsive Table Wrapper & Fluid Layout */
.webmaster-hub-wrap .hub-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: #ffffff;
}

/* Standalone & Admin Table Styling */
.webmaster-hub-wrap table.wp-list-table,
.webmaster-hub-wrap table.hub-table {
    width: 100% !important;
    min-width: 780px;
    table-layout: auto !important;
    border-collapse: collapse !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    font-size: 13px !important;
    margin: 0 !important;
}

.webmaster-hub-wrap table.hub-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: left !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap;
}

.webmaster-hub-wrap table.hub-table td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    color: #1e293b !important;
}

.webmaster-hub-wrap table.hub-table tr:hover td {
    background: #f8fafc !important;
}

/* Specific Column Sizing to Fit on One Screen */
.webmaster-hub-wrap table.hub-table th.col-cb,
.webmaster-hub-wrap table.hub-table td.col-cb {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 10px 4px !important;
    text-align: center;
}

.webmaster-hub-wrap table.hub-table th.col-site,
.webmaster-hub-wrap table.hub-table td.col-site {
    min-width: 160px;
}

.webmaster-hub-wrap table.hub-table th.col-status,
.webmaster-hub-wrap table.hub-table td.col-status {
    width: 150px;
    min-width: 150px;
    white-space: nowrap;
}

.hub-key-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
}
.hub-key-status.hub-key-connected {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.hub-key-status.hub-key-disconnected {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.hub-key-status.hub-key-missing {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.hub-key-status.hub-key-html {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.webmaster-hub-wrap table.hub-table th.col-health,
.webmaster-hub-wrap table.hub-table td.col-health {
    min-width: 160px;
}

.webmaster-hub-wrap table.hub-table th.col-maint,
.webmaster-hub-wrap table.hub-table td.col-maint {
    min-width: 130px;
}

.webmaster-hub-wrap table.hub-table th.col-server,
.webmaster-hub-wrap table.hub-table td.col-server {
    min-width: 140px;
}

.webmaster-hub-wrap table.hub-table th.col-actions,
.webmaster-hub-wrap table.hub-table td.col-actions {
    min-width: 175px;
    text-align: right;
    white-space: nowrap;
}

/* Site Cell */
.hub-site-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hub-site-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.hub-site-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.hub-plugin-version-pill {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.hub-plugin-version-pill.hub-version-pending {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
}
.hub-site-url-wrap a {
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s ease;
}
.hub-site-url-wrap a:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.status-badge .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.badge-active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.badge-active .status-indicator {
    background: #10b981;
}
.badge-critical {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.badge-critical .status-indicator {
    background: #ef4444;
}

/* Health Summary & Category Breakdown */
.hub-health-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hub-health-summary.js-view-site-details {
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px;
    margin: -4px -6px;
    transition: background 0.15s ease-in-out, transform 0.1s ease-in-out;
}
.hub-health-summary.js-view-site-details:hover {
    background: #f1f5f9;
}
.hub-health-summary.js-view-site-details:hover .health-badge {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.hub-mini-scores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 11px;
    line-height: 1.3;
}

/* Software & Maintenance Pills */
.hub-maint-summary {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hub-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
    line-height: 1.3;
}
.hub-tag-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.hub-tag-ok {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.hub-tag-inactive {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.hub-tag-subtle {
    color: #94a3b8;
    font-size: 10px;
    padding-left: 2px;
}

/* Server & Sync Summary */
.hub-server-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
}
.hub-server-env {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.hub-php-pill {
    background: #f1f5f9;
    color: #334155;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 10px;
}
.hub-ram-meta {
    color: #64748b;
    font-size: 11px;
}
.hub-server-sync {
    color: #94a3b8;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* Action Buttons Cluster */
.hub-action-cluster {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex-wrap: wrap;
}

.webmaster-hub-wrap .hub-table td .button-small {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    padding: 0 !important;
    margin: 1px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #475569 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: all 0.15s ease !important;
}

.webmaster-hub-wrap .hub-table td .button-small .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    color: #475569 !important;
    margin: 0 !important;
    transition: color 0.15s ease !important;
}

/* Individual Button Differentiated Hovers */
.webmaster-hub-wrap .hub-table td .hub-btn-sso:hover {
    background: #0284c7 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-sso:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-view:hover {
    background: #4f46e5 !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-view:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-edit:hover {
    background: #0284c7 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-edit:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-refresh:hover {
    background: #0d9488 !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-refresh:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-update:hover {
    background: #d97706 !important;
    border-color: #b45309 !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-update:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-activate:hover {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-activate:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-maint:hover {
    background: #ea580c !important;
    border-color: #c2410c !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-maint:hover .dashicons {
    color: #ffffff !important;
}

.webmaster-hub-wrap .hub-table td .hub-btn-delete:hover {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}
.webmaster-hub-wrap .hub-table td .hub-btn-delete:hover .dashicons {
    color: #ffffff !important;
}

/* Standalone Form Styling for Front-End */
.webmaster-hub-wrap .form-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 10px !important;
}

.webmaster-hub-wrap .form-table th {
    width: 220px !important;
    vertical-align: top !important;
    text-align: left !important;
    padding: 14px 10px 14px 0 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #1e293b !important;
}

.webmaster-hub-wrap .form-table td {
    padding: 10px 0 !important;
    vertical-align: middle !important;
}

.webmaster-hub-wrap input[type="text"],
.webmaster-hub-wrap input[type="url"],
.webmaster-hub-wrap input[type="email"],
.webmaster-hub-wrap select,
.webmaster-hub-wrap textarea {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.webmaster-hub-wrap input:focus,
.webmaster-hub-wrap select:focus,
.webmaster-hub-wrap textarea:focus {
    outline: none !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.webmaster-hub-wrap input.large-text,
.webmaster-hub-wrap textarea.large-text {
    width: 100% !important;
    max-width: 650px !important;
}

.webmaster-hub-wrap input.regular-text {
    width: 100% !important;
    max-width: 380px !important;
}

.webmaster-hub-wrap .description {
    color: #64748b !important;
    font-size: 12px !important;
    margin: 6px 0 0 0 !important;
    line-height: 1.5 !important;
}

/* Front-End Notice Boxes */
.webmaster-hub-wrap .notice {
    position: relative !important;
    padding: 12px 36px 12px 16px !important;
    border-left: 4px solid #cbd5e1 !important;
    background: #f8fafc !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
    font-size: 13px !important;
}

.webmaster-hub-wrap .notice-success {
    border-left-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.webmaster-hub-wrap .notice-error {
    border-left-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* Notice Dismiss Button Styling & Dashicon Rendering */
.webmaster-hub-wrap .notice .notice-dismiss,
.hub-modal-content .notice .notice-dismiss,
.notice-area .notice .notice-dismiss,
button.notice-dismiss {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    transform: translateY(-50%) !important;
    border: none !important;
    margin: 0 !important;
    padding: 6px !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #64748b !important;
    cursor: pointer !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    min-width: 28px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
    text-decoration: none !important;
}

.webmaster-hub-wrap .notice .notice-dismiss:before,
.hub-modal-content .notice .notice-dismiss:before,
.notice-area .notice .notice-dismiss:before,
button.notice-dismiss:before {
    content: "\f153" !important;
    font-family: dashicons !important;
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
    display: inline-block !important;
    text-align: center !important;
    color: #64748b !important;
    speak: never !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.webmaster-hub-wrap .notice .notice-dismiss:hover,
.hub-modal-content .notice .notice-dismiss:hover,
.notice-area .notice .notice-dismiss:hover,
button.notice-dismiss:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.webmaster-hub-wrap .notice .notice-dismiss:hover:before,
.hub-modal-content .notice .notice-dismiss:hover:before,
.notice-area .notice .notice-dismiss:hover:before,
button.notice-dismiss:hover:before {
    color: #dc2626 !important;
}

/* Front-End Authentication & Permissions Card */
.webmaster-hub-auth-card {
    max-width: 520px;
    margin: 50px auto;
    padding: 36px 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.webmaster-hub-auth-card .auth-icon {
    font-size: 52px;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px auto;
    color: #dc2626;
    display: block;
}

.webmaster-hub-auth-card h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.webmaster-hub-auth-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .webmaster-hub-wrap .hub-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 768px) {
    .webmaster-hub-wrap .hub-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 900px) {
    .webmaster-hub-wrap .hub-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .webmaster-hub-wrap .hub-card-header > div {
        flex-wrap: wrap !important;
    }
    .modal-scores-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 860px) {
    .hub-bulk-actions-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .hub-bulk-left,
    .hub-bulk-right {
        width: 100% !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
    .hub-bulk-left select,
    .hub-bulk-right input,
    .hub-bulk-right select {
        flex: 1 1 180px !important;
        max-width: none !important;
    }
}

@media (max-width: 768px) {
    .webmaster-hub-wrap table.hub-table,
    .webmaster-hub-wrap table.hub-table thead,
    .webmaster-hub-wrap table.hub-table tbody,
    .webmaster-hub-wrap table.hub-table tr,
    .webmaster-hub-wrap table.hub-table th,
    .webmaster-hub-wrap table.hub-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    .webmaster-hub-wrap table.hub-table {
        min-width: 0 !important;
        border: none !important;
        background: transparent !important;
    }
    .webmaster-hub-wrap table.hub-table thead {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
        visibility: hidden !important;
    }
    .webmaster-hub-wrap table.hub-table tr {
        position: relative !important;
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    }
    .webmaster-hub-wrap table.hub-table td {
        padding: 8px 0 !important;
        border-bottom: 1px dashed #f1f5f9 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-align: right !important;
    }
    .webmaster-hub-wrap table.hub-table td:last-child {
        border-bottom: none !important;
        padding-top: 10px !important;
    }
    .webmaster-hub-wrap table.hub-table td:before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.04em;
        text-align: left;
        margin-right: 12px;
        flex-shrink: 0;
    }
    .webmaster-hub-wrap table.hub-table td.col-cb {
        border-bottom: none !important;
        padding: 0 !important;
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        width: auto !important;
        height: auto !important;
        z-index: 2 !important;
        justify-content: flex-end !important;
    }
    .webmaster-hub-wrap table.hub-table td.col-cb:before {
        content: none !important;
    }
    .webmaster-hub-wrap table.hub-table td.col-site {
        padding-right: 36px !important;
        text-align: left !important;
        align-items: flex-start !important;
        flex-direction: column !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 10px !important;
        margin-bottom: 4px !important;
    }
    .webmaster-hub-wrap table.hub-table td.col-site:before {
        margin-bottom: 2px;
    }
    .webmaster-hub-wrap table.hub-table td.col-actions {
        justify-content: flex-end !important;
    }
    .webmaster-hub-wrap table.hub-table td.col-actions:before {
        content: none !important;
    }
    .webmaster-hub-wrap table.hub-table td.col-actions .hub-action-cluster {
        width: 100% !important;
        justify-content: flex-end !important;
    }
    .webmaster-hub-wrap table.hub-table td[colspan] {
        display: block !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .webmaster-hub-wrap table.hub-table td[colspan]:before {
        content: none !important;
    }
}

@media (max-width: 600px) {
    .webmaster-hub-wrap .hub-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 520px) {
    .modal-scores-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Hub WCAG 2.1 & Accessibility Section */
.hub-wcag-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.hub-wcag-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.hub-wcag-card.critical {
    border-left: 5px solid #ef4444;
}

.hub-wcag-card.warning {
    border-left: 5px solid #f59e0b;
}

/* --- Asynchronous Background Telemetry Sync Progress Bar --- */
.hub-sync-progress-card {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #0284c7;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px -2px rgba(2, 132, 199, 0.08);
    transition: all 0.3s ease;
}

.hub-sync-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.hub-sync-progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0369a1;
    font-size: 14px;
}

.hub-sync-progress-title .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #0284c7;
}

.hub-sync-progress-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-sync-status-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.hub-sync-percent-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 34px;
    text-align: center;
}

.hub-sync-progress-track {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
}

.hub-sync-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981);
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s ease;
}

.hub-sync-progress-footer {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hub-sync-detail-text {
    font-size: 11.5px;
    color: #94a3b8;
}

.hub-sync-progress-card.is-complete {
    border-color: #86efac;
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.hub-sync-progress-card.is-complete .hub-sync-progress-title {
    color: #15803d;
}

.hub-sync-progress-card.is-complete .hub-sync-progress-title .dashicons {
    color: #16a34a;
}

.hub-sync-progress-card.is-complete .hub-sync-percent-badge {
    background: #dcfce7;
    color: #15803d;
}

.hub-sync-progress-card.is-complete .hub-sync-progress-fill {
    background: #16a34a;
}

.hub-sync-progress-card.is-error {
    border-color: #fca5a5;
    border-left-color: #dc2626;
    background: #fef2f2;
}

.hub-sync-progress-card.is-error .hub-sync-progress-title {
    color: #991b1b;
}

.hub-sync-progress-card.is-error .hub-sync-progress-title .dashicons {
    color: #dc2626;
}

.hub-sync-progress-card.is-error .hub-sync-percent-badge {
    background: #fee2e2;
    color: #991b1b;
}

.hub-sync-progress-card.is-error .hub-sync-progress-fill {
    background: #dc2626;
}

/* Row updated highlight animation */
@keyframes hubRowPulse {
    0% { background-color: #f0fdf4; }
    50% { background-color: #dcfce7; }
    100% { background-color: transparent; }
}

tr.hub-row-synced {
    animation: hubRowPulse 1.8s ease-out;
}


