/**
 * Tier1 Cabinet — Frontend styles (My Account pages).
 * Designed to work with Astra theme.
 */

/* ─── Type icons (Unicode symbols) ───────────────────────────── */

.t1c-type-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    vertical-align: middle;
}

.t1c-type-icon-svg {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* ─── My Account page title ────────────────────────────────── */
body.t1c-page .entry-title,
body.woocommerce-account .entry-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

/* ─── Full-width layout — all My Account pages ──────────────── */

.t1c-fullwidth {
    max-width: none !important;
}

/* Break out of Astra container on all T1C pages */
body.t1c-page .site-content .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

body.t1c-page #primary,
body.t1c-page .content-area,
body.t1c-page .entry-content {
    max-width: 100% !important;
    width: 100% !important;
}

/* Break out of the tier1-theme content container on all T1C pages (the v3
   staging theme wraps content in .tier1-entry-content @ max-width:1120px).
   Harmless on Astra prod — these classes don't exist there. Mirrors the Astra
   breakout above so the wide webmaster table is full-width like prod. */
body.t1c-page .tier1-entry-content,
body.t1c-page .tier1-wc-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Horizontal sidebar on ALL My Account pages */
.woocommerce-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 20px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* ─── Balance bar (compact chips) ─────────────────────────────── */

.t1c-balance-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    justify-content: center;
}

/* Wallet group: chip + topup button side by side */
.t1c-wallet-group {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.t1c-wallet-group a.t1c-balance-wallet {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.t1c-wallet-group a.t1c-balance-topup {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin: 0;
}

/* Wallet chip in balance bar */
a.t1c-balance-wallet {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    text-decoration: none !important;
    color: #166534;
    font-weight: 600;
    transition: all 0.15s;
}

a.t1c-balance-wallet:hover {
    background: #fff;
    border-color: #667eea;
    color: #166534;
    text-decoration: underline !important;
    text-decoration-color: rgba(22, 101, 52, 0.3) !important;
    text-underline-offset: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Topup button */
a.t1c-balance-topup {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.15s;
    white-space: nowrap;
}

a.t1c-balance-topup:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    text-decoration: none !important;
}

.t1c-balance-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

a.t1c-balance-chip,
.t1c-balance-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.15s;
}

a.t1c-balance-chip:hover,
.t1c-balance-chip:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #667eea;
    text-decoration: underline !important;
    text-decoration-color: rgba(102, 126, 234, 0.3) !important;
    text-underline-offset: 3px;
    color: inherit;
}

/* Wallet chip icon hidden (emoji already in label) */
.t1c-balance-wallet .t1c-chip-icon {
    display: none;
}

.t1c-chip-icon {
    font-size: 18px;
    line-height: 1;
}

.t1c-chip-label {
    color: #64748b;
    font-weight: 500;
}

.t1c-chip-num {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

.t1c-chip-total {
    font-size: 12px;
    color: #94a3b8;
}

.t1c-balance-chip-onetime     { border-left: 3px solid #3730a3; }
.t1c-balance-chip-yearly      { border-left: 3px solid #92400e; }
.t1c-balance-chip-through     { border-left: 3px solid #065f46; }
.t1c-balance-chip-replacement { border-left: 3px solid #9333ea; }
.t1c-balance-chip-renewal     { border-left: 3px solid #0891b2; }

/* Zero balance — muted/grey */
.t1c-balance-chip-zero {
    opacity: 0.45;
    filter: grayscale(0.6);
}
.t1c-balance-chip-zero:hover {
    opacity: 0.75;
    filter: grayscale(0);
}

/* Active chip — current page filter */
a.t1c-balance-chip.t1c-balance-chip-active { background: #eef2ff; border-color: #667eea; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15); }
a.t1c-balance-wallet.t1c-balance-wallet-active { background: #f0fdf4; border-color: #86efac; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1); }

/* ─── All links filters ──────────────────────────────────────── */

.t1c-all-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.t1c-all-filters form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.t1c-all-filters select {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

/* ─── Acceptor filter dropdown ─────────────────────────────── */

.t1c-acceptor-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.t1c-acceptor-toggle {
    position: relative;
    white-space: nowrap;
}
.t1c-acceptor-active .t1c-acceptor-toggle {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}
.t1c-acceptor-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #3b82f6;
    border-radius: 8px;
}
.t1c-acceptor-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 4px 0;
    margin-top: 4px;
}
.t1c-acceptor-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.t1c-acceptor-item:hover { background: #f1f5f9; }
.t1c-acceptor-item input { margin: 0; flex: 0 0 auto; }
.t1c-acceptor-item span:first-of-type { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.t1c-acceptor-num {
    flex: 0 0 auto;
    font-size: 11px;
    color: #94a3b8;
}
.t1c-acceptor-all {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 2px;
    font-weight: 600;
}
.t1c-acceptor-chips {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.t1c-acceptor-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.t1c-acceptor-chip-x {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.t1c-acceptor-chip-x:hover { color: #dc2626; }
.t1c-acceptor-clear {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    white-space: nowrap;
}
.t1c-acceptor-clear:hover { color: #dc2626; }

.t1c-btn-reset-all {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
    font-size: 11px;
    white-space: nowrap;
}
.t1c-btn-reset-all:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.t1c-all-count {
    margin-left: auto;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.t1c-btn-export-csv {
    font-size: 11px;
    padding: 3px 10px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.t1c-btn-export-csv:hover {
    background: #dcfce7;
    border-color: #86efac;
}

/* ─── Order reference in all-links ─────────────────────────────── */

.t1c-order-ref {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

.t1c-order-ref:hover {
    text-decoration: underline;
}

.t1c-wc-ref {
    font-size: 11px;
    color: #94a3b8;
    display: block;
}

.t1c-col-order {
    width: 75px;
    white-space: nowrap;
}

.t1c-col-type-sm {
    width: 70px;
    text-align: center;
    white-space: nowrap;
}

.t1c-col-order-date {
    width: 70px;
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
}

.t1c-col-screenshot {
    width: 40px;
    text-align: center;
}

.t1c-col-placed { width: 75px; white-space: nowrap; }
.t1c-col-expires {
    width: 75px;
    white-space: nowrap;
}

/* Centered headers on the client's All Links table */
.t1c-all-links-page .t1c-table thead th { text-align: center; }

/* Pull the native calendar icon inside the cell — default
   ::-webkit-calendar-picker-indicator has ~4px right padding that
   pushed the icon over the column edge when the cell is narrow. */
.t1c-col-expires input[type="date"],
.t1c-col-placed input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 2px 2px 2px 4px;
    font-size: 11px;
}
.t1c-col-expires input[type="date"]::-webkit-calendar-picker-indicator,
.t1c-col-placed input[type="date"]::-webkit-calendar-picker-indicator {
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.t1c-permanent-mark {
    color: #16a34a;
    font-size: 16px;
    font-weight: 700;
}

/* ─── WC Orders table — product items in Total column ────────── */

.t1c-order-items {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.t1c-order-item {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* ─── Balance cards ────────────────────────────────────────────── */

.t1c-balance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.t1c-balance-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.2s;
}

.t1c-balance-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.t1c-card-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.t1c-card-content h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.t1c-card-numbers {
    display: flex;
    gap: 20px;
}

.t1c-card-number {
    text-align: center;
}

.t1c-card-number .t1c-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.t1c-card-number .t1c-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.t1c-available .t1c-num { color: #2563eb; }
.t1c-used .t1c-num      { color: #64748b; }
.t1c-total .t1c-num      { color: #334155; }

/* ─── Section titles ───────────────────────────────────────────── */

.t1c-section-title {
    font-size: 18px;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* ─── Tables ───────────────────────────────────────────────────── */

.t1c-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.t1c-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    font-size: 13px;
    white-space: nowrap;
}

.t1c-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.t1c-table tbody tr:hover {
    background: #f8fafc;
}

.t1c-positive { color: #16a34a; font-weight: 600; }
.t1c-negative { color: #dc2626; font-weight: 600; }

/* Balance history rows */
.t1c-row-credit { background: #f0fdf4; }
.t1c-row-debit { background: #fef2f2; }
.t1c-reason-cell { font-size: 0.9em; line-height: 1.4; }
.t1c-reason-link { color: #2563eb; text-decoration: none; font-size: 0.85em; }
.t1c-reason-link:hover { text-decoration: underline; }
.t1c-balance-chip-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85em;
    white-space: nowrap;
}

/* ─── Spreadsheet table ───────────────────────────────────────── */

.t1c-spreadsheet-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.t1c-spreadsheet {
    border-radius: 8px;
    border: none;
    table-layout: fixed;
    width: 100%;
}

.t1c-spreadsheet th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f0f4ff;
    color: #374151;
    font-size: 11px;
    padding: 5px 4px;
    border-bottom: 2px solid #d1d5db;
    user-select: none;
}

.t1c-spreadsheet td {
    padding: 3px 4px;
    border-bottom: 1px solid #edf2f7;
    border-right: 1px solid #f1f5f9;
    line-height: 1.3;
    white-space: nowrap;
}

/* Flexible columns get ellipsis (URL, Anchor share remaining space) */
.t1c-spreadsheet td.t1c-col-url,
.t1c-spreadsheet td.t1c-col-anchor {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

/* Fixed-width columns that still need ellipsis for overflow */
.t1c-spreadsheet td.t1c-col-donor,
.t1c-spreadsheet td.t1c-col-comment {
    overflow: hidden;
    text-overflow: ellipsis;
}

.t1c-spreadsheet td:last-child {
    border-right: none;
}

.t1c-col-resize {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
}

.t1c-col-resize:hover {
    background: rgba(99, 102, 241, 0.3);
}

.t1c-spreadsheet .t1c-col-num {
    width: 26px;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    background: #fafbfc;
}

/* max-width removed from th — JS controls column widths via table-layout:fixed */

/* Truncate text with ellipsis */
.t1c-truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Cell with copy button */
.t1c-cell-with-copy {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.t1c-cell-with-copy .t1c-truncate {
    flex: 1;
    min-width: 0;
}

/* Copy button */
.t1c-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    opacity: 0;
}

.t1c-cell-with-copy:hover .t1c-copy-btn,
.t1c-copy-btn:focus {
    opacity: 1;
}

.t1c-copy-btn:hover {
    color: #667eea;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.t1c-copy-btn.t1c-copied {
    opacity: 1;
    color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.t1c-spreadsheet .t1c-col-status {
    width: 122px;
    text-align: center;
}

.t1c-spreadsheet .t1c-col-donor {
    width: 130px;
}

.t1c-spreadsheet .t1c-col-actions {
    width: 110px;
    white-space: nowrap;
    text-align: center;
}

/* Spreadsheet cell inputs */
.t1c-cell-input {
    width: 100%;
    min-width: 120px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
    background: transparent;
    transition: all 0.15s;
    box-sizing: border-box;
}

.t1c-cell-input:hover {
    border-color: #d1d5db;
    background: #fff;
}

.t1c-cell-input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.t1c-cell-input::placeholder {
    color: #cbd5e1;
    font-size: 12px;
}

.t1c-cell-filled {
    background: #f0f7ff !important;
    border-color: #667eea !important;
}

.t1c-cell-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t1c-cell-link:hover {
    text-decoration: underline;
}

/* Cell with copy button */
.t1c-cell-with-copy {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
}

.t1c-cell-with-copy .t1c-cell-link,
.t1c-cell-with-copy .t1c-cell-text,
.t1c-cell-with-copy .t1c-donor-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.t1c-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.t1c-cell-with-copy:hover .t1c-copy-btn,
tr:hover .t1c-copy-btn {
    opacity: 0.5;
}

.t1c-copy-btn:hover {
    opacity: 1 !important;
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.t1c-copy-btn.t1c-copied {
    opacity: 1 !important;
    background: #dcfce7;
    border-color: #86efac;
}

/* Row hover for editable rows */
.t1c-spreadsheet .t1c-row-editable:hover {
    background: #f8f9ff;
}

.t1c-spreadsheet .t1c-row-editable:hover .t1c-col-num {
    background: #eef1ff;
    color: #667eea;
}

/* Autosave row states */
.t1c-row-saving {
    opacity: 0.85;
    transition: opacity 0.2s;
}

.t1c-row-saved {
    animation: t1c-saved-flash 2s ease-out;
}

@keyframes t1c-saved-flash {
    0% { background-color: #ecfdf5; }
    100% { background-color: transparent; }
}

.t1c-row-error .t1c-cell-input,
.t1c-autosave-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

/* ─── Status badges ────────────────────────────────────────────── */

.t1c-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.t1c-status-pending    { background: #fef3c7; color: #92400e; }
.t1c-status-confirm    { background: #ede9fe; color: #5b21b6; }
.t1c-status-progress   { background: #dbeafe; color: #1e40af; }
.t1c-status-checking   { background: #e0f2fe; color: #0369a1; }
.t1c-status-completed  { background: #dcfce7; color: #166534; }
.t1c-status-revision   { background: #fde2e2; color: #991b1b; }

/* ─── Badges ───────────────────────────────────────────────────── */

.t1c-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.t1c-badge-onetime     { background: #fff; color: #333; border: 1px solid #d1d5db; }
.t1c-badge-yearly      { background: #fef3c7; color: #92400e; }
.t1c-badge-through     { background: #d1fae5; color: #065f46; }
.t1c-badge-replacement { background: #f3e8ff; color: #9333ea; }

/* ─── Progress bar (segmented) ─────────────────────────────────── */

.t1c-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 130px;
}

.t1c-progress-bar {
    width: 100px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-shrink: 0;
}

.t1c-progress-segment {
    height: 100%;
    transition: width 0.3s;
}

.t1c-seg-completed     { background: #16a34a; }
.t1c-seg-progress      { background: #3b82f6; }
.t1c-seg-revision      { background: #f59e0b; }
.t1c-seg-awaiting-conf { background: #a78bfa; }
.t1c-seg-awaiting      { background: #e2e8f0; }

.t1c-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s;
}

.t1c-progress-text {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* ─── Orders table enhancements ───────────────────────────────── */

.t1c-order-num {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.t1c-order-num:hover {
    text-decoration: underline;
}

.t1c-col-amount {
    white-space: nowrap;
}

.t1c-payment-amount {
    font-weight: 600;
    font-size: 13px;
}

.t1c-invoice-link {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 2px;
}

.t1c-invoice-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.t1c-row-cancelled {
    opacity: 0.6;
}

.t1c-row-cancelled:hover {
    opacity: 0.8;
}

.t1c-status-active    { background: #dcfce7; color: #166534; }
.t1c-status-cancelled { background: #fee2e2; color: #991b1b; }
.t1c-status-converted { background: #dbeafe; color: #1e40af; }

/* Converted-conversion hints — subtle, non-intrusive */
.t1c-progress-converted {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    vertical-align: middle;
}
.t1c-progress-converted::first-letter { color: #1e40af; }

.t1c-converted-block {
    margin-top: 16px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #93c5fd;
    border-radius: 4px;
    font-size: 13px;
    color: #4b5563;
}
.t1c-converted-header {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 6px;
}
.t1c-converted-icon { color: #1e40af; margin-right: 4px; }
.t1c-converted-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.t1c-converted-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.t1c-converted-num     { color: #9ca3af; font-family: ui-monospace, monospace; }
.t1c-converted-type-strike { text-decoration: line-through; color: #9ca3af; }
.t1c-converted-arrow   { color: #6b7280; }
.t1c-converted-target  { color: #1e40af; font-weight: 500; }
.t1c-converted-date    { color: #9ca3af; font-size: 11px; }

/* WC order status badges */
.t1c-wc-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.t1c-wc-status-processing { background: #dbeafe; color: #1e40af; }
.t1c-wc-status-completed  { background: #dcfce7; color: #166534; }
.t1c-wc-status-on-hold    { background: #fef3c7; color: #92400e; }
.t1c-wc-status-pending     { background: #f3f4f6; color: #6b7280; }
.t1c-wc-status-cancelled   { background: #fee2e2; color: #991b1b; }
.t1c-wc-status-refunded    { background: #fce7f3; color: #9d174d; }
.t1c-wc-status-failed      { background: #fee2e2; color: #991b1b; }

/* Link progress row inside orders table */
.t1c-link-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.t1c-link-progress-row:last-child {
    margin-bottom: 0;
}

.t1c-badge-sm {
    font-size: 10px;
    padding: 1px 5px;
}

a.t1c-badge-link {
    text-decoration: none !important;
    cursor: pointer;
}
a.t1c-badge-link:hover {
    opacity: 0.8;
    text-decoration: underline !important;
    text-decoration-color: rgba(0, 0, 0, 0.3) !important;
    text-underline-offset: 2px;
}

.t1c-col-links-progress {
    min-width: 180px;
}

/* ─── Buttons ──────────────────────────────────────────────────── */

.t1c-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.t1c-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111;
    text-decoration: none;
}

.t1c-btn-sm {
    padding: 2px 8px;
    font-size: 11px;
}

.t1c-btn-danger,
.t1c-btn-danger-outline {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
}
.t1c-btn-danger:hover,
.t1c-btn-danger-outline:hover {
    background: #dc3545;
    color: #fff;
}
.t1c-btn-danger:disabled,
.t1c-btn-danger-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.t1c-cancel-pending-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.t1c-btn-primary {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.t1c-btn-primary:hover {
    background: #5a6fd6;
    color: #fff;
    border-color: #5a6fd6;
}

.t1c-btn-selection {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
    text-decoration: none !important;
}
.t1c-btn-selection:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.t1c-col-selection { width: 70px; text-align: center; }

.t1c-btn-warning {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

.t1c-btn-warning:hover {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
}

.t1c-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Order view ───────────────────────────────────────────────── */

.t1c-order-header {
    margin-bottom: 24px;
}

.t1c-back-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.t1c-back-link:hover {
    text-decoration: underline;
}

.t1c-order-meta {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.t1c-order-meta-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.t1c-order-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.t1c-meta-label {
    color: #64748b;
    min-width: 70px;
}

.t1c-meta-value {
    color: #1e293b;
    font-weight: 500;
}

.t1c-order-actions {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.t1c-actions-right {
    margin-left: auto;
    position: relative;
}

.t1c-paste-hint {
    font-size: 12px;
    color: #94a3b8;
    padding: 4px 10px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px dashed #d1d5db;
}

.t1c-actions-cell {
    white-space: nowrap;
    padding: 4px 6px !important;
    text-align: center;
}

.t1c-actions-cell .t1c-actions-wrap {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    vertical-align: middle;
}
@media (max-width: 1200px) {
    .t1c-actions-cell .t1c-actions-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Edit anchor button — orange accent */
.t1c-task-edit-anchor {
    color: #d97706;
    border-color: #fbbf24;
}
.t1c-task-edit-anchor:hover {
    background: #fffbeb;
    border-color: #d97706;
}

/* ─── Context text indicator (A: icon + left border, B: row bg) ──── */

/* A: Left border on rows with surrounding text */
.t1c-has-context > td:first-child {
    box-shadow: inset 3px 0 0 #f59e0b;
}

/* B: Subtle amber background on rows with context */
.t1c-has-context > td {
    background: #fffbeb;
}

/* Context toggle icon in anchor cell */
.t1c-context-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0 3px 0 0;
    color: #f59e0b;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.t1c-context-toggle:hover {
    transform: scale(1.2);
}
/* Rotated when context row is expanded */
.t1c-context-toggle.t1c-ctx-open {
    color: #d97706;
}

/* Context display row */
.t1c-context-display {
    padding: 8px 12px;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #78350f;
    border-left: 3px solid #f59e0b;
}

/* ─── Icon buttons ────────────────────────────────────────────── */

.t1c-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.15s;
    vertical-align: middle;
}

.t1c-icon-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: scale(1.1);
}

.t1c-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #f8fafc;
}

/* Loading spinner for icon buttons */
.t1c-icon-btn.t1c-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.t1c-icon-btn.t1c-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: t1c-spin 0.6s linear infinite;
}
@keyframes t1c-spin {
    to { transform: rotate(360deg); }
}

.t1c-icon-btn + .t1c-icon-btn {
    margin-left: 2px;
}
.t1c-tasks-table .t1c-icon-btn + .t1c-icon-btn {
    margin-left: 0;
}

.t1c-icon-primary {
    background: #667eea;
    border-color: #667eea;
}

.t1c-icon-primary.t1c-submit-link {
    animation: t1c-pulse-glow 2.5s ease-in-out infinite;
}

.t1c-icon-primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
    animation: none;
}

.t1c-icon-replace {
    border-color: #ea580c;
    color: #ea580c;
}

.t1c-icon-replace:hover {
    background: #fff7ed;
    border-color: #ea580c;
}

/* Replacement type-icon on the "Замены ссылок" balance card — orange pencil,
   same glyph/colour as the replace-URL/anchor action button (single recognisable
   "change URL/anchor" cue across the cabinet). */
.t1c-type-icon-replace {
    color: #ea580c;
    font-style: normal;
}

.t1c-icon-renew {
    border-color: #16a34a;
    color: #16a34a;
}

.t1c-icon-renew:hover {
    background: #f0fdf4;
    border-color: #16a34a;
}

.t1c-icon-renew:disabled {
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Zero-balance state on action icons: not disabled — clicking opens the
   "buy more" qty-modal. Visually subdued so the active (>0 balance)
   icons still pop, but the button stays clickable. */
.t1c-icon-btn.t1c-icon-needs-purchase {
    opacity: 0.55;
    border-style: dashed;
}
.t1c-icon-btn.t1c-icon-needs-purchase:hover {
    opacity: 1;
    border-style: solid;
}

/* Client link-removal: red ✕ action + undo (cancel-removal) + danger modal button. */
.t1c-icon-remove {
    border-color: #dc2626;
    color: #dc2626;
    font-weight: 700;
}
.t1c-icon-remove:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
.t1c-cancel-removal {
    border-color: #64748b;
    color: #64748b;
}
.t1c-cancel-removal:hover {
    background: #f1f5f9;
    border-color: #475569;
}
.t1c-btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.t1c-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}
.t1c-modal-icon-danger {
    color: #dc2626;
}

/* Expiration status colors */
.t1c-expired { color: #dc2626; font-weight: 600; }
.t1c-expiring-soon { color: #ea580c; font-weight: 600; }

/* Soft pink row background for placed links whose expires_at has already
   passed. Applied only on .t1c-link-row (the /link-all/ spreadsheet) so the
   client visually picks them out in the full list. Padding via inset-shadow
   keeps the row's other cells flush; td color overrides cell-by-cell. */
.t1c-link-row.t1c-row-expired td { background-color: #fef2f2; }
.t1c-link-row.t1c-row-expired:hover td { background-color: #fee2e2; }

/* Renewal-page filter pills (replaces the small gray .t1c-btn buttons).
   Bigger touch target + colour-coded counts move overdue/expiring stats
   onto the filter itself — removes the duplicate "Просрочено: N" line
   that used to sit above the toolbar. */
.t1c-renewal-toolbar .t1c-renewal-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.t1c-renewal-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, transform .05s;
}
.t1c-renewal-filter:hover { text-decoration: none; transform: translateY(-1px); }
.t1c-renewal-filter:active { transform: translateY(0); }
.t1c-renewal-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .08);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

/* All — neutral pill, becomes blue when active */
.t1c-renewal-filter-all {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}
.t1c-renewal-filter-all:hover { background: #e5e7eb; color: #111827; }
.t1c-renewal-filter-all.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.t1c-renewal-filter-all.is-active .t1c-renewal-filter-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

/* Просроченные — red */
.t1c-renewal-filter-expired {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.t1c-renewal-filter-expired:hover { background: #fecaca; color: #991b1b; }
.t1c-renewal-filter-expired .t1c-renewal-filter-count {
    background: rgba(185, 28, 28, .15);
    color: #991b1b;
}
.t1c-renewal-filter-expired.is-active {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.t1c-renewal-filter-expired.is-active .t1c-renewal-filter-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

/* Истекающие — amber */
.t1c-renewal-filter-expiring {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}
.t1c-renewal-filter-expiring:hover { background: #fed7aa; color: #9a3412; }
.t1c-renewal-filter-expiring .t1c-renewal-filter-count {
    background: rgba(194, 65, 12, .15);
    color: #9a3412;
}
.t1c-renewal-filter-expiring.is-active {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}
.t1c-renewal-filter-expiring.is-active .t1c-renewal-filter-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.t1c-icon-warning {
    border-color: #f59e0b;
}

.t1c-icon-warning:hover {
    background: #fffbeb;
    border-color: #d97706;
}

.t1c-icon-cancel {
    border-color: #dc2626;
}

.t1c-icon-cancel:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.t1c-actions-cell .t1c-btn {
    margin-right: 4px;
}

.t1c-comment-row td {
    padding-top: 0;
}

.t1c-admin-comment {
    background: #f0f7ff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
}

.t1c-empty-field {
    color: #cbd5e1;
}

.t1c-donor-link {
    color: #16a34a;
    font-size: 12px;
}

.t1c-screenshot-link {
    margin-left: 4px;
    text-decoration: none;
}

/* ─── Pagination ───────────────────────────────────────────────── */

.t1c-pagination {
    margin-top: 20px;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.t1c-page-current,
.t1c-page-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    color: #374151;
}

.t1c-page-current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.t1c-page-link:hover {
    background: #f9fafb;
}

/* ─── Empty state ──────────────────────────────────────────────── */

.t1c-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
    font-size: 15px;
}

/* ─── Toast notification ───────────────────────────────────────── */

.t1c-toast {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: 320px !important;
    padding: 10px 18px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #fff !important;
    z-index: 99999 !important;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    float: none !important;
    display: block !important;
    text-align: left !important;
}

.t1c-toast.t1c-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.t1c-toast-success { background: #16a34a !important; }
.t1c-toast-error   { background: #dc2626 !important; }

/* ─── Update toast (persistent polling notification) ──────────── */

.t1c-update-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: #1e40af;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.t1c-update-toast-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.t1c-update-toast-text { flex: 1 1 auto; }
.t1c-update-toast-btn {
    background: #fff;
    color: #1e40af;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.t1c-update-toast-btn:hover { background: #dbeafe; }
.t1c-update-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.t1c-update-toast-close:hover { color: #fff; }
.t1c-update-toast-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}
.t1c-update-toast-countdown:empty { display: none; }
.t1c-update-toast-auto {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    cursor: pointer;
}
.t1c-update-toast-auto input {
    margin: 0;
    accent-color: #93c5fd;
}

/* ─── URL protocol modal ──────────────────────────────────────── */

.t1c-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.2s;
}
.t1c-modal-overlay.t1c-modal-show {
    opacity: 1;
}
.t1c-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}
.t1c-modal-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.t1c-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}
.t1c-modal-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 18px;
}
.t1c-modal-count {
    font-weight: 600;
}
.t1c-modal-urls {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
    text-align: left;
}
.t1c-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.t1c-modal-actions .t1c-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}
.t1c-modal-replace {
    background: linear-gradient(135deg, #667eea, #22c55e) !important;
    color: #fff !important;
    border-color: #667eea !important;
}
.t1c-modal-replace:hover {
    opacity: 0.9;
}
.t1c-modal-keep {
    background: #f1f5f9 !important;
    color: #475569 !important;
}
.t1c-modal-keep:hover {
    background: #e2e8f0 !important;
}

/* ─── Webmaster anchor modal ──────────────────────────────────── */

.t1c-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.t1c-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.t1c-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 4px;
    line-height: 1;
}
.t1c-modal-close:hover { color: #475569; }
.t1c-modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.t1c-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 18px;
}

/* ─── Replacement modal ──────────────────────────────────────── */

.t1c-repl-modal-current {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
}
.t1c-repl-modal-field {
    margin-bottom: 12px;
}
.t1c-repl-modal-field:last-child {
    margin-bottom: 0;
}
.t1c-repl-modal-value {
    font-size: 14px;
    color: #1e293b;
    word-break: break-all;
    margin-top: 2px;
}
.t1c-repl-modal-donor {
    color: #5a6acf;
    font-size: 13px;
}
.t1c-repl-modal-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
}
.t1c-repl-modal-new .t1c-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d4c5f0;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 4px;
    box-sizing: border-box;
}
.t1c-repl-modal-new .t1c-input:focus {
    border-color: #7B2FBE;
    outline: none;
    box-shadow: 0 0 0 2px rgba(123,47,190,0.15);
}
.t1c-repl-modal-bulk-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #7B2FBE;
    background: #f3e8ff;
    border: 1px solid #d8b4fe;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}
.t1c-repl-modal-bulk-link:hover {
    background: #ede5f7;
    border-color: #7B2FBE;
    color: #6d28d9;
}
.t1c-repl-modal-balance {
    font-size: 12px;
    color: #64748b;
    width: 100%;
    text-align: right;
    margin-top: 4px;
}
#t1c-repl-modal .t1c-modal {
    max-width: 520px;
    text-align: left;
}

/* ─── Schedule clear button (per-link ×) ───────────────────────── */

.t1c-schedule-clear-one {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 3px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: color 0.15s, background 0.15s;
}
.t1c-schedule-clear-one:hover {
    color: #dc3545;
    background: #fee2e2;
}

/* ─── Pending replacements bar (link-all page) ─────────────────── */

.t1c-repl-pending-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: #f3e8ff;
    border: 1px solid #d8b4fe;
    border-radius: 8px;
    font-size: 14px;
    color: #5b21b6;
}
.t1c-repl-pending-bar .t1c-btn {
    white-space: nowrap;
    background: #7B2FBE;
    color: #fff;
    border: none;
}
.t1c-repl-pending-bar .t1c-btn:hover {
    background: #6d28d9;
}

/* ─── Modal submit (rocket) button ─────────────────────────────── */

.t1c-btn-rocket {
    background: #7B2FBE !important;
    border-color: #7B2FBE !important;
}
.t1c-btn-rocket:hover {
    background: #6d28d9 !important;
    border-color: #6d28d9 !important;
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
    .t1c-balance-cards {
        grid-template-columns: 1fr;
    }

    .t1c-table {
        font-size: 13px;
    }

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

    .t1c-spreadsheet .t1c-col-url {
        white-space: nowrap; /* overridden in tasks card layout below */
    }

    .t1c-progress-bar {
        width: 60px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

/* ─── Checkbox column ──────────────────────────────────────── */

.t1c-col-check {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    text-align: center;
    padding: 4px 6px !important;
}

.t1c-col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.t1c-check-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.t1c-link-row.t1c-row-selected {
    background-color: #f0f4ff !important;
}

/* ─── Selection count ───────────────────────────────────────── */

.t1c-selection-count {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    margin-left: auto;
}

/* ─── Save & Submit button ──────────────────────────────────── */

.t1c-btn-save-submit {
    background: linear-gradient(135deg, #667eea 0%, #22c55e 100%) !important;
    border-color: #667eea !important;
    animation: t1c-pulse-glow 2.5s ease-in-out infinite;
}

.t1c-btn-save-submit:hover {
    opacity: 0.9;
    animation: none;
}

@keyframes t1c-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.35);
    }
}

/* ─── Warning button ────────────────────────────────────────── */

.t1c-btn-warning {
    background: #fff !important;
    color: #f59e0b !important;
    border: 1px solid #f59e0b !important;
}

.t1c-btn-warning:hover {
    background: #f59e0b !important;
    color: #fff !important;
}

/* ─── Deadline indicators ──────────────────────────────────── */
.t1c-deadline {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.t1c-deadline-soon {
    color: #d97706;
    font-weight: 600;
}

.t1c-deadline-overdue {
    color: #dc2626;
    font-weight: 700;
}

/* ─── Context text (surrounding text) ────────────────────────── */
.t1c-context-row td {
    padding-top: 0 !important;
    padding-bottom: 8px !important;
    border-top: none !important;
}

.t1c-context-wrap {
    position: relative;
}

.t1c-context-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.t1c-context-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}

.t1c-context-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.t1c-context-input.t1c-context-valid {
    border-color: #16a34a;
}

.t1c-context-input.t1c-context-invalid {
    border-color: #dc2626;
}

.t1c-context-validation {
    font-size: 12px;
    margin-top: 3px;
    min-height: 16px;
}

.t1c-context-validation.t1c-valid {
    color: #16a34a;
}

.t1c-context-validation.t1c-invalid {
    color: #dc2626;
}

.t1c-context-display {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    padding: 6px 0;
    white-space: pre-wrap;
}

/* Pilcrow icon — call-to-attention amber so clients notice they can paste
   surrounding text. Was slate-grey at 0.6 opacity, basically invisible. */
.t1c-toggle-context {
    font-size: 15px !important;
    color: #f59e0b;
    border-color: #fcd34d;
    opacity: 1;
}

.t1c-toggle-context:hover {
    background: #fffbeb;
    border-color: #f59e0b;
}

.t1c-toggle-context.t1c-context-filled {
    color: #16a34a !important;
    border-color: #86efac;
}

.t1c-toggle-context.t1c-context-open {
    color: #3b82f6 !important;
    border-color: #93c5fd;
}

/* ─── Schedule placement ─────────────────────────────────────── */
.t1c-scheduled {
    color: #7c3aed;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.t1c-schedule-link {
    font-size: 14px !important;
}

.t1c-schedule-link:hover {
    background: #f5f3ff;
    border-color: #a78bfa;
}

.t1c-schedule-link.t1c-scheduled-set {
    opacity: 1;
    color: #7c3aed !important;
}

.t1c-schedule-input {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    padding: 2px 4px;
    border: 1px solid #7c3aed;
    border-radius: 4px;
    outline: none;
}

/* ─── Bulk schedule panel ──────────────────────────────────── */
.t1c-schedule-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin-top: 4px;
    width: 320px;
    font-size: 13px;
}

.t1c-schedule-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 13px;
}

.t1c-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    width: 15px;
    height: 15px;
    border: 1.5px solid #94a3b8;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    color: #94a3b8;
    cursor: help;
    vertical-align: middle;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}
.t1c-info-icon:hover {
    color: #6366f1;
    border-color: #6366f1;
}

.t1c-schedule-panel-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 4px;
    line-height: 1;
}
.t1c-schedule-panel-close:hover { color: #1e293b; }

.t1c-schedule-tabs {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
}

.t1c-schedule-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.t1c-schedule-tab:hover { color: #1e293b; background: #f8fafc; }
.t1c-schedule-tab-active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    font-weight: 600;
}

.t1c-schedule-body {
    padding: 12px 14px;
}

.t1c-schedule-mode label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    margin-top: 8px;
}
.t1c-schedule-mode label:first-child { margin-top: 0; }

.t1c-schedule-mode input[type="date"],
.t1c-schedule-mode input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.t1c-schedule-mode input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.t1c-schedule-preview {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 11px;
    color: #64748b;
    white-space: pre-line;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
}

.t1c-schedule-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
}

.t1c-schedule-footer .t1c-btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 12px;
}

.t1c-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.t1c-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ─── Webmaster: hide WC sidebar nav (only 1 item, redundant) ── */
body.t1c-page-link-tasks .woocommerce-MyAccount-navigation {
    display: none !important;
}

/* ─── Webmaster tasks ──────────────────────────────────────── */

/* Webmaster bulk actions toolbar */
.t1c-tasks-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
}
.t1c-tasks-toolbar .t1c-btn-loading {
    position: relative;
    color: transparent !important;
}
.t1c-bulk-hint {
    font-size: 11px;
    color: #94a3b8;
}

.t1c-tasks-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.t1c-tasks-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.t1c-tasks-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
}

.t1c-tasks-stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.t1c-tasks-stat-revision .t1c-tasks-stat-num {
    color: #dc2626;
}

/* Revision row highlight */
.t1c-task-revision {
    background: #fef2f2 !important;
    border-left: 3px solid #dc2626;
}

.t1c-task-revision:hover {
    background: #fee2e2 !important;
}

.t1c-task-cancellation {
    background: #fff7ed !important;
    border-left: 3px solid #ea580c;
}
.t1c-task-cancellation:hover {
    background: #ffedd5 !important;
}
.t1c-strikethrough { text-decoration: line-through; opacity: 0.7; }

.t1c-status-removal {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.t1c-status-cancellation {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.t1c-status-removal-check {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.t1c-status-removed {
    background: #f1f5f9;
    color: #64748b;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.t1c-btn-cancel-ack {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-weight: 600;
    white-space: nowrap;
}
.t1c-btn-cancel-ack:hover { background: #ffedd5; }

.t1c-tasks-stat-cancel .t1c-tasks-stat-num { color: #ea580c; }
.t1c-tasks-stat-cancel .t1c-tasks-stat-label { color: #ea580c; }

/* Tasks page: type badge colors */
.t1c-tasks-table .t1c-badge-onetime     { background: #fff; color: #333; border: 1px solid #d1d5db; }
.t1c-tasks-table .t1c-badge-yearly      { background: #fff9c4; color: #f57f17; }
.t1c-tasks-table .t1c-badge-through     { background: #e3f2fd; color: #1565c0; }
.t1c-tasks-table .t1c-badge-replacement { background: #f3e8ff; color: #9333ea; }

/* Tasks page: "In progress" status = yellow */
.t1c-tasks-table .t1c-status-progress { background: #fef3c7; color: #92400e; }

/* ─── Tasks table column defaults (table-layout: fixed) ───── */
.t1c-tasks-table .t1c-col-check     { width: 32px; }
.t1c-tasks-table .t1c-col-num       { width: 30px; }
.t1c-tasks-table .t1c-col-order-date { width: 68px; }
.t1c-tasks-table .t1c-col-deadline  { width: 70px; }
.t1c-tasks-table .t1c-col-status    { width: 90px; }
.t1c-tasks-table .t1c-col-type-sm   { width: 40px; }
.t1c-tasks-table .t1c-col-url       { width: 20%; }
.t1c-tasks-table .t1c-col-anchor    { width: 12%; }
.t1c-tasks-table .t1c-col-selection { width: 60px; }
.t1c-tasks-table .t1c-col-donor     { width: 15%; }
.t1c-tasks-table .t1c-col-screenshot { width: 100px; }
.t1c-tasks-table .t1c-col-comment   { width: 12%; }
.t1c-tasks-table .t1c-col-actions   { width: 96px; min-width: 96px; }

/* Deadline column */
.t1c-col-deadline {
    width: 70px;
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
}

.t1c-spreadsheet .t1c-col-deadline .t1c-deadline {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.t1c-spreadsheet .t1c-col-deadline .t1c-deadline-soon {
    color: #d97706;
}

.t1c-spreadsheet .t1c-col-deadline .t1c-deadline-overdue {
    color: #dc2626;
}

.t1c-deadline-preview {
    display: block;
    font-style: italic;
    color: #9ca3af;
    font-size: 0.82em;
    white-space: nowrap;
}

/* ─── Resizable column handles ─────────────────────────────── */
.t1c-spreadsheet th {
    position: relative;
}

.t1c-resize-handle {
    position: absolute;
    top: 0;
    right: -2px;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    user-select: none;
}

.t1c-resize-handle:hover,
.t1c-resize-handle.t1c-resizing {
    background: #667eea;
    opacity: 0.4;
}

/* Comment column */
.t1c-col-comment {
    font-size: 12px;
}

.t1c-client-comment {
    display: block;
    color: #dc2626;
    font-size: 11px;
    cursor: help;
}

.t1c-admin-note {
    display: block;
    color: #64748b;
    font-size: 11px;
    cursor: help;
}
.t1c-col-check-note {
    width: 28px;
    text-align: center;
    vertical-align: middle;
    padding: 2px !important;
}
.t1c-check-note {
    display: inline-block;
    cursor: help;
    font-size: 14px;
    line-height: 1;
}

/* Fixed tooltip for comments (escapes overflow containers) */
.t1c-tooltip {
    position: fixed;
    z-index: 10000;
    min-width: 280px;
    max-width: 420px;
    padding: 10px 14px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    white-space: pre-line;
    word-break: break-word;
    pointer-events: none;
}

/* Spreadsheet cell wrapper */
.t1c-ss-cell {
    display: flex;
    align-items: center;
    gap: 3px;
}

.t1c-ss-cell .t1c-cell-input {
    flex: 1;
    min-width: 0;
}

/* Auto-save feedback */
.t1c-ss-saving {
    opacity: 0.6;
}

.t1c-ss-saved {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    transition: background 0.3s, border-color 0.3s;
}

/* Globe icon for donor URL */
.t1c-ss-open-url {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 13px;
    text-decoration: none;
    opacity: 0.3;
    border-radius: 3px;
    transition: opacity 0.15s, background 0.15s;
}

.t1c-ss-open-url:hover {
    opacity: 1;
    background: #eef2ff;
}

/* Redeploy action button (webmaster task list, actions column). Base sizing,
   border and box come from .t1c-icon-btn; this only paints it red — a rare,
   "heavy" infra action distinct from the routine edit/complete pair. The
   rocket SVG inherits the red via stroke="currentColor". */
.t1c-redeploy-btn {
    color: #dc2626;
}

.t1c-redeploy-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.t1c-redeploy-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

.t1c-hidden { display: none !important; }

/* Column selection */
.t1c-ss-col-selected {
    background: #eef2ff !important;
}

.t1c-tasks-table th[data-col],
.t1c-tasks-table th.t1c-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.t1c-tasks-table th[data-col]:hover,
.t1c-tasks-table th.t1c-sortable:hover {
    background: #eef2ff;
}

.t1c-tasks-table th.t1c-sortable::after {
    content: '⇅';
    margin-left: 4px;
    opacity: 0.25;
    font-size: 0.85em;
}
.t1c-tasks-table th.t1c-sort-asc::after {
    content: '↑';
    opacity: 0.8;
}
.t1c-tasks-table th.t1c-sort-desc::after {
    content: '↓';
    opacity: 0.8;
}

.t1c-ss-col-active {
    background: #dbeafe !important;
}

/* Copy-column button in th — pinned to the right */
.t1c-tasks-table th .t1c-copy-col-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
    z-index: 1;
}
.t1c-tasks-table th:hover .t1c-copy-col-btn,
.t1c-tasks-table th .t1c-copy-col-btn:focus {
    opacity: 0.7;
}
.t1c-tasks-table th .t1c-copy-col-btn:hover {
    opacity: 1;
    color: #667eea;
    background: #dbeafe;
    border-color: #93c5fd;
}
.t1c-tasks-table th .t1c-copy-col-btn.t1c-copied {
    opacity: 1;
    color: #16a34a;
    background: #dcfce7;
    border-color: #86efac;
}
/* Extra right padding in th to not overlap sort arrow */
.t1c-tasks-table th[data-col] {
    padding-right: 26px;
}

.t1c-screen-preview-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}

.t1c-screen-preview-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.t1c-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.t1c-lightbox-img {
    display: none;
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.t1c-lightbox-spinner {
    color: #fff;
    font-size: 32px;
}

/* Task row cursor hint */
.t1c-task-row {
    cursor: pointer;
}

.t1c-task-row:hover {
    background: #f8f9ff;
}

/* ─── Replacement page ────────────────────────────────────── */
/* Indigo palette — matches site .t1c-btn-primary (#667eea) and the
   renewal page header. Was purple historically but didn't fit the
   site's visual language. */

.t1c-repl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #eef1ff;
    border: 1px solid #d6deff;
    border-radius: 8px;
}

.t1c-repl-balance-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t1c-repl-avail {
    font-size: 14px;
    color: #3b4a99;
}

.t1c-repl-avail strong {
    font-size: 18px;
    color: #667eea;
}

/* Pending replacement row highlight */
.t1c-repl-pending {
    background: #eef1ff !important;
    border-left: 3px solid #667eea;
}

.t1c-repl-pending:hover {
    background: #f3e8ff !important;
}

/* Editing state */
.t1c-repl-editing {
    background: #fffbeb !important;
    border-left: 3px solid #f59e0b;
}

.t1c-repl-editing:hover {
    background: #fef3c7 !important;
}

/* Strikethrough original values */
.t1c-repl-original {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.t1c-repl-original s {
    text-decoration: line-through;
}

/* URL/anchor display */
.t1c-repl-current-url,
.t1c-repl-current-anchor {
    font-size: 12px;
    word-break: break-all;
}

/* Replacement table: min-width removed — JS controls widths via table-layout:fixed */

/* Webmaster: replacement info row */
.t1c-task-repl-info {
    font-size: 11px;
    color: #6b21a8;
    padding: 4px 12px 6px;
    background: #faf5ff;
}

.t1c-task-repl-info s {
    color: #94a3b8;
    text-decoration: line-through;
}

/* ─── Checkout: EDO verification modal ───────────────────────── */

.t1c-edo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.t1c-edo-modal-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.t1c-edo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.t1c-edo-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: t1c-edo-modal-in 0.2s ease-out;
}

@keyframes t1c-edo-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.t1c-edo-modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.t1c-edo-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.t1c-edo-modal-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 24px;
}

.t1c-edo-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.t1c-edo-modal-buttons .button {
    min-width: 130px;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.t1c-edo-modal-buttons .button.alt {
    background: #7c3aed;
    color: #fff;
    border: none;
}

.t1c-edo-modal-buttons .button.alt:hover {
    background: #6d28d9;
}

/* ─── Checkout: EDO indicator (below INN field) ──────────────── */

.t1c-edo-indicator {
    font-size: 12px;
    margin-top: 4px;
    padding: 2px 0;
    line-height: 1.4;
}

.t1c-edo-loading {
    color: #6366f1;
}

.t1c-edo-loading::before {
    content: "\25CB ";
}

.t1c-edo-ok {
    color: #16a34a;
}

.t1c-edo-ok::before {
    content: "\2713 ";
}

.t1c-edo-warn {
    color: #ea580c;
}

.t1c-edo-warn::before {
    content: "\26A0 ";
}

/* ─── Mobile: Webmaster Tasks card layout ─────────────────────── */

@media (max-width: 768px) {

    /* Remove horizontal scroll, convert table to block */
    .t1c-tasks-page .t1c-spreadsheet-wrap {
        overflow-x: visible;
        border: none;
        border-radius: 0;
    }

    .t1c-tasks-table {
        table-layout: auto;
    }

    .t1c-tasks-table,
    .t1c-tasks-table thead,
    .t1c-tasks-table tbody {
        display: block;
        width: 100%;
    }

    .t1c-tasks-table thead {
        display: none;
    }

    /* ── Card per task row ── */

    .t1c-task-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 8px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 8px;
        background: #fff;
    }

    .t1c-task-row:hover {
        background: #fff;
    }

    /* Reset all td defaults from spreadsheet (high specificity to beat desktop rules) */
    .t1c-tasks-table.t1c-spreadsheet td {
        display: block;
        padding: 0;
        border: none;
        border-right: none;
        border-bottom: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        width: auto;
        max-width: none;
        background: none;
    }

    /* ── Header line: check + type + status + dates + actions ── */

    .t1c-task-row .t1c-col-check {
        order: 1;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-task-row .t1c-col-num {
        display: none;
    }

    .t1c-task-row .t1c-col-type-sm {
        order: 2;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-task-row .t1c-col-status {
        order: 3;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-task-row .t1c-col-order-date {
        order: 4;
        flex-shrink: 0;
        font-size: 12px;
        color: #64748b;
        width: auto;
    }

    .t1c-task-row .t1c-col-deadline {
        order: 5;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-task-row .t1c-col-actions {
        order: 6;
        margin-left: auto;
        flex-shrink: 0;
        width: auto;
        min-width: 0;
    }

    .t1c-task-row .t1c-col-actions .t1c-actions-wrap {
        flex-wrap: nowrap;
    }

    /* ── Full-width content rows ── */

    .t1c-task-row .t1c-col-url {
        order: 10;
        flex-basis: 100%;
        padding-top: 6px;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }

    .t1c-task-row .t1c-col-anchor {
        order: 11;
        flex-basis: 100%;
    }

    .t1c-task-row .t1c-col-donor {
        order: 12;
        flex-basis: 100%;
        padding-top: 6px;
        border-top: 1px solid #f1f5f9;
        margin-top: 2px;
    }

    .t1c-task-row .t1c-col-screenshot {
        order: 13;
        flex-basis: 100%;
    }

    .t1c-task-row .t1c-col-selection {
        order: 14;
        width: auto;
    }

    .t1c-task-row .t1c-col-comment {
        order: 15;
        flex-basis: 100%;
    }

    /* Hide selection td when empty */
    .t1c-task-row .t1c-col-selection:has(.t1c-empty-field) {
        display: none;
    }

    /* Hide comment td when empty */
    .t1c-task-row .t1c-col-comment:empty {
        display: none;
    }

    /* ── Labels for content fields ── */

    .t1c-task-row .t1c-col-url::before,
    .t1c-task-row .t1c-col-anchor::before,
    .t1c-task-row .t1c-col-donor::before,
    .t1c-task-row .t1c-col-screenshot::before {
        display: block;
        font-size: 10px;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .t1c-task-row .t1c-col-url::before { content: 'URL'; }
    .t1c-task-row .t1c-col-anchor::before { content: 'Анкор'; }
    .t1c-task-row .t1c-col-donor::before { content: 'PBN URL'; }
    .t1c-task-row .t1c-col-screenshot::before { content: 'Скриншот'; }

    /* ── Override max-width:0 / overflow:hidden from desktop ellipsis rules ── */

    .t1c-spreadsheet td.t1c-col-url,
    .t1c-spreadsheet td.t1c-col-anchor,
    .t1c-spreadsheet td.t1c-col-donor,
    .t1c-spreadsheet td.t1c-col-comment {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    /* ── Text wrapping for URL/Anchor ── */

    .t1c-task-row .t1c-truncate,
    .t1c-task-row .t1c-cell-link {
        white-space: normal;
        word-break: break-all;
        overflow: visible;
        text-overflow: clip;
    }

    /* ── Inputs full width ── */

    .t1c-task-row .t1c-ss-cell {
        width: 100%;
    }

    .t1c-task-row .t1c-cell-input {
        min-width: 0;
    }

    /* ── Copy buttons always visible on touch ── */

    .t1c-task-row .t1c-copy-btn {
        opacity: 0.5;
    }

    /* ── Revision card styling ── */

    .t1c-task-row.t1c-task-revision {
        border-left: 3px solid #dc2626;
        background: #fef2f2;
    }

    .t1c-task-row.t1c-task-revision:hover {
        background: #fef2f2;
    }

    /* ── Associated rows (replacement info, context) ── */

    .t1c-task-repl-info-row,
    .t1c-context-row {
        display: block;
        width: 100%;
    }

    .t1c-task-repl-info-row > td,
    .t1c-context-row > td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
    }

    .t1c-task-repl-info-row > td:first-child:empty,
    .t1c-context-row > td:first-child:empty {
        display: none;
    }

    .t1c-task-repl-info-row > td[colspan],
    .t1c-context-row > td[colspan] {
        padding: 4px 12px 8px;
        font-size: 12px;
    }

    /* ── Stats bar: smaller on mobile ── */

    .t1c-tasks-stats {
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 10px 12px;
    }

    .t1c-tasks-stat-num {
        font-size: 16px;
    }

    .t1c-tasks-stat-label {
        font-size: 12px;
    }

    /* ── Toolbar: compact ── */

    .t1c-tasks-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }

    /* ── Filters: compact ── */

    .t1c-tasks-page .t1c-all-filters form {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ─── Client links table — mobile card layout (<893px) ──────── */

@media (max-width: 1120px) {

    /* Remove horizontal scroll, convert table to block */
    .t1c-all-links-page .t1c-spreadsheet-wrap {
        overflow-x: visible;
        border: none;
        border-radius: 0;
    }

    .t1c-links-table {
        table-layout: auto;
    }

    .t1c-links-table,
    .t1c-links-table thead,
    .t1c-links-table tbody {
        display: block;
        width: 100%;
    }

    .t1c-links-table thead {
        display: none;
    }

    /* ── Card per link row ── */

    .t1c-links-table .t1c-link-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 8px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 8px;
        background: #fff;
    }

    .t1c-links-table .t1c-link-row:hover {
        background: #fff;
    }

    /* Reset all td defaults from spreadsheet */
    .t1c-links-table.t1c-spreadsheet td {
        display: block;
        padding: 0;
        border: none;
        border-right: none;
        border-bottom: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        width: auto;
        max-width: none;
        background: none;
    }

    /* ── Header line: check + order + type + status + deadline + actions ── */

    .t1c-link-row .t1c-col-check {
        order: 1;
        flex-shrink: 0;
        width: auto;
        min-width: auto;
        max-width: none;
    }

    .t1c-link-row .t1c-col-num {
        display: none;
    }

    .t1c-link-row .t1c-col-order {
        order: 2;
        flex-shrink: 0;
        width: auto;
        font-weight: 600;
    }

    .t1c-link-row .t1c-col-type-sm {
        order: 3;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-status {
        order: 4;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-deadline {
        order: 5;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-actions {
        order: 6;
        margin-left: auto;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-actions .t1c-actions-wrap {
        flex-wrap: nowrap;
    }

    /* Hide order-date from header (shown in metadata) */
    .t1c-link-row .t1c-col-order-date {
        display: none;
    }

    /* ── Full-width content rows ── */

    .t1c-link-row .t1c-col-url {
        order: 10;
        flex-basis: 100%;
        padding-top: 6px;
        border-top: 1px solid #f1f5f9;
        margin-top: 4px;
    }

    .t1c-link-row .t1c-col-anchor {
        order: 11;
        flex-basis: 100%;
    }

    .t1c-link-row .t1c-col-donor {
        order: 12;
        flex-basis: 100%;
        padding-top: 6px;
        border-top: 1px solid #f1f5f9;
        margin-top: 2px;
    }

    .t1c-link-row .t1c-col-screenshot {
        order: 13;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-placed {
        order: 14;
        flex-shrink: 0;
        width: auto;
    }

    .t1c-link-row .t1c-col-expires {
        order: 15;
        flex-shrink: 0;
        width: auto;
    }

    /* ── Labels for content fields ── */

    .t1c-link-row .t1c-col-url::before,
    .t1c-link-row .t1c-col-anchor::before,
    .t1c-link-row .t1c-col-donor::before {
        display: block;
        font-size: 10px;
        font-weight: 600;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .t1c-link-row .t1c-col-url::before { content: 'URL'; }
    .t1c-link-row .t1c-col-anchor::before { content: 'Анкор'; }
    .t1c-link-row .t1c-col-donor::before { content: 'PBN URL'; }

    /* ── Dates row at bottom ── */

    .t1c-link-row .t1c-col-screenshot,
    .t1c-link-row .t1c-col-placed,
    .t1c-link-row .t1c-col-expires {
        padding-top: 6px;
        border-top: 1px solid #f1f5f9;
        margin-top: 2px;
        font-size: 11px;
        color: #64748b;
    }

    /* Only first of the bottom group gets the border */
    .t1c-link-row .t1c-col-placed,
    .t1c-link-row .t1c-col-expires {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }

    /* Hide empty donors/screenshot/dates */
    .t1c-link-row .t1c-col-donor:has(.t1c-empty-field),
    .t1c-link-row .t1c-col-screenshot:has(.t1c-empty-field) {
        display: none;
    }

    /* ── Text wrapping for URL/Anchor ── */

    .t1c-link-row .t1c-truncate,
    .t1c-link-row .t1c-cell-link {
        white-space: normal;
        word-break: break-all;
        overflow: visible;
        text-overflow: clip;
    }

    .t1c-link-row .t1c-col-anchor .t1c-cell-text,
    .t1c-link-row .t1c-col-anchor .t1c-cell-input {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ── Override ellipsis rules from desktop ── */

    .t1c-links-table.t1c-spreadsheet td.t1c-col-url,
    .t1c-links-table.t1c-spreadsheet td.t1c-col-anchor,
    .t1c-links-table.t1c-spreadsheet td.t1c-col-donor {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    /* ── Inputs full width ── */

    .t1c-link-row .t1c-cell-input {
        min-width: 0;
        width: 100%;
    }

    /* ── Copy buttons visible on touch ── */

    .t1c-link-row .t1c-copy-btn {
        opacity: 0.5;
    }

    /* ── Context row ── */

    .t1c-links-table .t1c-context-row {
        display: block;
        width: 100%;
    }

    .t1c-links-table .t1c-context-row > td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
    }

    .t1c-links-table .t1c-context-row > td:first-child:empty {
        display: none;
    }

    .t1c-links-table .t1c-context-row > td[colspan] {
        padding: 4px 12px 8px;
        font-size: 12px;
    }

    /* ── Disable resize handles on mobile ── */

    .t1c-col-resize {
        display: none !important;
    }

    /* ── Filter bar compact ── */

    .t1c-all-links-page .t1c-all-filters form {
        flex-wrap: wrap;
        gap: 6px;
    }

    .t1c-all-links-page .t1c-order-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ─── Order ID badges — kwork source differentiation ─── */
.t1c-order-id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    vertical-align: middle;
}
.t1c-order-id-kwork {
    padding: 1px 6px;
    border-radius: 3px;
    background: #fff5e6;
    color: #c66900;
    border: 1px solid #ffe0b3;
    font-size: 0.92em;
}
.t1c-order-id-kwork img {
    flex: 0 0 auto;
    display: block;
}

/* ─── Donor suggestion system ──────────────────────────────── */
.t1c-donor-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.t1c-donor-locked {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border-color: #e5e7eb !important;
}
.t1c-suggest-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7em;
    line-height: 1.2;
    padding: 1px 2px;
}
.t1c-suggest-donor {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6b7280;
    text-decoration: none;
}
.t1c-suggest-donor:hover {
    color: #374151;
    text-decoration: underline;
}
.t1c-suggest-accept,
.t1c-suggest-reject {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
    padding: 0;
}
.t1c-suggest-accept {
    background: #dcfce7;
    color: #16a34a;
}
.t1c-suggest-accept:hover {
    background: #bbf7d0;
}
.t1c-suggest-reject {
    background: #fee2e2;
    color: #dc2626;
}
.t1c-suggest-reject:hover {
    background: #fecaca;
}
.t1c-suggest-accept:disabled,
.t1c-suggest-reject:disabled {
    opacity: 0.5;
    cursor: wait;
}
/* ─── Snippet button + popup ────────────────────────────── */
.t1c-snippet-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    line-height: 1;
    vertical-align: middle;
    opacity: 0.7;
}
.t1c-snippet-btn:hover {
    opacity: 1;
}
.t1c-snippet-popup {
    z-index: 100000;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    width: 520px;
    max-width: calc(100vw - 16px);
    padding: 12px;
}
.t1c-snippet-popup-cols {
    display: flex;
    gap: 12px;
}
.t1c-snippet-popup-col {
    flex: 1;
    min-width: 0;
}
.t1c-snippet-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.t1c-snippet-popup-copy {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    padding: 1px 5px;
    line-height: 1;
}
.t1c-snippet-popup-copy:hover {
    background: #f3f4f6;
}
.t1c-snippet-popup-code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    color: #334155;
}
.t1c-snippet-popup-text {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    color: #1c1917;
}
.t1c-snippet-popup-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.t1c-snippet-regen {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #475569;
}
.t1c-snippet-regen:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.t1c-snippet-regen:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Renewal page header — indigo palette (matches site .t1c-btn-primary).
   Scoped to .t1c-renewal-page so the replacement page keeps its purple theme. */
.t1c-renewal-page .t1c-repl-header {
    background: #eef1ff;
    border-color: #d6deff;
}
.t1c-renewal-page .t1c-repl-avail {
    color: #3b4a99;
}
.t1c-renewal-page .t1c-repl-avail strong {
    color: #667eea;
}

/* Empty state on renewal page — styled block with CTA, site indigo palette */
.t1c-empty-renewal {
    margin: 24px 0;
    padding: 40px 32px;
    background: linear-gradient(135deg, #f5f7ff 0%, #eef1ff 100%);
    border: 1px solid #d6deff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.05);
}
.t1c-empty-renewal .t1c-empty-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 14px;
    opacity: 0.75;
}
.t1c-empty-renewal .t1c-empty-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3a8c;
}
.t1c-empty-renewal .t1c-empty-desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #55609b;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}
.t1c-empty-renewal .t1c-empty-cta {
    display: inline-block;
    padding: 10px 24px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #667eea;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin-top: 4px;
}
.t1c-empty-renewal .t1c-empty-cta:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
    color: #fff;
    text-decoration: none;
}

/* ─── Renewal page: header actions + empty-state convert button ──
   Visible on /my-account/link-all/?link_type=renewal_yearly|renewal_through.
   Indigo-themed (same palette as .t1c-btn-primary). */
.t1c-renewal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    align-items: center;
}
.t1c-renewal-convert-btn,
.t1c-empty-convert {
    background: #fff;
    color: #3b4a99;
    border: 1px solid #d6deff;
}
.t1c-renewal-convert-btn:hover,
.t1c-empty-convert:hover {
    background: #eef1ff;
    border-color: #667eea;
    color: #2d3a8c;
}
.t1c-renewal-convert-avail {
    color: #6b7280;
    font-weight: 500;
    margin-left: 4px;
}
.t1c-empty-convert {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    cursor: pointer;
    text-decoration: none;
}

/* Convert modal specifics */
.t1c-convert-summary {
    margin: 10px 0 18px;
    font-size: 13px;
    color: #6b7280;
}
.t1c-convert-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}
.t1c-convert-arrow {
    color: #667eea;
    font-size: 18px;
}
.t1c-convert-available {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 14px;
}
.t1c-convert-result {
    background: #f5f7ff;
    border: 1px solid #d6deff;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 0 14px;
    text-align: left;
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
}
.t1c-convert-result strong { color: #1f2937; }
.t1c-convert-warning {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin: 0 0 16px;
    text-align: center;
}
.t1c-convert-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ─── Shared modal primitives (also defined in order-page.css for /quick-order/)
   Duplicated here so link-renewal.php can reuse the order/convert modals
   without having to enqueue order-page.css on My Account pages. */
.t1c-op-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.t1c-op-modal[hidden] { display: none; }
.t1c-op-modal--open { opacity: 1; pointer-events: auto; }
.t1c-op-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}
.t1c-op-modal-card {
    position: relative;
    width: min(420px, calc(100% - 32px));
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 60px rgba(17, 24, 39, 0.25);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.18s ease;
    text-align: center;
}
.t1c-op-modal--open .t1c-op-modal-card {
    transform: translateY(0) scale(1);
}
.t1c-op-modal-close {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent; border: 0;
    font-size: 26px; line-height: 1;
    color: #9ca3af; cursor: pointer;
    padding: 4px 8px; border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}
.t1c-op-modal-close:hover { background: #f3f4f6; color: #374151; }
.t1c-op-modal-title {
    margin: 0 0 6px;
    font-size: 18px; font-weight: 600; color: #1f2937;
}
.t1c-op-modal-price-one {
    font-size: 13px; color: #6b7280; margin-bottom: 22px;
}
.t1c-op-modal-qty-wrap {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.t1c-op-qty-btn {
    width: 44px; height: 44px;
    border: 1px solid #d6deff;
    background: #f5f7ff; color: #3b4a99;
    border-radius: 10px;
    font-size: 22px; font-weight: 600; cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1;
}
.t1c-op-qty-btn:hover {
    background: #667eea; border-color: #667eea; color: #fff;
}
.t1c-op-qty-btn:active { transform: translateY(1px); }
.t1c-op-qty-input {
    width: 90px; height: 44px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 18px; font-weight: 600;
    text-align: center; color: #1f2937; background: #fff;
    -moz-appearance: textfield;
}
.t1c-op-qty-input:focus {
    outline: none; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}
.t1c-op-qty-input::-webkit-outer-spin-button,
.t1c-op-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.t1c-op-modal-total {
    font-size: 15px; color: #374151; margin-bottom: 20px;
}
.t1c-op-modal-total-val {
    color: #1f2937; font-size: 20px; font-weight: 700; margin-left: 4px;
}
.t1c-op-modal-actions {
    display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.t1c-op-modal-submit,
.t1c-convert-submit {
    background: #667eea; color: #fff;
    border: 1px solid #667eea;
    border-radius: 10px; padding: 12px 20px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.t1c-op-modal-submit:hover,
.t1c-convert-submit:hover:not(:disabled) {
    background: #5a6fd6; border-color: #5a6fd6;
}
.t1c-op-modal-cancel {
    background: transparent; border: 0;
    color: #6b7280; font-size: 13px;
    padding: 6px 12px; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.t1c-op-modal-cancel:hover { color: #374151; }

@media (max-width: 480px) {
    .t1c-op-modal-card { padding: 24px 18px 18px; }
    .t1c-op-qty-btn { width: 48px; height: 48px; font-size: 24px; }
    .t1c-op-qty-input { height: 48px; font-size: 20px; }
}

/* Renewal page — status badge (Активна / Просрочена) */
.t1c-renewal-table .t1c-col-status { width: 90px; text-align: center; }
.t1c-renewal-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.t1c-renewal-status-active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.t1c-renewal-status-expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ─── CTA bar — contextual Order/Convert buttons below balance-bar.
   Rendered by partial-cta-bar.php on every My Account link page. */
.t1c-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 10px 0 14px;
}
/* Order CTA overrides .t1c-btn-primary indigo with natural black so the
   primary action stands out from the indigo balance chips. Scoped to
   .t1c-cta-bar so other primary buttons across the cabinet stay untouched. */
.t1c-cta-bar .t1c-btn-primary {
    background: #111;
    border-color: #111;
    color: #fff;
}
.t1c-cta-bar .t1c-btn-primary:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* ─── Renewal page toolbar (filter pills + bulk-renew button) ───────
   Filters on the left, primary action on the right. Flex-wrap keeps
   it readable on narrow viewports. */
.t1c-renewal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.t1c-renewal-toolbar .t1c-renewal-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
}

/* Sticky FAB mode: when the toolbar scrolls out of the viewport AND
   the user has rows selected, the button detaches and floats in the
   bottom-right. z-index 900 leaves room for a future cart toast at 950. */
#t1c-bulk-renew-selected.t1c-bulk-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 900;
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 30px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    transition: transform .15s ease, opacity .15s ease;
}
#t1c-bulk-renew-selected.t1c-bulk-sticky:hover {
    transform: translateY(-1px);
}

/* ─── Bulk-renew live summary panel (v1.47.0) ─────────────────────────
   Shown on /my-account/link-renewal/ when any rows are selected. Mirrors
   the sticky-button style for visual coherence; lives just above the
   sticky button in the same bottom-right zone. */
.t1c-bulk-renew-summary {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 899; /* one below the sticky button */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    padding: 14px 18px;
    min-width: 280px;
    max-width: 360px;
    font-size: 14px;
    line-height: 1.5;
}
.t1c-bulk-renew-summary-grid {
    display: grid;
    gap: 6px;
}
.t1c-brs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}
.t1c-brs-label {
    color: #475569;
    font-weight: 500;
}
.t1c-brs-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}
.t1c-brs-amount {
    color: #c66900; /* same warm tone as kwork badge — signals "money owed" */
    font-size: 15px;
}
.t1c-brs-balance .t1c-brs-value {
    color: #16a34a; /* green — covered-by-balance is the good case */
}

/* ─── Renewal banner on /my-account/link-all/ (v1.47.0 Phase 1B) ──────
   Surfaces "Продлить всё" entry point when the client has links inside
   the 60-day expiry window. Two tones:
     • t1c-renewal-banner-info   — amber, normal "soon to expire"
     • t1c-renewal-banner-urgent — red, ≥1 link already expired */
.t1c-renewal-banner {
    margin: 14px 0 18px;
    border-radius: 10px;
    border-left: 4px solid;
    padding: 14px 18px;
    background: #fff5e6;
    border-color: #f59e0b;
    color: #7c3a03;
    font-size: 14px;
    line-height: 1.5;
}
.t1c-renewal-banner.t1c-renewal-banner-urgent {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}
.t1c-renewal-banner-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}
.t1c-renewal-banner-text {
    flex: 1 1 auto;
    min-width: 240px;
}
.t1c-renewal-banner-text strong {
    font-weight: 600;
}
.t1c-renewal-banner-amount {
    display: inline-block;
    margin-left: 6px;
}
.t1c-renewal-banner-balance-note {
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    margin-left: 4px;
}
.t1c-renewal-banner-cta {
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none !important;
    /* Override generic primary tone — banner-CTA needs to read against
       its own coloured background. Default amber (info) banner gets a
       warm orange button; urgent (red) banner gets a deep crimson one. */
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(124, 58, 3, .25);
}
.t1c-renewal-banner-cta:hover,
.t1c-renewal-banner-cta:focus {
    background: #d97706 !important;
    border-color: #b45309 !important;
    color: #fff !important;
}
.t1c-renewal-banner-urgent .t1c-renewal-banner-cta {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
    box-shadow: 0 1px 2px rgba(127, 29, 29, .35);
}
.t1c-renewal-banner-urgent .t1c-renewal-banner-cta:hover,
.t1c-renewal-banner-urgent .t1c-renewal-banner-cta:focus {
    background: #b91c1c !important;
    border-color: #991b1b !important;
}
@media (max-width: 600px) {
    .t1c-renewal-banner-body {
        flex-direction: column;
        align-items: stretch;
    }
    .t1c-renewal-banner-cta {
        text-align: center;
    }
}

/* ─── Duplicate-anchor warning modal + row highlighting ───────────────
   Row highlight mirrors `.t1c-op-modal` primitives but widens the card
   to fit the SEO guidance text. Red left border flags rows with a
   duplicated (url, anchor) pair so the client can see exactly which
   rows trigger the modal. */
#t1c-dupe-modal .t1c-dupe-modal-card {
    /* Wider than default so SEO guidance text breathes on desktop,
       but still responsive — shrinks with viewport margins on mobile. */
    max-width: 840px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px 32px;
}
@media (max-width: 600px) {
    #t1c-dupe-modal .t1c-dupe-modal-card {
        width: calc(100% - 20px);
        max-height: 90vh;
        padding: 20px 18px;
    }
    .t1c-dupe-modal-text { font-size: 13px; }
    .t1c-dupe-modal-summary { font-size: 13px; padding: 8px 10px; }
}
/* Summary callout — matches the red highlight on dup rows. */
.t1c-dupe-modal-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid #dc2626;
    color: #7f1d1d;
    padding: 12px 14px;
    border-radius: 6px;
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
}
.t1c-dupe-modal-summary ul {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 13px;
}
.t1c-dupe-modal-summary li {
    position: relative;
    padding: 3px 0 3px 18px;
}
.t1c-dupe-modal-summary li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
}

.t1c-dupe-modal-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}
.t1c-dupe-modal-text p { margin: 0 0 14px 0; }
.t1c-dupe-intro { color: #4b5563; }

/* Good / Bad blocks — tint-panels with coloured left rail.
   Visually separates "do" vs "don't" without yelling. */
.t1c-dupe-block {
    margin: 14px 0;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid;
}
.t1c-dupe-block-good {
    background: #ecfdf5;
    border-left-color: #16a34a;
}
.t1c-dupe-block-bad {
    background: #fef2f2;
    border-left-color: #dc2626;
}
.t1c-dupe-block-head {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.t1c-dupe-block-good .t1c-dupe-block-head { color: #166534; }
.t1c-dupe-block-bad  .t1c-dupe-block-head { color: #991b1b; }
.t1c-dupe-block-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}
.t1c-dupe-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.t1c-dupe-block ul li {
    position: relative;
    padding: 4px 0 4px 24px;
    line-height: 1.55;
}
.t1c-dupe-block ul li + li { margin-top: 2px; }
.t1c-dupe-block ul li::before {
    position: absolute;
    left: 0;
    top: 4px;
    font-weight: 700;
    font-size: 15px;
}
.t1c-dupe-block-good ul li::before { content: "\2713"; color: #16a34a; }
.t1c-dupe-block-bad  ul li::before { content: "\2715"; color: #dc2626; }

/* Callout — the 90-95% pessimization fact gets its own panel so it
   actually registers instead of hiding in a wall of paragraphs. */
.t1c-dupe-callout {
    margin: 16px 0 4px;
    padding: 14px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 500;
}

/* Modal actions — two buttons side by side (50/50), LEFT primary. */
.t1c-dupe-modal-actions {
    flex-direction: row !important;
    gap: 12px !important;
    margin-top: 20px;
}
.t1c-dupe-modal-actions .t1c-btn {
    flex: 1 1 0;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}
@media (max-width: 480px) {
    .t1c-dupe-modal-actions { flex-direction: column !important; }
}

/* Note: the base .t1c-btn-danger / .t1c-btn-danger-outline (line ~1099)
   is intentionally outline-style (white bg, red border+text, hover solid).
   Earlier v1.21.0 override forced solid red here — removed v1.22.5 so
   confirm-dialogs can put the RISKY action in outline and the SAFE one
   in primary, avoiding pushing users toward the wrong click. */

/* Row-level flag for duplicate (url, anchor) pairs. */
.t1c-link-row.t1c-has-dupe > td {
    background: #fef2f2;
}
.t1c-link-row.t1c-has-dupe > td:first-child {
    box-shadow: inset 3px 0 0 #dc2626;
}
.t1c-dupe-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    color: #b91c1c;
    font-size: 12px;
    cursor: help;
}

/* ─── Anchor-assistant: pending_anchor row in webmaster tasks ──────
   Greyed-out row that webmaster sees but cannot act on — the anchor
   is being picked up by the anchor-assistant role. */
.t1c-task-row.t1c-task-pending-anchor {
    background: #f3f4f6;
    color: #9ca3af;
    pointer-events: none;
    opacity: 0.7;
}
.t1c-task-row.t1c-task-pending-anchor a {
    color: #9ca3af;
    pointer-events: auto;  /* let webmaster click into details if curious */
}
.t1c-task-row.t1c-task-pending-anchor button,
.t1c-task-row.t1c-task-pending-anchor input,
.t1c-task-row.t1c-task-pending-anchor select { display: none !important; }

.t1c-status-pending-anchor {
    background: #fff1ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

/* ─── Empty-anchor confirmation modal ───────────────────────────────
   Gates client-initiated submit (single link / batch / replacement) when
   any of the selected links has an empty anchor. Explains the meaning of
   "empty anchor" (= we pick the anchor) vs anchorless image-link (= paste
   the URL). Localized "Больше не показывать" preference in localStorage. */
.t1c-eam-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 100000;
    padding: 16px;
}
.t1c-eam-overlay[hidden] { display: none; }
.t1c-eam-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    max-width: 520px;
    width: 100%;
    padding: 22px 24px 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
}
.t1c-eam-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #b45309;
}
.t1c-eam-body p {
    margin: 0 0 10px;
}
.t1c-eam-note {
    background: #fff7ed;
    border-left: 3px solid #fb923c;
    padding: 8px 12px;
    border-radius: 4px;
}
.t1c-eam-summary {
    margin-top: 12px !important;
    font-weight: 600;
    color: #374151;
}
.t1c-eam-count {
    display: inline-block;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fed7aa;
    color: #9a3412;
    font-weight: 700;
}
.t1c-eam-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0;
    color: #4b5563;
    font-size: 13px;
    user-select: none;
    cursor: pointer;
}
.t1c-eam-checkbox input { margin: 0; }
.t1c-eam-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.t1c-eam-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.t1c-eam-btn-cancel {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}
.t1c-eam-btn-cancel:hover { background: #f3f4f6; }
.t1c-eam-btn-confirm {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.t1c-eam-btn-confirm:hover { background: #1d4ed8; border-color: #1d4ed8; }
.t1c-eam-btn-confirm:focus { outline: 2px solid #93c5fd; outline-offset: 2px; }
