.page-title {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
    margin: 2rem 0 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    position: relative;
    transition: color 0.3s ease;
    /* ensure smooth hover effect */
}

.page-title::after {
    content: "";
    display: block;
    /* width: 60px; */
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #00c4ff);
    margin: 0.75rem auto 0;
    border-radius: 2px;
    transition: background 0.3s ease;
    /* allow hover animation */
}

.page-title:hover {
    color: #0073aa;
    /* text color changes */
}

.page-title:hover::after {
    background: linear-gradient(90deg, #00c4ff, #0073aa);
    /* underline shifts */
}

/* Container Spacing & Alignment (Desktop) */
.system-info-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    align-items: center;
}

/* Base Button Style */
.system-info-actions .button {
    border: none !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    /* Reduced padding to fit 3 in a row */
    height: auto !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none !important;
    font-size: 13px;
    /* Slightly smaller font for mobile fit */
    white-space: nowrap;
    /* Prevents text from breaking into two lines */
    transition: background 0.3s, transform 0.2s;
}

.system-info-actions .button:hover {
    transform: scale(1.05);
}

/* Colors */
#refresh-system-info {
    background-color: #3b82f6 !important;
}

#copy-system-info {
    background-color: #6366f1 !important;
}

.system-info-actions a.button {
    background-color: #10b981 !important;
}

/* --- MOBILE 3-COLUMN LAYOUT --- */
@media screen and (max-width: 600px) {
    .system-info-actions {
        display: grid !important;
        /* Switch from flex to grid */
        grid-template-columns: repeat(3, 1fr) !important;
        /* Force 3 equal columns */
        gap: 8px;
        /* Smaller gap to save space */
        width: 100%;
    }

    .system-info-actions .button {
        width: 100% !important;
        padding: 10px 5px !important;
        /* Minimal horizontal padding */
        font-size: 11px;
        /* Smaller text so it fits in the column */
        min-width: 0;
        /* Allows buttons to shrink below content size if needed */
    }
}

/* Container Spacing */
.patchwing-dashboard {
    margin-top: 20px;
    /* max-width: 1200px; Optional: keeps the dashboard from getting too wide on ultrawide monitors */
}

/* Feature Grid Layout */
.feature-grid {
    display: grid;
    /* This line makes it responsive: 
       It will fit as many cards as it can with a minimum width of 280px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Individual Card Styling */
.feature-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensures all cards in a row are equal height */
}

/* Card Elements */
.feature-card .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
}

.card-title {
    margin: 0 0 12px 0 !important;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d2327;
}

.card-description {
    font-size: 14px;
    line-height: 1.6;
    color: #50575e;
    margin-bottom: 24px;
    flex-grow: 1;
    /* Pushes the button to the very bottom */
}

/* Button Styling */
.btn-go {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 36px !important;
    padding: 0 20px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    background: #2563eb !important;
}

.btn-go:hover {
    background: #1e4edc !important;
}

/* Horizontal Divider */
.wp-header-end {
    margin: 40px 0 10px;
    border: 0;
    border-top: 1px solid #dcdcde;
}

/* sysrem info */

/* Layout */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card */
.system-info-grid .card {
    background: #ffffff;
    color: #1d2327;
    padding: 20px 22px;
    border-radius: 10px;
    border: 1px solid #dcdcde;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.system-info-grid .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Card Headings */
.system-info-grid .card h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #e2e4e7;
    padding-bottom: 8px;
}

/* Text */
.system-info-grid .card p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.system-info-grid .card p strong {
    font-weight: 600;
    color: #23282d;
}

.system-info-grid .card small {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-size: 12px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

/* Status Colors (Soft & Accessible) */
.badge.excellent {
    background: #e7f6ec;
    color: #0f6d3f;
    border: 1px solid #b7e3c8;
}

.badge.moderate {
    background: #fff4e5;
    color: #8a5200;
    border: 1px solid #ffd59e;
}

.badge.high {
    background: #fdeaea;
    color: #a40000;
    border: 1px solid #f5b5b5;
}

/* Dark admin compatibility */
@media (prefers-color-scheme: dark) {
    .system-info-grid .card {
        background: #1f2328;
        color: #e5e7eb;
        border-color: #30363d;
    }

    .system-info-grid .card h2 {
        color: #f0f6fc;
        border-bottom-color: #30363d;
    }

    .system-info-grid .card p strong {
        color: #f0f6fc;
    }

    .system-info-grid .card small {
        color: #9da7b3;
    }
}

.db-table-container {
    max-width: 100%;
    overflow-x: auto;
    margin-top: 0px;
}

table.db-tables {
    width: 100%;
    border-collapse: collapse;
}

table.db-tables th,
table.db-tables td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

table.db-tables th.table-name,
table.db-tables td.table-name {
    text-align: left;
}

table.db-tables th {
    background-color: #2563eb;
    color: #fff;
}

.btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn-convert {
    background-color: #fd7e14;
    color: #fff;
}

.btn-convert-all {
    background-color: #fd7e14;
    color: #000;
}

.btn-backup {
    background-color: #6610f2;
    color: #fff;
    margin-left: 5px;
    margin-bottom: 10px;
}

.success-message {
    margin-top: 10px;
    padding: 10px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    display: none;
}

.spinner {
    display: none;
    margin-top: 10px;
}

.spinner img {
    width: 32px;
    height: 32px;
}

.pagination {
    margin-top: 15px;
    text-align: center;
}

.pagination a,
.pagination span {
    margin: 0 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
}

.pagination .disabled {
    color: #999;
    background: #f5f5f5;
    cursor: not-allowed;
}

.pagination .current {
    background: #2563eb;
    color: #fff;
}


.debug-wrap {
    /* background: #f2f4ff; */
    padding: 20px;
    /* border-radius: 14px; */
}

.top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.top-bar-form {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: #2563eb;
}

.btn-danger {
    background: #ef4444;
}

.search-form {
    max-width: 300px;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.info-box {
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    font-size: 14px;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.file-info {
    flex-wrap: wrap;
    gap: 20px;
}

.info-item {
    flex: 1;
    min-width: 200px;
}

.highlight {
    color: #2563eb;
}

.range-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.range-btn {
    padding: 6px 14px;
    border-radius: 10px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: 13px;
}

.range-btn.active {
    background: #2563eb;
    color: #fff;
}

.table-container {
    overflow-x: auto;
}

.debug-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 900px;
}

.debug-table td {
    padding: 8px;
    background: #fff;
}

.debug-table td:first-child {
  white-space: nowrap;
  padding: 6px 12px;
}

.debug-table tr {
    font-size: 13px;
    color: #6b7280;
    text-align: left;
}

.pagination {
    margin-top: 16px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
}

.page-btn.active {
    background: #2563eb;
    color: #fff;
}

.page-btn.disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
}


.pa-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.pa-btn {
    flex: 1 1 auto;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600 !important;
    transition: background 0.3s ease, transform 0.2s ease;
}

.pa-btn:hover {
    transform: scale(1.05);
}

.pa-refresh {
    background: #2563eb;
}

.pa-refresh:hover {
    background: #1e4ed8;
}

.pa-clear {
    background: #ef4444;
}

.pa-clear:hover {
    background: #dc2626;
}

/* Responsive: keep buttons in one row */
@media (max-width: 600px) {
    .pa-btn-group {
        flex-direction: row;
        justify-content: space-between;
    }

    .pa-btn {
        flex: 1 1 48%;
        font-size: 16px;
    }
}

#pa-results {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
}

#pa-results p {
    font-size: 14px;
    margin: 5px 0;
}

#pa-refresh,
#pa-clear {
    margin-right: 10px;
}


/* Dashboard styling */
.php-dashboard {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    margin: 30px 0;
    color: #333;
}

.php-dashboard h2 {
    background: #2563eb;
    color: #fff;
    padding: 12px 16px;
    margin: 0 0 10px;
    font-size: 18px;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.php-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.php-dashboard th {
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    word-break: auto-phrase;
    background: #f9f9f9;
    font-weight: 600;
    color: #444;
}

.php-dashboard td {
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
    word-break: break-word;
}

.php-dashboard tr:nth-child(even) td {
    background: #fcfcfc;
}

.php-dashboard tr:hover td {
    background: #f1faff;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .php-dashboard h2 {
        font-size: 16px;
        padding: 10px 14px;
    }

    .php-dashboard th,
    .php-dashboard td {
        font-size: 13px;
        padding: 8px 10px;
    }
}

@media (max-width: 600px) {
    .php-dashboard table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .php-dashboard th,
    .php-dashboard td {
        min-width: 140px;
    }
}