/* Tam Rank™ Admin Styles */
/* variables.css is nu een enqueued handle (tamrank-variables via de admin-global keten). */

/* ─── TamRank Admin Design System ──────────────────────────────── */
/* Plus Jakarta Sans is bundled locally and declared via @font-face in
   common/variables.css (imported above) — no remote font load. */

:root {
    /* Kleuren */
    --tr-primary: #10b981;
    --tr-primary-hover: #059669;
    --tr-primary-light: rgba(16, 185, 129, 0.10);
    --tr-dark: #1e293b;
    --tr-slate-700: #334155;
    --tr-slate-600: #475569;
    --tr-slate-500: #64748b;
    --tr-slate-400: #94a3b8;
    --tr-slate-200: #e2e8f0;
    --tr-base: #F5F4F2;
    --tr-surface: #ECEAE7;
    --tr-white: #ffffff;

    /* Status kleuren */
    /* TODO: Phase 10 — remove shorthand aliases below; still referenced by remaining admin.css rules */
    --tr-warning: #f59e0b;
    --tr-warning-bg: rgba(245, 158, 11, 0.08);
    --tr-error: #f43f5e;
    --tr-error-bg: rgba(244, 63, 94, 0.08);
    --tr-success: #10b981;
    --tr-success-bg: rgba(16, 185, 129, 0.08);

    /* Schaduwen & vorm */
    --tr-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --tr-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.10);
    --tr-radius: 12px;
    --tr-radius-sm: 8px;
    --tr-radius-xs: 6px;

    /* Spacing */
    --tr-space-xs: 4px;
    --tr-space-sm: 8px;
    --tr-space-md: 16px;
    --tr-space-lg: 24px;
    --tr-space-xl: 32px;
    --tr-space-2xl: 48px;

    /* Typografie */
    --tr-font: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --tr-text-xs: 11px;
    --tr-text-sm: 13px;
    --tr-text-base: 14px;
    --tr-text-md: 15px;
    --tr-text-lg: 18px;
    --tr-text-xl: 22px;
    --tr-text-2xl: 28px;

    /* Transitions */
    --tr-transition: all 0.2s ease;
}

/* ─── Layout wrapper ─────────────────────────────────────────── */
.tr-settings-wrap {
    font-family: var(--tr-font);
    background: var(--tr-base);
    padding: var(--tr-space-xl) 0;
    min-height: 100vh;
    color: var(--tr-dark);
}

.tr-settings-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--tr-space-6);
}

/* ─── Paginatitel ─────────────────────────────────────────────── */
.tr-page-title {
    font-size: var(--tr-text-xl);
    font-weight: var(--tr-font-bold);
    color: var(--tr-color-slate-900);
    margin: 0;
    letter-spacing: -0.02em;
}

/* ─── Tab navigatie ───────────────────────────────────────────── */
/* Uses shared .tr-pill-nav + .tr-pill from common/tabs.css      */
.tam-rank-nav.tr-pill-nav {
    margin-top: var(--tr-space-3);
    margin-bottom: var(--tr-space-lg, var(--tr-space-8));
}

/* ─── Section card ────────────────────────────────────────────── */
.tr-card {
    background: var(--tr-white);
    border-radius: var(--tr-radius);
    box-shadow: var(--tr-shadow);
    margin-bottom: var(--tr-space-4);
    overflow: hidden;
}

.tr-card-header {
    padding: var(--tr-space-5) var(--tr-space-6) var(--tr-space-4);
    border-bottom: 1px solid var(--tr-surface);
    display: flex;
    align-items: center;
    gap: var(--tr-space-sm);
}

.tr-card-title {
    font-size: var(--tr-text-md);
    font-weight: 700;
    color: var(--tr-dark);
    margin: 0;
}

/* Info-tooltip naast een kaarttitel: op de baseline hangt het icoon te
   laag t.o.v. de vette titel, dus optisch centreren op de titelregel.
   De top-nudge kan omdat .tr-tooltip position:relative is; de bubble
   wordt bij tonen toch naar de body-portal verplaatst. */
.tr-card-title .tr-tooltip {
    vertical-align: middle;
    margin-left: 2px;
    top: -2px;
}

.tr-card-subtitle {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
    margin: 2px 0 0 0;
}

.tr-card-body {
    padding: 0 var(--tr-space-6) var(--tr-space-2);
}

/* Tab panels: uses shared .tr-tab-panel from common/tabs.css */

/* ─── Toggle row ──────────────────────────────────────────────── */
.tr-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-3) 0;
    border-bottom: 1px solid var(--tr-surface);
    gap: var(--tr-space-4);
}

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


.tr-toggle-row__info {
    flex: 1;
    padding-right: var(--tr-space-md);
}

.tr-toggle-row__label {
    font-size: var(--tr-text-base);
    font-weight: 600;
    color: var(--tr-dark);
    margin: 0 0 2px 0;
}

.tr-toggle-row__desc {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
    margin: 0;
    line-height: 1.5;
}

/* ─── Toggle switch (pure CSS, geen JS) ──────────────────────── */
.tr-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.tr-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.tr-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--tr-slate-200);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--tr-transition);
}

.tr-toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--tr-white);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: var(--tr-transition);
}

.tr-toggle-switch input:checked+.tr-toggle-track {
    background: var(--tr-primary);
}

.tr-toggle-switch input:checked+.tr-toggle-track::after {
    transform: translateX(20px);
}

/* ─── Content Type group headers ─────────────────────────────── */
.tr-content-group__label {
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-slate-700);
    margin: 0 0 var(--tr-space-1) 0;
    padding-top: var(--tr-space-3);
    border-top: 1px solid var(--tr-slate-100);
}

.tr-content-tax-group:first-child .tr-content-group__label {
    border-top: none;
    padding-top: 0;
}

.tr-content-tax-group .tr-toggle-row {
    padding-left: var(--tr-space-3);
}

/* Audit toggle disabled state */
.tr-toggle-row.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.tr-audit-disabled-hint {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-400);
    margin: 2px 0 0;
    font-style: italic;
}

.tr-more-types-wrap {
    margin-top: var(--tr-space-3);
    padding-top: var(--tr-space-3);
}

.tr-more-types-toggle {
    font-size: var(--tr-text-base);
    font-weight: 600;
    color: var(--tr-slate-500);
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.tr-more-types-toggle:hover {
    color: var(--tr-slate-700);
}

/* ─── Input velden ────────────────────────────────────────────── */
.tr-field-row {
    margin-bottom: var(--tr-space-md);
}

.tr-field-row:last-child {
    margin-bottom: 0;
}

.tr-label {
    display: block;
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-slate-700);
    margin-bottom: var(--tr-space-xs);
    margin-top: var(--tr-space-sm);
}

.tr-input,
.tr-select,
.tr-textarea {
    font-family: var(--tr-font);
    font-size: var(--tr-text-base);
    color: var(--tr-dark);
    background: var(--tr-white);
    border: 1.5px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-3) var(--tr-space-md);
    width: 100%;
    transition: var(--tr-transition);
    box-sizing: border-box;
    outline: none;
    appearance: none;
}

.tr-input:focus,
.tr-select:focus,
.tr-textarea:focus {
    border-color: var(--tr-color-slate-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
    background: var(--tr-white);
}

.tr-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* WP core override voor selects/inputs in settings */
.tr-settings-wrap select.tr-select,
.tr-settings-wrap .tr-select,
.tr-settings-wrap input.tr-input,
.tr-settings-wrap .tr-input,
.tr-settings-wrap textarea.tr-textarea,
.tr-settings-wrap .tr-textarea {
    border: 1.5px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-3) var(--tr-space-md);
    background: var(--tr-color-white);
    font-size: var(--tr-text-base);
    color: var(--tr-dark);
    box-shadow: none;
    min-height: auto;
    height: auto;
    line-height: normal;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tr-settings-wrap select.tr-select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.tr-settings-wrap select.tr-select:focus,
.tr-settings-wrap .tr-select:focus,
.tr-settings-wrap .tr-input:focus,
.tr-settings-wrap .tr-textarea:focus {
    border-color: var(--tr-color-slate-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
    outline: none;
}

.tr-field-hint {
    font-size: var(--tr-text-xs);
    color: var(--tr-slate-400);
    margin: 4px 0 0 0;
}

.tr-field-hint a {
    color: var(--tr-color-primary);
}

.tr-field-hint a:hover {
    color: var(--tr-color-primary-hover);
}

/* ─── Slider ──────────────────────────────────────────────────── */
.tr-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--tr-surface);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.tr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tr-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.tr-slider-value {
    font-size: var(--tr-text-sm);
    font-weight: 700;
    color: var(--tr-primary);
    min-width: 32px;
    text-align: right;
}

.tr-slider-row {
    padding: var(--tr-space-3) 0;
    border-bottom: 1px solid var(--tr-surface);
}

.tr-slider-row .tr-label {
    margin-bottom: var(--tr-space-sm);
}

.tr-slider-wrap {
    display: flex;
    align-items: center;
    gap: var(--tr-space-md);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
/* Verplaatst naar common/buttons.css (BEM: .tr-btn--primary etc.) */

/* ─── Save button sectie ──────────────────────────────────────── */
.tr-save-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    padding: var(--tr-space-lg) 0 0 0;
    margin-top: var(--tr-space-sm);
}

.tr-save-feedback {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-color-white);
    background: var(--tr-color-primary);
    padding: 6px 14px;
    border-radius: var(--tr-radius-md);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.tr-save-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Connection card ─────────────────────────────────────────── */
.tr-connection-card {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    box-shadow: var(--tr-shadow-sm);
    padding: 0;
    margin-bottom: var(--tr-space-4);
    overflow: hidden;
}

.tr-connection-card > .tr-btn {
    align-self: flex-end;
}

/* Upsell bar inside connection card — edge-to-edge bottom */
.tr-connection-upsell {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
    background: var(--tr-color-primary-light);
    padding: var(--tr-space-4) var(--tr-space-6);
}

.tr-connection-upsell__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--tr-radius-full);
    background: var(--tr-color-primary);
    flex-shrink: 0;
}

.tr-connection-upsell__text {
    flex: 1;
    margin: 0;
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-700);
}

.tr-connection-upsell__link {
    flex-shrink: 0;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.tr-connection-upsell__link:hover {
    color: var(--tr-color-primary-hover);
}

.tr-connection-header {
    display: flex;
    align-items: center;
    gap: var(--tr-space-md);
    padding: var(--tr-space-5) var(--tr-space-6);
    border-bottom: 1px solid var(--tr-color-slate-200);
}

.tr-connection-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--tr-radius-sm);
    background: var(--tr-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tr-dark);
}

.tr-connection-name {
    font-size: var(--tr-text-md);
    font-weight: 700;
    color: var(--tr-dark);
    margin: 0 0 2px 0;
}

.tr-connection-desc {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
    margin: 0;
}

/* Status badge ─────────────────────────────────────────────────── */
.tr-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--tr-text-xs);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.tr-badge--connected {
    background: var(--tr-success);
    color: var(--tr-white);
}

.tr-badge--warning {
    background: var(--tr-color-warning-light);
    color: #b45309;
    border: none;
}

.tr-badge--error {
    background: var(--tr-error-bg);
    color: var(--tr-error);
}

.tr-badge--inactive {
    background: var(--tr-color-slate-200);
    color: var(--tr-color-slate-600);
    border: none;
}

.tr-badge--pro {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    font-size: 11px;
    font-weight: var(--tr-font-semibold);
    padding: 4px 10px;
    border-radius: var(--tr-radius-sm);
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.tamrank-license-link {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-primary);
    text-decoration: none;
    font-weight: var(--tr-font-semibold);
}

.tamrank-license-link:hover {
    text-decoration: underline;
}

.tr-badge::before {
    display: none;
}

/* ─── Connection details (twee-kolom layout) ──────────────────── */
.tr-connection-details {
    margin-bottom: var(--tr-space-sm);
}

.tr-connection-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tr-space-2) 0;
}

.tr-connection-detail-label {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
}

.tr-connection-detail-value {
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-dark);
}

.tr-connection-hint {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-400);
    margin: var(--tr-space-2) 0 var(--tr-space-md) 0;
}

.tr-connection-body-desc {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
    margin: 0 0 var(--tr-space-md) 0;
    line-height: 1.5;
}

/* ─── Text links ──────────────────────────────────────────────── */
.tr-text-link {
    font-size: var(--tr-text-sm);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--tr-transition);
}

.tr-text-link--muted {
    color: var(--tr-slate-400);
}

.tr-text-link--muted:hover {
    color: var(--tr-error);
}

/* ─── GSC Stepped Card — new states (v2) ────────────────────────── */

.tr-card-header-right {
    margin-left: auto;
    flex-shrink: 0;
}

.tr-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tr-card-body {
    padding: var(--tr-space-5) var(--tr-space-6);
}

.tr-upsell {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
    padding: var(--tr-space-4) var(--tr-space-6);
    background: linear-gradient(135deg, rgba(16,185,129,0.04) 0%, rgba(16,185,129,0.08) 100%);
}
.tr-upsell-text {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-600);
    flex: 1;
    margin: 0;
}
.tr-upsell-link {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
    text-decoration: none;
    white-space: nowrap;
}
.tr-upsell-link:hover { color: var(--tr-color-primary-hover); }

.tr-connect-body {
    display: flex;
    flex-direction: column;
    gap: var(--tr-space-4);
}
.tr-connect-body p {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-600);
    margin: 0;
}

/* Connected row */
.tr-connected-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tr-space-3);
}
.tr-connected-property {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}
.tr-connected-property .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tr-color-success);
    flex-shrink: 0;
}
.tr-connected-property span {
    font-size: var(--tr-text-base);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-800);
}
.tr-connected-actions {
    display: flex;
    align-items: center;
    gap: var(--tr-space-1);
}
.tr-action-sep {
    color: var(--tr-color-slate-300);
    font-size: var(--tr-text-xs);
}
.tr-action-spacer {
    flex: 1;
}

/* Ghost button */
.tr-btn--ghost {
    background: transparent;
    color: var(--tr-color-slate-600);
    padding: var(--tr-space-2) var(--tr-space-3);
    font-size: var(--tr-text-xs);
}
.tr-btn--ghost:hover {
    background: var(--tr-color-surface);
    color: var(--tr-color-slate-800);
}
.tr-btn--danger {
    color: var(--tr-color-error);
}
.tr-btn--danger:hover {
    color: var(--tr-color-error-hover);
    background: var(--tr-color-error-bg);
}
.tr-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Connected footer */
.tr-connected-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-3) var(--tr-space-6);
    border-top: 1px solid var(--tr-color-slate-200);
    background: rgba(0,0,0,0.01);
}
.tr-connected-footer__sync {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
}
.tr-connected-footer a {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
    text-decoration: none;
}
.tr-connected-footer a:hover {
    color: var(--tr-color-primary-hover);
}

/* Mismatch row */
.tr-mismatch-row {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}
.tr-mismatch-row .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tr-color-warning);
    flex-shrink: 0;
}
.tr-mismatch-property {
    font-size: var(--tr-text-base);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-warning-hover);
}
.tr-mismatch-hint {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    margin-left: auto;
}

/* Alerts inside GSC connection card — roomier padding than the shared
   .tr-alert default (the card's mockup style). */
.tr-connection-card .tr-alert {
    border-radius: var(--tr-radius-md);
    padding: var(--tr-space-3) var(--tr-space-4);
}

/* Ownership-proof "couldn't verify your site" notice (inside the GSC card) */
.tr-verify-detail {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    padding: 10px 12px;
    margin: var(--tr-space-3) 0 var(--tr-space-4);
}
.tr-verify-detail__row {
    display: flex;
    gap: 10px;
    font-size: var(--tr-text-sm);
    line-height: 1.5;
    padding: 3px 0;
}
.tr-verify-detail__row + .tr-verify-detail__row {
    border-top: 1px solid var(--tr-color-slate-200);
    margin-top: 3px;
    padding-top: 8px;
}
.tr-verify-detail__k {
    flex: 0 0 92px;
    color: var(--tr-color-slate-500);
    font-weight: var(--tr-font-semibold);
}
.tr-verify-detail__v {
    flex: 1;
    color: var(--tr-color-slate-700);
    word-break: break-all;
}
.tr-verify-detail__v code {
    font-size: 0.78em;
    background: var(--tr-color-surface);
    padding: 1px 6px;
    border-radius: var(--tr-radius-sm);
    color: var(--tr-color-slate-800);
}
.tr-verify-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.tr-verify-hint {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
}
.tr-verify-hint a {
    color: var(--tr-color-slate-700);
    font-weight: var(--tr-font-semibold);
}

/* Action line inside the RSS duplicate-feed-text warning */
.tr-rss-conflict-action {
    margin: var(--tr-space-2) 0 0 0;
    font-size: var(--tr-text-sm);
}
.tr-rss-conflict-action a {
    color: var(--tr-color-slate-700);
    font-weight: var(--tr-font-semibold);
}

/* Property select layout — single row: dropdown left, actions right */
.tr-property-select {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--tr-space-3);
}
.tr-connection-card .tr-property-select .tr-select,
.tr-connection-card .tr-property-select select.tr-select {
    max-width: 400px;
}
.tr-property-select .tr-select-actions {
    margin-left: auto;
    flex-shrink: 0;
}
.tr-select-hint {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    margin-top: calc(var(--tr-space-2) * -1);
    padding-left: var(--tr-spacing-md);
}
.tr-select-actions {
    display: flex;
    gap: var(--tr-space-2);
    align-items: center;
}

/* Inline input row — input left, help link + save right */
.tr-input-row {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
}
.tr-input-row .tr-input {
    flex: 1;
    max-width: 400px;
}
.tr-input-row .tr-help-link {
    margin-left: auto;
}
.tr-help-link {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    text-decoration: none;
    white-space: nowrap;
}
.tr-help-link:hover {
    color: var(--tr-color-primary);
}

/* Masked key display */
.tr-key-display {
    font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-600);
    letter-spacing: 0.03em;
}

/* ─── Dark code block ─────────────────────────────────────────── */
.tr-code-block {
    background: var(--tr-dark);
    color: var(--tr-slate-300, #cbd5e1);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-lg);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: var(--tr-text-sm);
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.tr-code-block code {
    font-family: inherit;
    color: inherit;
    background: none;
    padding: 0;
}

/* ─── .htaccess Editor (Technisch SEO) ────────────────────────── */
.tr-server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--tr-text-sm);
    font-weight: 600;
    padding: 9px 13px;
    border-radius: var(--tr-radius-md);
    margin-bottom: 16px;
}
.tr-server-status svg { flex: none; }
.tr-server-status--ok {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary-hover);
}
.tr-server-status--warn {
    background: var(--tr-color-warning-bg);
    color: var(--tr-color-warning-hover);
}

.tr-htaccess-callout {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--tr-radius-md);
    background: var(--tr-color-warning-light);
    border: 1px solid rgba(245, 158, 11, 0.35);
    margin-bottom: 16px;
}
.tr-htaccess-callout svg { flex: none; margin-top: 1px; color: var(--tr-color-warning-hover); }
.tr-htaccess-callout p { margin: 0; font-size: var(--tr-text-sm); line-height: 1.55; color: var(--tr-color-slate-700); }
.tr-htaccess-callout strong { color: var(--tr-color-slate-900); }
.tr-htaccess-callout--info {
    background: var(--tr-color-primary-light);
    border-color: rgba(16, 185, 129, 0.30);
}
.tr-htaccess-callout--info svg { color: var(--tr-color-primary-hover); }

textarea.tr-code-textarea {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    min-height: 240px;
    white-space: pre;
    overflow-wrap: normal;
    tab-size: 4;
}

.tr-syntax-result {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--tr-text-sm);
    font-weight: 600;
    padding: 10px 13px;
    border-radius: var(--tr-radius-md);
    margin: 14px 0 0;
}
.tr-syntax-result svg { flex: none; margin-top: 1px; }
.tr-syntax-result--ok { background: var(--tr-color-primary-light); color: var(--tr-color-primary-hover); }
.tr-syntax-result--warn { background: var(--tr-color-warning-bg); color: var(--tr-color-warning-hover); }
.tr-syntax-result--err { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }
.tr-syntax-result code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.tr-editor-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* Server status as a heading badge. A standing fact does not need a
   full-width coloured bar; that weight belongs to the result notice. */
.tr-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
    margin-left: 6px;
    padding: 3px 9px;
    border-radius: var(--tr-radius-full, 999px);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.tr-card-badge--ok {
    background: var(--tr-color-primary-50, #ecfdf5);
    color: var(--tr-color-primary-600, #059669);
}

/* Replaces the boxed warning above the textarea: same promise, read at the
   moment of deciding instead of skipped on the way in. */
.tr-htaccess-hint {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--tr-color-slate-500, #64748b);
}

.tr-backup-panel {
    margin-top: 18px;
    border-top: 1px solid var(--tr-color-slate-200);
    padding-top: 16px;
}
.tr-backup-panel__title { font-size: var(--tr-text-sm); font-weight: 700; color: var(--tr-color-slate-700); margin: 0 0 10px; }

/* Collapsed backup list: expanded it took more height than the editor. */
details.tr-backup-panel > summary.tr-backup-panel__title {
    cursor: pointer;
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

details.tr-backup-panel > summary.tr-backup-panel__title::-webkit-details-marker {
    display: none;
}

details.tr-backup-panel > summary.tr-backup-panel__title::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.55;
    transition: transform var(--tr-transition-fast, 0.15s);
}

details.tr-backup-panel[open] > summary.tr-backup-panel__title::before {
    transform: rotate(90deg);
}

details.tr-backup-panel[open] > summary.tr-backup-panel__title {
    margin-bottom: 10px;
}

details.tr-backup-panel > summary.tr-backup-panel__title:focus-visible {
    outline: 2px solid var(--tr-color-primary, #10b981);
    outline-offset: 2px;
    border-radius: var(--tr-radius-sm, 4px);
}
.tr-backup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: 8px;
}
.tr-backup-row__meta { display: flex; flex-direction: column; gap: 2px; }
.tr-backup-row__when { font-size: var(--tr-text-sm); font-weight: 600; color: var(--tr-color-slate-900); }
.tr-backup-row__sub { font-size: 12px; color: var(--tr-color-slate-500); }
.tr-btn--tiny { padding: 5px 12px; font-size: 12px; }

.tr-htaccess-empty,
.tr-htaccess-no-backups { font-size: var(--tr-text-sm); color: var(--tr-color-slate-500); margin: 0; }
.tr-htaccess-readonly { opacity: 0.7; }
#tr-htaccess-save-btn.is-loading { opacity: 0.6; pointer-events: none; }

/* ─── Card header separator (Technisch SEO) ───────────────────── */
.tr-card-header {
    border-bottom: 1px solid var(--tr-surface);
}

/* ─── Collapsible geavanceerde instellingen ───────────────────── */
.tr-advanced-toggle {
    display: flex;
    align-items: center;
    gap: var(--tr-space-xs);
    background: none;
    border: none;
    font-family: var(--tr-font);
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-slate-500);
    cursor: pointer;
    padding: var(--tr-space-sm) 0;
    transition: var(--tr-transition);
}

.tr-advanced-toggle:hover {
    color: var(--tr-dark);
}

.tr-advanced-toggle__icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-style: normal;
}

.tr-advanced-toggle.is-open .tr-advanced-toggle__icon {
    transform: rotate(180deg);
}

.tr-advanced-content {
    display: none;
    padding-top: var(--tr-space-md);
    border-top: 1px dashed var(--tr-surface);
    margin-top: var(--tr-space-sm);
}

.tr-advanced-content.is-open {
    display: block;
}

/* Details/summary variant */
.tr-advanced-details {
    margin-top: var(--tr-space-sm);
}

.tr-advanced-details > summary.tr-advanced-toggle {
    list-style: none;
}

.tr-advanced-details > summary.tr-advanced-toggle::-webkit-details-marker {
    display: none;
}

.tr-advanced-details[open] > summary .tr-advanced-toggle__icon {
    transform: rotate(180deg);
}

.tr-advanced-details > .tr-toggle-row:first-of-type {
    padding-top: var(--tr-space-md);
    border-top: 1px dashed var(--tr-surface);
    margin-top: var(--tr-space-sm);
}

/* ─── Optioneel / Verplicht divider ───────────────────────────── */
.tr-section-divider {
    position: relative;
    margin: var(--tr-space-lg) 0 var(--tr-space-md);
    display: flex;
    align-items: center;
    gap: var(--tr-space-sm);
}

.tr-section-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tr-surface);
}

.tr-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tr-surface);
}

.tr-section-divider__label {
    font-size: var(--tr-text-xs);
    font-weight: 600;
    color: var(--tr-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ─── Licentie kaart ──────────────────────────────────────────── */
.tr-license-card {
    background: var(--tr-white);
    border-radius: var(--tr-radius);
    box-shadow: var(--tr-shadow);
    overflow: hidden;
    margin-bottom: var(--tr-space-md);
}

.tr-license-card__top {
    height: 4px;
    background: var(--tr-primary);
}

.tr-license-card__body {
    padding: var(--tr-space-lg);
}

/* AI credits progress bar */
.tr-progress-bar {
    height: 8px;
    background: var(--tr-surface);
    border-radius: 999px;
    overflow: hidden;
    margin: var(--tr-space-sm) 0;
}

.tr-progress-fill {
    height: 100%;
    background: var(--tr-primary);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Feature pills */
.tr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tr-space-xs);
    margin: var(--tr-space-sm) 0;
}

.tr-pill {
    font-size: var(--tr-text-xs);
    font-weight: 600;
    color: var(--tr-slate-600);
    background: var(--tr-base);
    border: 1px solid var(--tr-surface);
    border-radius: 999px;
    padding: 3px 10px;
}

/* Action row in licentie */
.tr-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-md) 0;
    border-bottom: 1px solid var(--tr-surface);
}

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

.tr-action-row__info {}

.tr-action-row__title {
    font-size: var(--tr-text-base);
    font-weight: 600;
    color: var(--tr-dark);
    margin: 0 0 2px 0;
}

.tr-action-row__desc {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
    margin: 0;
}

/* Danger zone */
.tr-danger-zone {
    background: var(--tr-error-bg);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: var(--tr-radius);
    padding: var(--tr-space-md) var(--tr-space-lg);
}

/* ─── API key input met show/hide ─────────────────────────────── */
.tr-api-key-wrap {
    position: relative;
}

.tr-api-key-wrap .tr-input {
    padding-right: 80px;
}

.tr-api-key-toggle {
    position: absolute;
    right: var(--tr-space-sm);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--tr-text-xs);
    font-weight: 600;
    color: var(--tr-slate-500);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--tr-font);
    padding: 4px 6px;
}

.tr-api-key-toggle:hover {
    color: var(--tr-dark);
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tr-toggle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--tr-space-sm);
    }

    .tr-connection-header {
        flex-wrap: wrap;
    }

    .tr-pill-nav {
        flex-wrap: wrap;
    }
}

/* ─── Einde Design System ─────────────────────────────────────── */

.tam-rank-icon {
    width: 50px;
    height: 50px;
    background-image: url('../img/tamrank-icon-dark.svg');
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* ========================================
   Hero Section V2 - Clean Card (Website Style)
   ======================================== */

.tam-rank-hero-v2 {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    margin: 20px 0;
    border: 1px solid var(--tr-color-slate-200);
    box-shadow: var(--tr-shadow-sm);
}

.tam-hero-wave {
    display: none;
    /* Not used in clean style */
}

.tam-hero-content {
    padding: 32px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tam-hero-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tam-hero-logo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tam-hero-wordmark {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tr-color-slate-800);
    letter-spacing: -0.02em;
    line-height: 1;
}

.tam-hero-tm {
    color: var(--tr-color-primary);
}

.tam-hero-tagline {
    font-size: 0.95rem;
    color: var(--tr-color-slate-500);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.tam-hero-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tr-color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--tr-radius-full);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .tam-hero-content {
        padding: 24px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .tam-hero-wordmark {
        font-size: 1.5rem;
    }

    .tam-hero-tagline {
        font-size: 0.9rem;
    }
}

/* ========================================
   Hero Section V1 (Legacy - kept for compatibility)
   ======================================== */

.tam-rank-hero {
    background: linear-gradient(135deg, var(--tr-color-surface) 0%, var(--tr-color-base) 100%);
    padding: 40px 30px;
    margin: 20px 0;
    border-radius: var(--tr-radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--tr-shadow-sm);
}

.tam-rank-hero h1 {
    font-size: 2.5em;
    color: var(--tr-color-primary);
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tam-rank-hero p {
    font-size: 1.2em;
    color: var(--tr-color-slate-500);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.tam-rank-version {
    display: inline-block;
    background: var(--tr-color-primary);
    color: white;
    padding: 6px 12px;
    border-radius: var(--tr-radius-full);
    font-size: 0.9em;
    font-weight: 600;
}

/* Hero Confetti Animation (Legacy) */
.hero-confetti {
    position: relative;
    z-index: 1;
}

.tam-confetti-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.tam-confetti-dot {
    position: absolute;
    border-radius: 50%;
    background-color: #FFFFFF4B;
    color: white;
    font-weight: bold;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    opacity: 1;
}

/* Navigation Tabs — uses shared .tr-pill-nav + .tr-pill from common/tabs.css */

/* Content Cards */
.tam-rank-card {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--tr-shadow-md);
    border: 1px solid var(--tr-color-slate-200);
    transition: box-shadow var(--tr-transition-base);
}

.tam-rank-card:hover {
    box-shadow: var(--tr-shadow-hover);
}

.tam-rank-card h2 {
    color: var(--tr-color-slate-800);
    margin-top: 0;
    font-size: 1.5em;
    font-weight: 600;
    border-bottom: 2px solid var(--tr-color-surface);
    padding-bottom: 10px;
}

.tam-rank-card h3 {
    color: var(--tr-color-slate-800);
    font-size: 1.3em;
    margin-top: 25px;
}

/* Form Elements */
.tam-rank-form-group {
    margin-bottom: 20px;
}

.tam-rank-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tr-color-slate-800);
}

.tam-rank-form-group input[type="text"],
.tam-rank-form-group input[type="url"],
.tam-rank-form-group input[type="email"],
.tam-rank-form-group input[type="tel"],
.tam-rank-form-group textarea,
.tam-rank-form-group select,
.tam-input {
    width: 100%;
    padding: var(--tr-space-3) var(--tr-space-md);
    border: 1.5px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    font-size: var(--tr-text-base);
    transition: border-color var(--tr-transition-base);
    box-sizing: border-box;
    background: var(--tr-color-white);
    appearance: none;
}

.tam-rank-form-group input:focus,
.tam-rank-form-group textarea:focus,
.tam-rank-form-group select:focus,
.tam-input:focus {
    outline: none;
    border-color: var(--tr-color-slate-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.tam-rank-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
.tam-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--tr-radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--tr-transition-slow);
    text-align: center;
    line-height: 1.4;
}

.tam-btn-primary {
    background: var(--tr-color-primary);
    color: white;
}

.tam-btn-primary:hover {
    background: var(--tr-color-primary-hover);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--tr-shadow-primary-hover);
}

.tam-btn-secondary {
    background: var(--tr-color-info);
    color: white;
}

.tam-btn-secondary:hover {
    background: var(--tr-color-info-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}


.tam-btn-warning {
    background: var(--tr-color-warning);
    color: white;
}

.tam-btn-warning:hover {
    background: var(--tr-color-warning-hover);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.tam-btn-danger {
    background: var(--tr-color-error);
    color: white;
}

.tam-btn-danger:hover {
    background: var(--tr-color-error-hover);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.tam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Meta Box Styling */
.tam-rank-meta-box {
    padding: 20px;
    background: var(--tr-color-surface);
    border-radius: var(--tr-radius-md);
    margin-top: 15px;
}

.tam-rank-meta-box .form-table {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-md);
    overflow: hidden;
}

.tam-rank-meta-box .form-table th {
    background: var(--tr-color-surface);
    color: var(--tr-color-slate-800);
    font-weight: 600;
    padding: 15px 20px;
}

.tam-rank-meta-box .form-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--tr-color-slate-200);
}

/* Checkbox styling */
.tam-rank-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.tam-rank-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--tr-color-primary);
}

/* Progress Bar */
.tam-progress-bar {
    width: 100%;
    height: 20px;
    background: var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.tam-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tr-color-warning), var(--tr-color-info), var(--tr-color-primary));
    transition: width 0.5s ease;
    border-radius: var(--tr-radius-md);
}

/* Animated indeterminate progress bar */
.tam-progress-bar.loading .tam-progress-fill {
    width: 30% !important;
    animation: tam-progress-slide 1.5s ease-in-out infinite;
}

@keyframes tam-progress-slide {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(233%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Bulk Edit Table */
#bulk-edit-table {
    border-collapse: collapse;
}

#bulk-edit-table th,
#bulk-edit-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--tr-color-slate-200);
    vertical-align: middle;
}

#bulk-edit-table th {
    background: var(--tr-color-base);
    font-weight: 600;
    text-align: left;
    font-size: 13px;
    color: var(--tr-color-slate-700);
}

#bulk-edit-table tbody tr:hover {
    background: var(--tr-color-base);
}

#bulk-edit-table tbody tr.modified {
    background: rgba(16, 185, 129, 0.05);
}

/* Post Edit Icon */
.post-edit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--tr-radius-sm);
    background: rgba(59, 130, 246, 0.1);
    color: var(--tr-color-info);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s;
}

.post-edit-icon:hover {
    background: var(--tr-color-info);
    color: var(--tr-color-white);
}

/* Meta Edit Cell */
.meta-edit-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-edit-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    font-size: 13px;
    transition: all var(--tr-transition-base);
    background: var(--tr-color-white);
}

.meta-edit-input:focus {
    outline: none;
    border-color: var(--tr-color-primary);
    box-shadow: var(--tr-shadow-focus);
}

.meta-edit-input:placeholder-shown,
.meta-edit-input.status-empty {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--tr-color-error);
}

.meta-edit-input.status-good {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--tr-color-primary);
}

.meta-edit-input.status-short,
.meta-edit-input.status-long {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--tr-color-warning);
}

.meta-edit-input.modified {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--tr-color-primary);
}

/* Meta Length Indicator */
.meta-length-indicator {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--tr-radius-sm);
    align-self: flex-end;
}

.meta-length-indicator.good {
    color: var(--tr-color-primary);
    background: rgba(16, 185, 129, 0.1);
}

.meta-length-indicator.short {
    color: var(--tr-color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.meta-length-indicator.long {
    color: var(--tr-color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.meta-length-indicator.empty {
    color: var(--tr-color-error);
    background: rgba(244, 63, 94, 0.1);
}

/* Bulk Edit Checkbox */
.bulk-edit-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--tr-color-primary);
}

/* Bulk Edit Buttons */
#bulk-generate-titles:disabled,
#bulk-generate-descriptions:disabled,
#bulk-edit-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tam Select */
.tam-select {
    padding: var(--tr-space-3) 40px var(--tr-space-3) var(--tr-space-md);
    border: 1.5px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    font-size: var(--tr-text-base);
    font-weight: 500;
    color: var(--tr-color-slate-700);
    background: var(--tr-color-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: all var(--tr-transition-base);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tam-select:hover {
    border-color: var(--tr-color-slate-300);
}

.tam-select:focus {
    outline: none;
    border-color: var(--tr-color-slate-400);
    background-color: var(--tr-color-white);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

/* Filter Section */
.bulk-edit-filters {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
}

.filter-group:last-child {
    flex: 0 0 auto;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tr-color-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group .tam-select {
    width: 100%;
    min-width: unset;
}

/* Override any inherited borders on filter containers */
.bulk-edit-filters,
.bulk-edit-filters>div {
    border: none !important;
    box-shadow: none !important;
}

/* Bulk Action Button with Credit Cost */
.bulk-action-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.credit-cost {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--tr-color-slate-400);
    opacity: 0;
    transition: opacity var(--tr-transition-base);
}

.credit-cost svg {
    color: var(--tr-color-warning);
}

.bulk-action-btn-wrapper:has(button:not(:disabled)) .credit-cost {
    opacity: 1;
}

/* Score Display */
.tam-score {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--tr-radius-full);
    font-weight: bold;
    text-align: center;
    min-width: 60px;
}

.tam-score-excellent {
    background: var(--tr-color-primary);
    color: white;
}

.tam-score-good {
    background: var(--tr-color-info);
    color: white;
}

.tam-score-average {
    background: var(--tr-color-warning);
    color: white;
}

.tam-score-poor {
    background: var(--tr-color-error);
    color: white;
}

/* Data Table */
.tam-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-md);
    overflow: hidden;
    box-shadow: var(--tr-shadow-sm);
}

.tam-data-table th {
    background: var(--tr-color-primary);
    color: white;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
}

.tam-data-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--tr-color-slate-200);
}

.tam-data-table tr:nth-child(even) {
    background: var(--tr-color-surface);
}

.tam-data-table tr:hover {
    background: var(--tr-color-surface);
}

/* Loading Spinner */
.tam-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--tr-color-slate-100);
    border-top: 3px solid var(--tr-color-primary);
    border-radius: 50%;
    animation: tam-spin 1s linear infinite;
}

@keyframes tam-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer Branding */
.tam-rank-footer {
    margin-top: var(--tr-space-10);
    margin-left: calc(-1 * var(--tr-space-5));
    margin-right: calc(-1 * var(--tr-space-5));
    background: var(--tr-color-slate-900);
    overflow: hidden;
}

.tam-rank-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--tr-space-6);
    height: 52px;
    gap: var(--tr-space-4);
}

/* Left: brand */
.tam-footer-brand {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}

.tam-footer-icon .tam-svg-bg {
    fill: var(--tr-color-primary);
}

.tam-footer-icon .tam-svg-dark {
    fill: var(--tr-color-slate-800);
}

.tam-footer-icon .tam-svg-dark-muted {
    fill: var(--tr-color-slate-800);
    opacity: 0.5;
}

.tam-footer-brand-name {
    font-size: var(--tr-text-lg);
    font-weight: 700;
    color: var(--tr-color-white);
    letter-spacing: -0.02em;
}

.tam-footer-brand-rank {
    color: var(--tr-color-primary);
}

.tam-footer-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--tr-color-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--tr-radius-full);
    letter-spacing: 0.01em;
}

/* Right: links */
.tam-footer-links {
    display: flex;
    align-items: center;
    gap: var(--tr-space-5);
}

.tam-footer-version {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    font-weight: 500;
}

.tam-footer-link {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--tr-transition-fast);
}

.tam-footer-link:hover {
    color: var(--tr-color-white);
}

@media (max-width: 600px) {
    .tam-footer-links {
        gap: var(--tr-space-3);
    }

    .tam-footer-version {
        display: none;
    }
}


.confetti-wrapper {
    font-size: 16px;
    color: var(--tr-color-slate-900);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    padding: 10px 0;
}

@media (max-width: 768px) {
    .confetti-wrapper {
        font-size: 15px;
    }
}

.confetti-container {
    font-weight: 700;
    position: relative;
    cursor: pointer;
    display: inline-block;
    color: #0C8E38;
    text-decoration: underline;
}

.confetti-dot {
    position: fixed;
    border-radius: 50%;
    background-color: var(--tr-color-slate-900);
    color: white;
    font-weight: bold;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tam-rank-hero {
        padding: 30px 20px;
    }

    .tam-rank-hero h1 {
        font-size: 2em;
    }

    /* .tam-rank-nav responsive: now handled by .tr-pill-nav flex-wrap */

    .tam-rank-card {
        padding: 20px 15px;
        margin: 15px 0;
    }
}

/* Utility Classes */
.tam-text-center {
    text-align: center;
}

.tam-text-right {
    text-align: right;
}

.tam-mb-20 {
    margin-bottom: 20px;
}

.tam-mt-20 {
    margin-top: 20px;
}

.tam-hidden {
    display: none;
}

.tam-success {
    color: var(--tr-color-primary);
}

.tam-warning {
    color: var(--tr-color-warning);
}

.tam-error {
    color: var(--tr-color-error);
}

.tam-rank-settings-section {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--tr-shadow-md);
    border: 1px solid var(--tr-color-slate-200);
}

.tam-rank-settings-section h3 {
    color: var(--tr-color-primary);
    margin-top: 0;
    font-size: 1.4em;
    border-bottom: 2px solid var(--tr-color-surface);
    padding-bottom: 10px;
}

.tam-rank-settings-section>div>div {
    background: var(--tr-color-surface);
    padding: 20px;
    border-radius: var(--tr-radius-md);
    border-left: 4px solid var(--tr-color-primary);
}

.tam-btn-contact {
    background: var(--tr-color-error);
    color: white;
    border: 2px solid var(--tr-color-error);
}

.tam-btn-contact:hover {
    background: var(--tr-color-error-hover) !important;
    border-color: var(--tr-color-error-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
    text-decoration: none;
}

.tam-btn-info {
    background: var(--tr-color-info) !important;
    color: white !important;
    border: 2px solid var(--tr-color-info) !important;
}

.tam-btn-info:hover {
    background: var(--tr-color-info-hover) !important;
    border-color: var(--tr-color-info-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

/* Ensure .tam-btn-info works within .wrap context */
.wrap .tam-btn.tam-btn-info,
a.tam-btn.tam-btn-info {
    background: var(--tr-color-info) !important;
    color: white !important;
    border: 2px solid var(--tr-color-info) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
}

.wrap .tam-btn.tam-btn-info:hover,
a.tam-btn.tam-btn-info:hover {
    background: var(--tr-color-info-hover) !important;
    border-color: var(--tr-color-info-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    text-decoration: none;
}

/* Zelfde grootte en vorm als andere Tam buttons */
.wrap .tam-btn.tam-btn-primary,
input.tam-btn.tam-btn-primary[type="submit"],
input.button.tam-btn.tam-btn-primary {
    background: var(--tr-color-primary) !important;
    color: white !important;
    border-color: var(--tr-color-primary) !important;
    text-shadow: none !important;
    box-shadow: none !important;

    /* Zelfde grootte als andere Tam buttons */
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
}

.wrap .tam-btn.tam-btn-primary:hover,
input.tam-btn.tam-btn-primary[type="submit"]:hover,
input.button.tam-btn.tam-btn-primary:hover {
    background: var(--tr-color-primary-hover) !important;
    border-color: var(--tr-color-primary-hover) !important;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

/* Secondary button (filled blue) */
.wrap .tam-btn.tam-btn-secondary,
a.tam-btn.tam-btn-secondary,
button.tam-btn.tam-btn-secondary {
    background: var(--tr-color-info) !important;
    color: white !important;
    border: 2px solid var(--tr-color-info) !important;
    text-shadow: none !important;
    box-shadow: none !important;

    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

.wrap .tam-btn.tam-btn-secondary:hover,
a.tam-btn.tam-btn-secondary:hover,
button.tam-btn.tam-btn-secondary:hover {
    background: var(--tr-color-info-hover) !important;
    border-color: var(--tr-color-info-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

/* Small buttons for table actions */
.wrap .tam-btn.tam-btn-sm,
button.tam-btn.tam-btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
}

/* Blue button (filled) */
.wrap .tam-btn.tam-btn-blue,
a.tam-btn.tam-btn-blue,
button.tam-btn.tam-btn-blue {
    background: var(--tr-color-info) !important;
    color: white !important;
    border: 2px solid var(--tr-color-info) !important;
    text-shadow: none !important;
    box-shadow: none !important;

    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.wrap .tam-btn.tam-btn-blue:hover,
a.tam-btn.tam-btn-blue:hover,
button.tam-btn.tam-btn-blue:hover {
    background: var(--tr-color-info-hover) !important;
    border-color: var(--tr-color-info-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3) !important;
}

/* Blue button small variant (for table actions) */
.wrap .tam-btn.tam-btn-blue.tam-btn-small,
a.tam-btn.tam-btn-blue.tam-btn-small {
    padding: 10px 20px !important;
    font-size: 13px !important;
}

/* Green button (filled) */
.wrap .tam-btn.tam-btn-green,
a.tam-btn.tam-btn-green,
button.tam-btn.tam-btn-green {
    background: var(--tr-color-primary) !important;
    color: white !important;
    border: 2px solid var(--tr-color-primary) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.wrap .tam-btn.tam-btn-green:hover,
a.tam-btn.tam-btn-green:hover,
button.tam-btn.tam-btn-green:hover {
    background: var(--tr-color-primary-hover) !important;
    border-color: var(--tr-color-primary-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3) !important;
}

/* Orange button (filled) */
.wrap .tam-btn.tam-btn-orange,
a.tam-btn.tam-btn-orange {
    background: var(--tr-color-warning) !important;
    color: white !important;
    border: 2px solid var(--tr-color-warning) !important;
    text-shadow: none !important;
    box-shadow: none !important;

    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.wrap .tam-btn.tam-btn-orange:hover,
a.tam-btn.tam-btn-orange:hover {
    background: var(--tr-color-warning-hover) !important;
    border-color: var(--tr-color-warning-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
}

/* Pink button (filled) */
.wrap .tam-btn.tam-btn-pink,
a.tam-btn.tam-btn-pink {
    background: var(--tr-color-error) !important;
    color: white !important;
    border: 2px solid var(--tr-color-error) !important;
    text-shadow: none !important;
    box-shadow: none !important;

    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.wrap .tam-btn.tam-btn-pink:hover,
a.tam-btn.tam-btn-pink:hover {
    background: var(--tr-color-error-hover) !important;
    border-color: var(--tr-color-error-hover) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3) !important;
}

/* License Page Styles */
.tam-license-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .tam-license-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tam-license-status-grid {
        grid-template-columns: 1fr;
    }
}

.tam-license-status-item {
    padding: 20px;
    padding-top: 24px;
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    border: 1px solid var(--tr-color-slate-200);
    box-shadow: var(--tr-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.tam-license-status-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* Status item - Green */
.tam-license-status-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.tam-license-status-item:nth-child(1)::before {
    background: linear-gradient(90deg, var(--tr-color-primary), var(--tr-color-success));
}

/* License Key item - Blue */
.tam-license-status-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-color: rgba(93, 150, 229, 0.2);
}

.tam-license-status-item:nth-child(2)::before {
    background: linear-gradient(90deg, var(--tr-color-info), var(--tr-color-info));
}

/* Activations item - Orange */
.tam-license-status-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(232, 123, 93, 0.08) 0%, rgba(232, 123, 93, 0.03) 100%);
    border-color: rgba(232, 123, 93, 0.2);
}

.tam-license-status-item:nth-child(3)::before {
    background: linear-gradient(90deg, var(--tr-color-warning), var(--tr-color-warning));
}

/* Last Check item - Pink */
.tam-license-status-item:nth-child(4) {
    background: linear-gradient(135deg, rgba(220, 126, 160, 0.08) 0%, rgba(220, 126, 160, 0.03) 100%);
    border-color: rgba(220, 126, 160, 0.2);
}

.tam-license-status-item:nth-child(4)::before {
    background: linear-gradient(90deg, var(--tr-color-error), var(--tr-color-error));
}

.tam-license-status-item label {
    display: block;
    font-weight: 600;
    color: var(--tr-color-slate-500);
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tam-license-status-item div {
    font-size: 15px;
    color: var(--tr-color-slate-800);
    font-weight: 500;
}

.tam-license-status-item code {
    background: var(--tr-color-base);
    padding: 8px 12px;
    border-radius: var(--tr-radius-sm);
    font-size: 13px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    border: 1px solid var(--tr-color-slate-200);
    display: inline-block;
}

.tam-premium-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tam-premium-feature {
    padding: 20px;
    background: linear-gradient(135deg, var(--tr-color-surface) 0%, var(--tr-color-white) 100%);
    border-radius: var(--tr-radius-md);
    border: 1px solid var(--tr-color-slate-200);
    text-align: center;
    transition: all var(--tr-transition-slow);
}

.tam-premium-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tam-premium-feature .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--tr-color-primary);
    margin-bottom: 15px;
}

.tam-premium-feature strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--tr-color-slate-800);
}

.tam-premium-feature p {
    font-size: 14px;
    color: var(--tr-color-slate-500);
    line-height: 1.6;
    margin: 0;
}

.tam-premium-feature.tam-feature-active {
    position: relative;
    background: linear-gradient(135deg, var(--tr-color-success-light) 0%, var(--tr-color-success-light) 100%);
    border-color: var(--tr-color-primary);
}

.tam-feature-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--tr-color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--tr-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tam-premium-feature.tam-feature-locked {
    position: relative;
    background: linear-gradient(135deg, var(--tr-color-base) 0%, var(--tr-color-surface) 100%);
    border-color: var(--tr-color-slate-200);
}

.tam-premium-feature.tam-feature-locked strong {
    color: var(--tr-color-slate-500);
}

.tam-premium-feature.tam-feature-locked p {
    color: var(--tr-color-slate-400);
}

.tam-feature-badge.tam-badge-pro {
    background: var(--tr-color-slate-500);
    color: white;
}

#tam-license-message {
    margin: 15px 0;
}

#tam-license-message .notice {
    padding: 12px 15px;
    margin: 0;
}

/* Schema Field Mappings */
.field-mapping-row {
    background: var(--tr-color-surface) !important;
    background-color: var(--tr-color-surface) !important;
    padding: 20px;
    border-radius: var(--tr-radius-md);
    margin-bottom: 15px;
    border: 2px solid var(--tr-color-slate-200);
    transition: all var(--tr-transition-slow);
}

.field-mapping-row:hover {
    border-color: var(--tr-color-info);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.field-mapping-row label {
    font-weight: 600;
    color: var(--tr-color-slate-800);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.field-mapping-row .description {
    color: var(--tr-color-slate-500);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

.field-mapping-row select.field-source-select,
.field-mapping-row input.custom-field-input,
.field-mapping-row input.manual-value-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--tr-color-slate-300);
    border-radius: var(--tr-radius-md);
    font-size: 14px;
    background: var(--tr-color-white);
    transition: all var(--tr-transition-slow);
    box-sizing: border-box;
}

.field-mapping-row select.field-source-select:hover,
.field-mapping-row input.custom-field-input:hover,
.field-mapping-row input.manual-value-input:hover {
    border-color: var(--tr-color-info);
}

.field-mapping-row select.field-source-select:focus,
.field-mapping-row input.custom-field-input:focus,
.field-mapping-row input.manual-value-input:focus {
    outline: none;
    border-color: var(--tr-color-primary);
    box-shadow: var(--tr-shadow-focus);
}

/* Dropdown arrow styling */
.field-mapping-row select.field-source-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C3E50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
}

.field-mapping-row .field-mapping-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-mapping-row .field-mapping-controls>div {
    display: flex;
    flex-direction: column;
}

/* Required field indicator */
.field-mapping-row label sup {
    color: var(--tr-color-error);
    font-weight: 700;
}

/* Toggle Switch */
.tam-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.tam-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tam-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--tr-color-slate-300);
    transition: 0.3s;
    border-radius: 28px;
}

.tam-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tam-toggle-switch input:checked+.tam-toggle-slider {
    background-color: var(--tr-color-primary);
}

.tam-toggle-switch input:checked+.tam-toggle-slider:before {
    transform: translateX(24px);
}

.tam-toggle-switch input:focus+.tam-toggle-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Collapsible Arrow */
.tam-collapsible-arrow {
    transition: transform 0.3s ease;
}

.tam-collapsible-arrow.rotated {
    transform: rotate(180deg);
}

/* Collapsible Header Hover */
.tam-collapsible-header:hover {
    opacity: 0.8;
}

/* ========================================
   Tam Rank Pagination Styling
   ======================================== */

.tam-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding: 16px 0;
}

.tam-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--tr-color-white);
    color: var(--tr-color-slate-800);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--tr-transition-base);
    cursor: pointer;
}

.tam-pagination .page-numbers:hover:not(.current):not(.dots):not(.prev):not(.next) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-color: var(--tr-color-primary);
    color: var(--tr-color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.tam-pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--tr-color-primary) 0%, var(--tr-color-primary-hover) 100%);
    color: white;
    border-color: var(--tr-color-primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tam-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: var(--tr-color-slate-400);
    cursor: default;
    min-width: 30px;
    padding: 0;
}

.tam-pagination .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
}

/* Prev/Next buttons */
.tam-pagination .prev.page-numbers,
.tam-pagination .next.page-numbers {
    padding: 0 18px;
    gap: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(93, 150, 229, 0.04) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--tr-color-info);
}

.tam-pagination .prev.page-numbers:hover,
.tam-pagination .next.page-numbers:hover {
    background: linear-gradient(135deg, var(--tr-color-info) 0%, var(--tr-color-info-hover) 100%);
    border-color: var(--tr-color-info);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Disabled state for prev/next */
.tam-pagination .prev.page-numbers.disabled,
.tam-pagination .next.page-numbers.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pagination info text */
.tam-pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-radius: var(--tr-radius-md);
    font-size: 13px;
    color: var(--tr-color-slate-500);
}

.tam-pagination-info strong {
    color: var(--tr-color-primary);
    font-weight: 600;
}

/* Pagination wrapper */
.tam-pagination-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--tr-color-slate-200);
}

/* SVG icons in pagination buttons */
.tam-pagination .page-numbers svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.tam-pagination .prev.page-numbers svg {
    margin-right: 4px;
}

.tam-pagination .next.page-numbers svg {
    margin-left: 4px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .tam-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tam-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

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

/* ================================
   Credits Display Styles
   ================================ */

/* Credits display in license status grid */
.tam-credits-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tam-credits-number {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--tr-color-primary) !important;
    line-height: 1;
}

.tam-credits-bar-wrapper {
    width: 100%;
    height: 8px;
    background: var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    overflow: hidden;
}

.tam-credits-bar {
    height: 100%;
    border-radius: var(--tr-radius-sm);
    transition: width 0.3s ease;
}

.tam-credits-label {
    font-size: 12px !important;
    color: var(--tr-color-slate-500) !important;
    font-weight: 400 !important;
}

/* Credits item special styling - override nth-child */
.tam-license-status-item.tam-credits-item {
    background: linear-gradient(135deg, rgba(250, 165, 48, 0.08) 0%, rgba(250, 165, 48, 0.03) 100%) !important;
    border-color: rgba(250, 165, 48, 0.2) !important;
}

.tam-license-status-item.tam-credits-item::before {
    background: linear-gradient(90deg, var(--tr-color-warning), var(--tr-color-warning)) !important;
}

/* Buy Credits Button */
.tam-btn-credits {
    display: inline-flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, var(--tr-color-warning) 0%, var(--tr-color-warning) 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(250, 165, 48, 0.25) !important;
}

.tam-btn-credits:hover {
    background: linear-gradient(135deg, var(--tr-color-warning-hover) 0%, var(--tr-color-warning-hover) 100%) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(250, 165, 48, 0.35) !important;
}

.tam-btn-credits:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3), 0 6px 16px rgba(250, 165, 48, 0.35) !important;
}

.tam-btn-credits svg {
    flex-shrink: 0;
}

/* ================================
   WordPress Footer Fix
   ================================ */

/* Ensure WordPress admin footer stays below Tam Rank content */
.wrap:has(.tam-rank-hero-v2),
.wrap:has(.tam-rank-hero),
.wrap:has(.tam-rank-nav) {
    padding-bottom: 40px;
}

/* Fallback for browsers without :has() support */
.tam-rank-footer {
    margin-bottom: 40px;
}

/* Push WordPress footer down properly on Tam Rank pages */
body.toplevel_page_tam-rank-dashboard #wpfooter,
body[class*="tam-rank"] #wpfooter {
    position: relative !important;
}

/* ========================================
   PRO License Tab Styles
   ======================================== */

.tam-license-pro {
    /* Full width to match header */
    width: 100%;
}

.tam-license-pro-header-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Remove default card margin when inside grid to let gap handle spacing */
.tam-license-pro-header-row .tam-rank-card {
    margin: 0;
    height: 100%;
    /* Ensure equal height */
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .tam-license-pro-header-row {
        grid-template-columns: 1fr;
    }
}

.tam-credits-display-pro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 10px 0;
}

.tam-credits-number-pro {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 12px;
}

.tam-credits-total {
    font-size: 16px;
    color: var(--tr-color-slate-400);
    font-weight: 500;
}

.tam-credits-bar-wrapper-pro {
    width: 100%;
    height: 10px;
    background: var(--tr-color-surface);
    border-radius: var(--tr-radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
}

.tam-credits-bar-pro {
    height: 100%;
    border-radius: var(--tr-radius-sm);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tam-credits-reset {
    font-size: 12px;
    color: var(--tr-color-slate-500);
    text-align: right;
    font-style: italic;
}

.tam-active-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tam-active-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--tr-color-base);
    border-radius: var(--tr-radius-md);
    border: 1px solid var(--tr-color-surface);
    transition: all var(--tr-transition-base);
}

.tam-active-feature:hover {
    background: var(--tr-color-white);
    border-color: var(--tr-color-slate-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.tam-active-feature span {
    font-weight: 500;
    color: var(--tr-color-slate-700);
    font-size: 14px;
}

.tam-account-actions-card {
    margin-top: 24px;
}

.tam-account-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tam-license-info-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--tr-color-slate-200);
    font-size: 13px;
    color: var(--tr-color-slate-500);
}

.tam-license-key-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    background: var(--tr-color-surface);
    padding: 4px 8px;
    border-radius: var(--tr-radius-sm);
}

.tam-license-expires {
    color: var(--tr-color-slate-600);
}

/* Deactivate section styling */
.tam-deactivate-section {
    border-top: 1px dashed var(--tr-color-slate-200);
    padding-top: 20px;
}

.tam-btn-text-danger {
    background: transparent !important;
    border: none !important;
    color: var(--tr-color-error) !important;
    padding: 0 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    text-decoration: underline !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: inline-block !important;
}

.tam-btn-text-danger:hover {
    color: var(--tr-color-error-hover) !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

/* WebP Module Styles (moved from admin/css/tamrank-webp.css) */
.tamrank-webp-btn.tam-locked {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.tamrank-webp-btn.tam-locked::after {
    content: '\1F512';
    position: absolute;
    right: 8px;
}

/* ========================================
   GSC (Google Search Console) Integration
   ======================================== */

/* Quick Widget in Dashboard Header */
.tam-gsc-quick-widget {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    padding: 16px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tam-gsc-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-color-slate-700);
}

.tam-gsc-widget-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tam-gsc-metric {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tam-gsc-metric .tam-gsc-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--tr-color-slate-800);
    min-width: 50px;
}

.tam-gsc-metric .tam-gsc-label {
    font-size: 12px;
    color: var(--tr-color-slate-500);
    flex: 1;
}

.tam-gsc-metric .tam-gsc-change {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--tr-radius-sm);
}

.tam-gsc-change.positive {
    color: var(--tr-color-primary-hover);
    background: rgba(16, 185, 129, 0.1);
}

.tam-gsc-change.negative {
    color: var(--tr-color-error-hover);
    background: rgba(239, 68, 68, 0.1);
}

.tam-gsc-metric-change.positive {
    color: var(--tr-color-primary-hover);
}

.tam-gsc-metric-change.negative {
    color: var(--tr-color-error-hover);
}

.tam-gsc-metric-change svg {
    display: inline-block;
    vertical-align: middle;
    margin-top: -1px;
}

.tam-gsc-widget-link {
    font-size: 12px;
    color: var(--tr-color-info);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tam-gsc-widget-link:hover {
    color: var(--tr-color-info);
}

.tam-gsc-widget-error {
    font-size: 12px;
    color: var(--tr-color-error);
    margin: 0;
}

.tam-gsc-widget-cta-text {
    font-size: 12px;
    color: var(--tr-color-slate-500);
    margin: 0;
    line-height: 1.4;
}

.tam-gsc-widget-cta-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--tr-color-info);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--tr-color-info);
    border-radius: var(--tr-radius-sm);
    transition: all var(--tr-transition-base);
}

.tam-gsc-widget-cta-btn:hover {
    background: var(--tr-color-info);
    color: var(--tr-color-white);
}

/* GSC Section in Dashboard */
.tam-gsc-section {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    border: 1px solid var(--tr-color-slate-200);
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
}

.tam-gsc-section .tam-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.tam-gsc-section .tam-section-title-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tam-gsc-section .tam-section-title-group h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--tr-color-slate-800);
}

.tam-gsc-title-row {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    margin-bottom: 4px;
}

.tam-gsc-connected-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--tr-color-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--tr-radius-full);
}

.tam-gsc-property {
    font-size: 12px;
    color: var(--tr-color-slate-500);
}

.tam-gsc-section select.tam-date-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-medium);
    color: var(--tr-color-slate-700);
    background: var(--tr-color-white) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    line-height: 1.4;
    min-width: 140px;
    height: auto;
    box-shadow: var(--tr-shadow-sm);
    transition: border-color var(--tr-transition-fast), box-shadow var(--tr-transition-fast);
}

.tam-gsc-section select.tam-date-select:hover {
    border-color: var(--tr-color-slate-400);
}

.tam-gsc-section select.tam-date-select:focus {
    outline: none;
    border-color: var(--tr-color-primary);
    box-shadow: var(--tr-shadow-focus);
}

/* GSC Chart */
.tam-gsc-chart {
    position: relative;
    min-height: 300px;
    margin-top: 20px;
    margin-bottom: 0;
    overflow: hidden;
}

.tam-gsc-chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--tr-color-slate-500);
    font-size: 14px;
}

.tam-gsc-chart-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.tam-gsc-chart-error p {
    margin: 0;
    color: var(--tr-color-error);
    font-size: 13px;
}

/* Spinner animation */
.tam-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--tr-color-slate-200);
    border-top-color: var(--tr-color-info);
    border-radius: 50%;
    animation: tam-spin 0.8s linear infinite;
}

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

/* GSC Metrics Grid */
.tam-gsc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .tam-gsc-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tam-gsc-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.tam-gsc-metric-card {
    padding: 20px 24px;
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    transition: box-shadow var(--tr-transition-base);
}

.tam-gsc-metric-card:hover {
    box-shadow: var(--tr-shadow-sm);
}

.tam-gsc-metric-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--tr-color-slate-800);
    line-height: 1.2;
    margin-bottom: 4px;
}

.tam-gsc-metric-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--tr-color-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--tr-space-2);
}

.tam-gsc-metric-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* CTA footer */
.tam-gsc-section-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--tr-space-4);
    margin-top: var(--tr-space-4);
    border-top: 1px solid var(--tr-color-slate-100);
}

.tam-gsc-full-report-link {
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-color-primary);
    text-decoration: none;
    transition: color var(--tr-transition-fast);
}

.tam-gsc-full-report-link:hover {
    color: var(--tr-color-primary-hover);
}

/* Upsell bar inside GSC section: full-bleed tot aan de card-rand */
.tam-gsc-section > .tr-upsell {
    margin: var(--tr-space-4) -24px -24px;
    border-radius: 0 0 var(--tr-radius-lg) var(--tr-radius-lg);
}

/* ─── Generic FREE-tier Limit Counter Bar ────────
   Used by 404 Monitor and Redirect Manager to show X/limit + upsell.
*/
.tr-limit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tr-space-4);
    padding: var(--tr-space-3) var(--tr-space-5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-4);
    font-size: var(--tr-text-sm);
}

.tr-limit-bar__info {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
}

.tr-limit-bar__count {
    font-variant-numeric: tabular-nums;
    color: var(--tr-color-slate-900);
}

.tr-limit-bar__count strong {
    font-weight: var(--tr-font-bold);
}

.tr-limit-bar__label {
    color: var(--tr-color-slate-600);
}

.tr-limit-bar__cta {
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.tr-limit-bar__cta:hover {
    color: var(--tr-color-primary-hover);
    text-decoration: underline;
}

.tr-limit-bar.is-near-limit {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.12) 100%);
    border-color: rgba(245, 158, 11, 0.25);
}

.tr-limit-bar.is-at-limit {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.12) 100%);
    border-color: rgba(239, 68, 68, 0.25);
}

.tr-limit-bar.is-at-limit .tr-limit-bar__label {
    color: var(--tr-color-slate-700);
    font-weight: var(--tr-font-medium);
}

/* Stale data warning */
.tam-gsc-stale-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--tr-radius-md);
    color: var(--tr-color-warning);
    font-size: 13px;
    margin-bottom: 16px;
}

/* Dashboard hero adjustments for GSC widget */
.tam-score-hero {
    display: flex;
    align-items: stretch;
    gap: 24px;
    flex-wrap: wrap;
}

.tam-score-hero>.tam-gsc-quick-widget {
    margin-left: auto;
}

/* ========================================
   GSC Dashboard - Google Search Console Style
   ======================================== */

.tamrank-gsc-metrics {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: var(--tr-radius-md);
    overflow: hidden;
    border: 1px solid var(--tr-color-slate-200);
    background: var(--tr-color-white);
}

.tamrank-gsc-metric-card {
    flex: 1;
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--tr-transition-base);
    border-right: 1px solid var(--tr-color-slate-200);
    position: relative;
}

.tamrank-gsc-metric-card:last-child {
    border-right: none;
}

.tamrank-gsc-metric-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.tamrank-gsc-metric-card.active {
    border-right-color: rgba(255, 255, 255, 0.2);
}

.tamrank-gsc-metric-card .tamrank-gsc-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
    border-radius: 3px;
}

.tamrank-gsc-metric-card .tamrank-gsc-label {
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.tamrank-gsc-metric-card .tamrank-gsc-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.2s;
}

.tamrank-gsc-metric-card .tamrank-gsc-change {
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .tamrank-gsc-metrics {
        flex-direction: column;
    }

    .tamrank-gsc-metric-card {
        border-right: none;
        border-bottom: 1px solid var(--tr-color-slate-200);
    }

    .tamrank-gsc-metric-card:last-child {
        border-bottom: none;
    }

    .tamrank-gsc-metric-card.active {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }
}

/* ─── License Tab Pro ────────────────────────────────────────── */

/* Separator line */
.tr-separator {
    border: none;
    border-top: 1px solid var(--tr-surface);
    margin: var(--tr-space-sm) 0;
}

/* Pro Plan card with green border */
.tr-pro-plan-card {
    border: 1.5px solid var(--tr-primary);
}

.tr-pro-plan-card .tr-card-body {
    padding: var(--tr-space-md) var(--tr-space-lg);
}

.tr-pro-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Credits section */
.tr-pro-credits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tr-pro-credits-count {
    font-size: var(--tr-text-sm);
    color: var(--tr-slate-500);
}

.tr-pro-credits-bar {
    width: 100%;
    height: 8px;
    background: var(--tr-surface);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.tr-pro-credits-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Feature chips */
.tr-feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tr-space-sm);
    margin-top: var(--tr-space-sm);
}

.tr-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--tr-space-xs);
    padding: 6px var(--tr-space-md);
    border: none;
    border-radius: 20px;
    font-size: var(--tr-text-sm);
    font-weight: 500;
    color: var(--tr-primary);
    background: var(--tr-primary-light);
}

/* Account rows */
.tr-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tr-space-md) 0;
    border-bottom: 1px solid var(--tr-surface);
    gap: var(--tr-space-md);
}

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

.tr-account-row__info {
    flex: 1;
}

/* License key section */
.tr-license-key-section {
    margin-top: var(--tr-space-lg);
}

.tr-license-key-section .tr-label {
    margin-bottom: var(--tr-space-sm);
}

.tr-license-key-section .tr-input {
    background: var(--tr-white);
    color: var(--tr-slate-500);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.05em;
}

/* License deactivate */
.tr-license-deactivate {
    margin-top: var(--tr-space-lg);
    padding-top: var(--tr-space-md);
    border-top: 1px dashed var(--tr-surface);
}

/* ─── Inline Tip (shared) ──────────────────────────────────────
   NOTE: Despite the name, .tr-inline-tip is NOT a tooltip — it's an
   always-visible info callout/banner shown inline in page flow. Renaming
   to .tr-callout was considered but deferred (12 usage sites = high churn,
   low benefit). New code should use .tr-tooltip for contextual help and
   keep .tr-inline-tip only for persistent informational banners. */
.tr-inline-tip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tr-color-primary-light);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: var(--tr-space-5);
}

.tr-inline-tip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tr-color-primary);
    flex-shrink: 0;
}

.tr-inline-tip__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--tr-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tr-inline-tip__icon svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

.tr-inline-tip__text {
    flex: 1;
    font-size: var(--tr-text-sm, 13px);
    color: var(--tr-color-slate-700, #334155);
    line-height: 1.5;
}

.tr-inline-tip__text strong {
    color: var(--tr-color-slate-900, #0f172a);
}

.tr-inline-tip__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tr-inline-tip__credits {
    font-size: 12px;
    color: var(--tr-color-slate-400, #94a3b8);
    font-weight: 600;
    white-space: nowrap;
}

.tr-inline-tip__link {
    color: var(--tr-color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tr-inline-tip__link:hover {
    color: var(--tr-color-primary-hover, #059669);
    text-decoration: underline;
}

.tr-inline-tip__link--block {
    display: block;
    margin-top: 6px;
}

/* ─── AI Generator Section (PRO active) ─────────────────────── */
.tr-ai-generator-section {
    padding: var(--tr-space-md);
    background: var(--tr-primary-light);
    border-radius: var(--tr-radius-sm);
    margin-bottom: var(--tr-space-md);
}

.tr-ai-generator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--tr-space-sm);
}

.tr-ai-generator-actions {
    margin-bottom: var(--tr-space-sm);
}

.tr-ai-preview {
    margin-top: var(--tr-space-md);
}

.tr-ai-preview .tr-code-block {
    max-height: 200px;
    overflow-y: auto;
}

/* ─── Inline field rows (label left, input right) ─────────────── */
.tr-field-row--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tr-space-md);
}

.tr-field-row--inline .tr-label {
    margin: 0;
    white-space: nowrap;
    min-width: 140px;
    flex-shrink: 0;
}

.tr-field-row--inline .tr-select,
.tr-field-row--inline .tr-input {
    width: auto;
    min-width: 200px;
    flex: 1;
    max-width: 300px;
}

.tr-select--compact {
    width: auto !important;
}

/* ─── Index Status Column ─────────────────────────────────── */
.column-tamrank_index {
    width: 110px;
}

.tamrank-idx {
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.tamrank-idx__dot {
    font-size: 10px;
    margin-right: 2px;
}

.tamrank-idx__crawl {
    display: block;
    font-size: 11px;
    color: var(--tr-color-text-secondary, #64748b);
}

.tamrank-index-link.tamrank-index--busy {
    pointer-events: none;
    opacity: 0.6;
}

/* ─── Guide Card (PRO upsell — full-tab locked features) ───── */

.tr-guide-card {
    background: linear-gradient(135deg, var(--tr-color-primary-light) 0%, var(--tr-color-white, #fff) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--tr-radius-lg, 12px);
    padding: var(--tr-space-6, 24px);
}

.tr-guide-card__top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: var(--tr-space-4, 16px);
}

.tr-guide-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--tr-radius-md, 10px);
    background: var(--tr-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.tr-guide-card__icon svg {
    width: 20px;
    height: 20px;
}

.tr-guide-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-color-text-primary, #0f172a);
    margin: 0 0 4px;
}

.tr-guide-card__desc {
    font-size: var(--tr-text-sm, 13px);
    color: var(--tr-color-text-secondary, #475569);
    line-height: 1.55;
}

.tr-guide-card__benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--tr-space-4, 16px);
}

.tr-guide-card__benefit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tr-color-white, #fff);
    border: 1px solid var(--tr-color-slate-200, #e2e8f0);
    border-radius: var(--tr-radius-sm, 8px);
    padding: 8px 12px;
    font-size: var(--tr-text-xs, 12px);
    color: var(--tr-color-text-secondary, #334155);
}

.tr-guide-card__check {
    color: var(--tr-color-primary);
    font-weight: 700;
    font-size: 13px;
}

.tr-guide-card__extra {
    font-size: 12px;
    color: var(--tr-color-slate-500);
    line-height: 1.5;
    margin: 0;
    padding-top: 10px;
}

.tr-guide-card__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--tr-space-5, 20px);
    padding-top: var(--tr-space-4, 16px);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
}

.tr-guide-card__action:has(:only-child) {
    justify-content: flex-end;
}

.tr-guide-card__action-label {
    font-size: var(--tr-text-xs, 12px);
    color: var(--tr-color-text-tertiary, #64748b);
}

.tr-guide-card__license {
    margin-top: 14px;
    text-align: center;
}

.tr-guide-card__license-text {
    font-size: var(--tr-text-xs, 12px);
    color: var(--tr-color-text-tertiary, #64748b);
}

.tr-guide-card__license-link {
    color: var(--tr-color-primary);
    text-decoration: none;
    font-weight: 600;
}

.tr-guide-card__license-link:hover {
    text-decoration: underline;
    color: var(--tr-color-primary-hover, #059669);
}
/* ─── Bulk alt text for existing media ────────────────────────── */
.tr-alt-bulk-panel {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid var(--tr-color-border, #e2e8f0);
    border-radius: var(--tr-radius-md, 8px);
    background: var(--tr-surface, #f8fafc);
}

.tr-alt-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* What is standing in the library, not what just happened: this line survives a
   reload, where .tr-alt-bulk-status is emptied by the next walk. Success tokens
   from variables.css, no colours of its own. */
.tr-alt-bulk-filled {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 12px 0 0 0;
    padding: 8px 12px;
    border-radius: var(--tr-radius-sm, 8px);
    background: var(--tr-color-success-bg);
    font-size: var(--tr-text-sm, 13px);
    color: var(--tr-color-text-primary, #0f172a);
}

.tr-alt-bulk-filled[hidden] {
    display: none;
}

.tr-alt-bulk-filled__icon {
    color: var(--tr-color-success);
    font-weight: 700;
}

/* Why Preview and Fill are off. Directly under the buttons, because a disabled
   button carries pointer-events: none and cannot hold a tooltip. */
.tr-alt-bulk-nothing {
    margin: 10px 0 0 0;
}

.tr-alt-bulk-status {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-text-tertiary, #64748b);
    margin: 10px 0 0 0;
    min-height: 1em;
}

.tr-alt-bulk-summary {
    font-size: var(--tr-text-sm, 13px);
    font-weight: 600;
    color: var(--tr-color-text-primary, #0f172a);
    margin: 12px 0 0 0;
}

.tr-alt-bulk-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: var(--tr-text-xs);
}

.tr-alt-bulk-table th,
.tr-alt-bulk-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--tr-color-border, #e2e8f0);
    vertical-align: top;
}

.tr-alt-bulk-table th {
    color: var(--tr-color-text-tertiary, #64748b);
    font-weight: 600;
}

.tr-alt-bulk-table code {
    background: transparent;
    padding: 0;
    color: var(--tr-color-text-primary, #0f172a);
}

/* ============================================================
   Inline card notices (robots.txt: physical file, suppressed
   Sitemap: line). Kept to the shared palette tokens.
   ============================================================ */

.tr-notice {
    padding: var(--tr-space-3) var(--tr-space-4);
    margin-bottom: var(--tr-space-4);
    border-radius: var(--tr-radius-md);
    background: var(--tr-color-info-bg);
    color: var(--tr-color-slate-700);
    font-size: var(--tr-text-sm);
    line-height: 1.6;
}

.tr-notice--warning {
    background: var(--tr-color-warning-bg);
}

.tr-notice--info {
    background: var(--tr-color-info-bg);
}

/* A notice that carries an action (the stale Sitemap: line fix). The button
   sits under the sentence, not beside it: the sentence wraps to several lines
   in every language and a floated button would end up next to a fragment. */
.tr-notice__action {
    margin-top: var(--tr-space-3);
}

/* ============================================================
   Migration status line (Import / Export -> SEO data migration)

   Same idiom as the robots.txt status line: a state that needs no
   action gets the least ink on the screen - a small green dot and
   one sentence, no panel, no tinted background, no border. The
   numbers are copied from .tr-robots-status on purpose; that block
   is scoped to the robots section and this card is on another tab.
   ============================================================ */

.tr-migration-status {
    display: flex;
    align-items: flex-start;
    gap: var(--tr-space-2);
    margin: 0;
    font-size: var(--tr-text-sm);
    line-height: var(--tr-leading-normal);
    color: var(--tr-color-slate-600);
}

/* margin-top optically centres the dot on the first line of text. */
.tr-migration-status__dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 0.4em;
    border-radius: var(--tr-radius-full);
    background: var(--tr-color-success);
}
