/* F7 Cabinet — UI tokens (scoped to plugin root) */
.ta-fc-root,
.ta-fc-wrapper {
    --ta-fc-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ta-fc-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --ta-fc-ink: #18181b;
    --ta-fc-ink-muted: #52525b;
    --ta-fc-ink-subtle: #a1a1aa;

    --ta-fc-surface: #ffffff;
    --ta-fc-surface-muted: #f4f4f5;
    --ta-fc-surface-raised: #fafafa;

    --ta-fc-border: #e4e4e7;
    --ta-fc-border-strong: #d4d4d8;

    --ta-fc-accent: #e11d48;
    --ta-fc-accent-hover: #be123c;
    --ta-fc-accent-soft: #fff1f2;
    --ta-fc-accent-ring: rgba(225, 29, 72, 0.18);

    --ta-fc-success: #15803d;
    --ta-fc-success-soft: #f0fdf4;
    --ta-fc-danger: #b91c1c;
    --ta-fc-danger-soft: #fef2f2;

    --ta-fc-radius-sm: 8px;
    --ta-fc-radius: 12px;
    --ta-fc-radius-lg: 16px;

    --ta-fc-shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
    --ta-fc-shadow: 0 4px 16px rgba(24, 24, 27, 0.06), 0 1px 3px rgba(24, 24, 27, 0.04);
    --ta-fc-shadow-lg: 0 12px 32px rgba(24, 24, 27, 0.08), 0 2px 6px rgba(24, 24, 27, 0.04);

    font-family: var(--ta-fc-font);
    color: var(--ta-fc-ink);
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Layout shell */

.ta-fc-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 40px;
    box-sizing: border-box;
    background: transparent;
}

.ta-fc-main-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* Footer */

.ta-fc-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--ta-fc-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ta-fc-data-freshness {
    font-size: 12px;
    color: var(--ta-fc-ink-subtle);
}

.ta-fc-footer .ta-fc-refresh-btn {
    padding: 0;
    width: auto;
    margin-top: 0;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--ta-fc-ink-muted);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: solid;
    text-underline-offset: 3px;
    text-decoration-color: var(--ta-fc-border-strong);
    transition: color 0.15s ease;
}

.ta-fc-footer .ta-fc-refresh-btn:hover:not(:disabled) {
    background: transparent;
    color: var(--ta-fc-accent);
    text-decoration-color: var(--ta-fc-accent);
}

.ta-fc-footer .ta-fc-refresh-status {
    font-size: 12px;
    color: var(--ta-fc-ink-muted);
}

.ta-fc-refresh-btn {
    padding: 9px 16px;
    width: 100%;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border);
    background: var(--ta-fc-surface);
    color: var(--ta-fc-ink);
    cursor: pointer;
    box-shadow: var(--ta-fc-shadow-sm);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ta-fc-refresh-btn:hover:not(:disabled) {
    background: var(--ta-fc-surface-muted);
    border-color: var(--ta-fc-border-strong);
}

.ta-fc-refresh-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.ta-fc-refresh-status {
    font-size: 12px;
    color: var(--ta-fc-ink-muted);
}

/* Cards (login forms) */

.ta-fc-card {
    max-width: 400px;
    width: 100%;
    background: var(--ta-fc-surface);
    border-radius: var(--ta-fc-radius-lg);
    padding: 28px 28px 32px;
    border: 1px solid var(--ta-fc-border);
    box-shadow: var(--ta-fc-shadow);
}

.ta-fc-card h2 {
    margin: 0 0 8px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.ta-fc-card p {
    margin: 0 0 22px;
    color: var(--ta-fc-ink-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.ta-fc-card p strong {
    color: var(--ta-fc-ink);
    font-weight: 600;
}

/* Forms */

.ta-fc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ta-fc-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ta-fc-form label > span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ta-fc-ink-muted);
}

.ta-fc-form input[type="tel"],
.ta-fc-form input[type="text"] {
    width: 100%;
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border-strong);
    background: var(--ta-fc-surface);
    padding: 11px 14px;
    color: var(--ta-fc-ink);
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ta-fc-form input::placeholder {
    color: var(--ta-fc-ink-subtle);
}

.ta-fc-form input:hover {
    border-color: #a1a1aa;
}

.ta-fc-form input:focus {
    border-color: var(--ta-fc-accent);
    box-shadow: 0 0 0 3px var(--ta-fc-accent-ring);
}

.ta-fc-form button[type="submit"] {
    margin-top: 4px;
    border: none;
    border-radius: var(--ta-fc-radius-sm);
    padding: 12px 18px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--ta-fc-accent);
    color: #ffffff;
    cursor: pointer;
    box-shadow: var(--ta-fc-shadow-sm);
    transition: background 0.15s ease, transform 0.1s ease;
}

.ta-fc-form button[type="submit"]:hover {
    background: var(--ta-fc-accent-hover);
    color: #ffffff;
}

.ta-fc-form button[type="submit"]:active {
    transform: translateY(1px);
}

/* Alerts */

.ta-fc-error,
.ta-fc-info {
    display: flex;
    align-items: flex-start;
    gap: 0;
    border-radius: var(--ta-fc-radius-sm);
    padding: 11px 14px;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.ta-fc-error {
    background: var(--ta-fc-danger-soft);
    border: 1px solid #fecaca;
    color: var(--ta-fc-danger);
}

.ta-fc-info {
    background: var(--ta-fc-accent-soft);
    border: 1px solid #fecdd3;
    color: #9f1239;
}

/* Secondary button */

.ta-fc-backlink {
    margin-top: 14px;
    width: 100%;
    background: var(--ta-fc-surface);
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border-strong);
    padding: 10px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ta-fc-ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ta-fc-backlink:hover {
    background: var(--ta-fc-surface-muted);
    border-color: var(--ta-fc-border-strong);
    color: var(--ta-fc-ink);
}

/* Test / debug controls */

.ta-fc-test-btn,
.ta-fc-test-btn--secondary {
    margin-top: 14px;
    border-radius: var(--ta-fc-radius-sm);
    border: 1px dashed var(--ta-fc-border-strong);
    background: var(--ta-fc-surface-muted);
    color: var(--ta-fc-ink-muted);
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ta-fc-test-btn--secondary {
    width: 100%;
    text-align: center;
}

.ta-fc-test-btn:hover,
.ta-fc-test-btn--secondary:hover {
    background: var(--ta-fc-surface);
    border-color: var(--ta-fc-ink-subtle);
    color: var(--ta-fc-ink);
}

.ta-fc-test-result {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--ta-fc-ink-muted);
    min-height: 16px;
}

.ta-fc-debug {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border);
    background: var(--ta-fc-surface-muted);
    font-size: 0.6875rem;
    color: var(--ta-fc-ink-muted);
}

.ta-fc-debug-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ta-fc-ink);
    font-size: 0.75rem;
}

.ta-fc-debug-block {
    margin-top: 6px;
}

.ta-fc-debug-block strong {
    display: inline-block;
    margin-bottom: 2px;
}

.ta-fc-debug pre {
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--ta-fc-surface);
    border: 1px solid var(--ta-fc-border);
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--ta-fc-mono);
    font-size: 0.6875rem;
    line-height: 1.45;
}

/* Cabinet layout */

.ta-fc-layout {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    gap: 20px;
    box-sizing: border-box;
}

.ta-fc-sidebar,
.ta-fc-main {
    background: var(--ta-fc-surface);
    border-radius: var(--ta-fc-radius-lg);
    border: 1px solid var(--ta-fc-border);
    box-shadow: var(--ta-fc-shadow);
}

.ta-fc-sidebar {
    padding: 20px;
    align-self: start;
}

.ta-fc-main {
    padding: 22px 22px 26px;
    background: var(--ta-fc-surface-raised);
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Sidebar profile */

.ta-fc-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ta-fc-border);
}

.ta-fc-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--ta-fc-radius-sm);
    background: var(--ta-fc-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.ta-fc-user-info {
    flex: 1;
    min-width: 0;
}

.ta-fc-user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.ta-fc-user-phone {
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--ta-fc-ink-muted);
}

.ta-fc-sidebar-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ta-fc-border);
}

.ta-fc-sidebar-block:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.ta-fc-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ta-fc-ink-subtle);
    margin-bottom: 4px;
}

.ta-fc-value {
    font-size: 0.875rem;
    color: var(--ta-fc-ink);
    line-height: 1.4;
}

/* Status badges */

.ta-fc-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.ta-fc-status-active {
    background: var(--ta-fc-success-soft);
    color: var(--ta-fc-success);
    border: 1px solid #bbf7d0;
}

.ta-fc-status-inactive {
    background: var(--ta-fc-danger-soft);
    color: var(--ta-fc-danger);
    border: 1px solid #fecaca;
}

/* Logout */

.ta-fc-logout-btn--mobile {
    display: none;
}

.ta-fc-logout-btn--desktop {
    margin-top: 18px;
    width: 100%;
}

.ta-fc-logout-btn {
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border-strong);
    background: var(--ta-fc-surface);
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ta-fc-ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ta-fc-logout-btn:hover {
    background: var(--ta-fc-danger-soft);
    border-color: #fecaca;
    color: var(--ta-fc-danger);
}

.ta-fc-logout-btn.ta-fc-logout-btn--mobile,
.ta-fc-logout-btn.ta-fc-logout-btn--mobile:hover,
.ta-fc-logout-btn.ta-fc-logout-btn--mobile:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 0 !important;
}

/* Sidebar "Подробнее" (mobile) */

.ta-fc-sidebar-more {
    display: none;
    width: 100%;
    margin-top: 14px;
    padding: 0 !important;
    border-radius: var(--ta-fc-radius-sm);
    border: 1px solid var(--ta-fc-border);
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: var(--ta-fc-shadow-sm);
    color: var(--ta-fc-ink);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ta-fc-sidebar-more:hover,
.ta-fc-sidebar-more:focus,
.ta-fc-sidebar-more[aria-expanded="true"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 0 !important;
    border-color: var(--ta-fc-border-strong);
}

.ta-fc-sidebar-more::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s ease;
}

.ta-fc-sidebar-more[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(1px);
}

.ta-fc-sidebar-extra {
    display: block;
}

.ta-fc-sidebar-extra .ta-fc-sidebar-block:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

@media (min-width: 769px) {
    .ta-fc-sidebar-more {
        display: none !important;
    }

    .ta-fc-logout-btn--mobile {
        display: none !important;
    }

    .ta-fc-sidebar-extra {
        display: block !important;
    }
}

/* Sections */

.ta-fc-section h2 {
    margin: 0 0 14px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ta-fc-ink);
}

.ta-fc-section + .ta-fc-section {
    margin-top: 24px;
}

/* Bonus card */

.ta-fc-bonus-card {
    background: var(--ta-fc-surface);
    border-radius: var(--ta-fc-radius);
    padding: 18px 20px 20px;
    border: 1px solid var(--ta-fc-border);
    border-left: 3px solid var(--ta-fc-accent);
    box-shadow: var(--ta-fc-shadow-sm);
}

.ta-fc-bonus-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ta-fc-ink-muted);
    margin-bottom: 6px;
}

.ta-fc-bonus-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ta-fc-ink);
}

.ta-fc-bonus-value span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ta-fc-ink-subtle);
    margin-left: 6px;
    letter-spacing: 0;
}

.ta-fc-bonus-note {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--ta-fc-ink-muted);
    line-height: 1.45;
}

/* Empty state */

.ta-fc-orders-empty {
    background: var(--ta-fc-surface);
    border-radius: var(--ta-fc-radius);
    padding: 20px 22px;
    font-size: 0.875rem;
    color: var(--ta-fc-ink-muted);
    border: 1px dashed var(--ta-fc-border-strong);
    text-align: center;
    line-height: 1.5;
}

.ta-fc-orders-empty p {
    margin: 0;
}

/* History table */

.ta-fc-history-table-wrap {
    margin-top: 4px;
    background: var(--ta-fc-surface);
    border: 1px solid var(--ta-fc-border);
    border-radius: var(--ta-fc-radius);
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--ta-fc-shadow-sm);
}

.ta-fc-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    table-layout: auto;
}

.ta-fc-history-table th,
.ta-fc-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ta-fc-border);
    text-align: left;
    white-space: normal;
    vertical-align: middle;
}

.ta-fc-history-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ta-fc-ink-subtle);
    background: var(--ta-fc-surface-muted);
}

.ta-fc-history-table tbody tr:last-child td {
    border-bottom: none;
}

.ta-fc-history-table tbody tr:hover td {
    background: var(--ta-fc-surface-raised);
}

.ta-fc-history-bonus {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ta-fc-op-accrual {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--ta-fc-success-soft);
    color: var(--ta-fc-success);
}

.ta-fc-op-spend {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--ta-fc-danger-soft);
    color: var(--ta-fc-danger);
}

.ta-fc-op-order {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--ta-fc-surface-muted);
    color: var(--ta-fc-ink-muted);
}

.ta-fc-op-site {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.ta-fc-order-source-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.ta-fc-order-row--site td {
    background: rgba(239, 246, 255, 0.35);
}

.ta-fc-order-row--site:hover td {
    background: rgba(239, 246, 255, 0.55);
}

.ta-fc-order-mobile-wrap {
    display: none;
}

.ta-fc-order-summary-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.ta-fc-order-summary-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ta-fc-summary-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.ta-fc-summary-date {
    flex: 0 1 6em;
}

.ta-fc-summary-number {
    flex: 0 1 4.5em;
    font-weight: 600;
}

.ta-fc-summary-source {
    flex: 0 0 auto;
}

.ta-fc-summary-amount {
    flex: 1 1 5em;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
}

.ta-fc-order-source-label {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--ta-fc-ink-muted);
    letter-spacing: 0.02em;
}

.ta-fc-os-chevron {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin: 0;
    border-right: 2px solid var(--ta-fc-ink-subtle);
    border-bottom: 2px solid var(--ta-fc-ink-subtle);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.ta-fc-order-row.is-expanded .ta-fc-os-chevron {
    transform: rotate(-135deg);
}

.ta-fc-order-mobile-details {
    border-top: 1px solid var(--ta-fc-border);
}

.ta-fc-order-extra-table {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ta-fc-order-extra-table th[scope="row"] {
    width: 42%;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ta-fc-ink-subtle);
    background: var(--ta-fc-surface-muted);
    vertical-align: middle;
}

.ta-fc-order-extra-table td {
    vertical-align: middle;
}

.ta-fc-order-mobile-details .ta-fc-order-details-inner {
    margin: 0 12px 12px;
}

.ta-fc-order-mobile-items-panel {
    margin-top: 0;
}

.ta-fc-order-toggle-cell {
    width: 0;
    padding: 0;
}

.ta-fc-order-row:has(.ta-fc-toggle-order-items) {
    cursor: pointer;
}

.ta-fc-toggle-order-items {
    font-size: 0.6875rem !important;
    font-weight: 600;
    padding: 6px 12px;
    min-width: 128px;
    border-radius: 999px;
    border: 1px solid var(--ta-fc-border);
    background: var(--ta-fc-surface);
    color: var(--ta-fc-ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ta-fc-toggle-order-items:hover {
    background: var(--ta-fc-surface-muted);
    border-color: var(--ta-fc-border-strong);
    color: var(--ta-fc-ink);
}

/* Order details */

.ta-fc-order-details-row td {
    vertical-align: top;
    padding: 0;
    border-bottom: 1px solid var(--ta-fc-border);
    background: var(--ta-fc-surface-muted);
}

.ta-fc-order-details-cell {
    padding: 14px 16px !important;
}

.ta-fc-order-details-inner {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ta-fc-surface);
    border: 1px solid var(--ta-fc-border);
    border-radius: var(--ta-fc-radius-sm);
}

.ta-fc-order-items-table {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    font-size: 0.8125rem;
    border-collapse: collapse;
}

.ta-fc-order-items-table th,
.ta-fc-order-items-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--ta-fc-border);
}

.ta-fc-order-items-table th {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--ta-fc-ink-subtle);
    background: var(--ta-fc-surface-muted);
}

.ta-fc-order-items-table tr:last-child td {
    border-bottom: none;
}

.ta-fc-order-items-table code {
    font-family: var(--ta-fc-mono);
    font-size: 0.75rem;
    background: var(--ta-fc-surface-muted);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--ta-fc-ink-muted);
}

/* Button loading */

.ta-fc-btn-loading {
    position: relative;
    cursor: default;
    opacity: 0.85;
    color: transparent !important;
}

.ta-fc-btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: ta-fc-spin 0.65s linear infinite;
}

.ta-fc-form button.ta-fc-btn-loading::after,
.ta-fc-logout-btn.ta-fc-btn-loading::after {
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: transparent;
}

.ta-fc-backlink.ta-fc-btn-loading::after,
.ta-fc-refresh-btn.ta-fc-btn-loading::after,
.ta-fc-toggle-order-items.ta-fc-btn-loading::after {
    border-color: var(--ta-fc-border-strong);
    border-top-color: transparent;
}

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

/* Responsive */

@media (max-width: 768px) {
    .ta-fc-wrapper {
        padding: 20px 12px 28px;
    }

    .ta-fc-card {
        padding: 22px 20px 26px;
    }

    .ta-fc-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ta-fc-sidebar {
        padding: 16px;
    }

    .ta-fc-main {
        padding: 10px 1px;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .ta-fc-user {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        align-items: flex-start;
    }

    .ta-fc-logout-btn--desktop {
        display: none !important;
    }

    .ta-fc-logout-btn--mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        align-self: center;
        margin: 0;
        width: auto;
        min-width: 40px;
        padding: 0 !important;
        border: 1px solid var(--ta-fc-border);
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-radius: var(--ta-fc-radius-sm);
        box-shadow: var(--ta-fc-shadow-sm);
        gap: 2px;
    }

    .ta-fc-logout-btn--mobile:hover,
    .ta-fc-logout-btn--mobile:focus {
        background: #ffffff !important;
        background-color: #ffffff !important;
        padding: 0 !important;
        border-color: #fecaca;
        color: var(--ta-fc-danger);
    }

    .ta-fc-logout-btn__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
    }

    .ta-fc-logout-btn__caption {
        font-size: 0.625rem;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: 0.01em;
    }

    .ta-fc-sidebar-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #ffffff !important;
        background-color: #ffffff !important;
        padding: 0 !important;
    }

    .ta-fc-sidebar-extra {
        display: none;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--ta-fc-border);
    }

    .ta-fc-sidebar--details-open .ta-fc-sidebar-extra {
        display: block;
    }

    .ta-fc-order-summary-toggle {
        padding: 7px 8px;
        gap: 2px;
    }

    .ta-fc-order-summary-body {
        gap: 4px;
    }

    .ta-fc-summary-cell {
        font-size: 0.625rem;
    }

    .ta-fc-order-summary-body .ta-fc-order-source-badge {
        margin-left: 0;
        padding: 1px 5px;
        font-size: 0.5625rem;
    }

    .ta-fc-order-source-label {
        font-size: 0.5625rem;
    }

    .ta-fc-os-chevron {
        width: 6px;
        height: 6px;
    }

    .ta-fc-history-table-wrap {
        overflow-x: hidden;
    }

    .ta-fc-history-table {
        font-size: 0.8125rem;
        table-layout: fixed;
        width: 100%;
    }

    .ta-fc-history-table thead {
        display: none;
    }

    .ta-fc-history-table tbody tr.ta-fc-order-row {
        display: block;
        border-bottom: 1px solid var(--ta-fc-border);
    }

    .ta-fc-history-table tbody tr.ta-fc-order-row:last-child {
        border-bottom: none;
    }

    .ta-fc-history-table tbody tr.ta-fc-order-row td.ta-fc-order-mobile-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0;
        border-bottom: none;
        overflow: hidden;
    }

    .ta-fc-history-table tbody tr.ta-fc-order-row td.ta-fc-order-cell--desktop {
        display: none !important;
    }

    .ta-fc-history-table tbody tr.ta-fc-order-details-row {
        display: none !important;
    }

    .ta-fc-history-table tbody tr.ta-fc-order-row.is-expanded td.ta-fc-order-mobile-wrap {
        background: var(--ta-fc-surface-raised);
    }

    .ta-fc-order-extra-table .ta-fc-toggle-order-items {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .ta-fc-order-details-inner {
        overflow-x: hidden;
        max-width: 100%;
    }

    .ta-fc-order-items-table {
        table-layout: fixed;
        width: 100%;
    }

    .ta-fc-order-items-table tbody tr {
        padding: 0;
    }

    .ta-fc-order-items-table tbody td {
        padding: 3px 10px;
    }

    .ta-fc-order-items-table code {
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }

    .ta-fc-history-table th,
    .ta-fc-history-table td {
        padding: 10px 12px;
    }

    .ta-fc-bonus-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .ta-fc-order-details-cell {
        padding: 10px 12px !important;
    }

    .ta-fc-order-items-table {
        min-width: 0;
        margin-bottom: 0;
        font-size: 0.75rem;
    }

    .ta-fc-order-items-table thead {
        display: none;
    }

    .ta-fc-order-items-table tbody tr {
        display: block;
        padding: 0;
        border-bottom: 1px solid var(--ta-fc-border);
    }

    .ta-fc-order-items-table tbody tr:last-child {
        border-bottom: none;
    }

    .ta-fc-order-items-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 3px 10px;
        border-bottom: none;
        text-align: right;
        word-break: break-word;
    }

    .ta-fc-order-items-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 40%;
        max-width: 40%;
        font-size: 0.6875rem;
        font-weight: 600;
        color: var(--ta-fc-ink-subtle);
        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .ta-fc-order-items-table th,
    .ta-fc-order-items-table td {
        padding: 6px 0;
    }
}

/* Compact login form (toolbar panels, embeds) */

.ta-fc-root--compact .ta-fc-wrapper--compact {
    padding: 0;
    align-items: stretch;
}

.ta-fc-root--compact .ta-fc-card--compact {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.ta-fc-root--compact .ta-fc-card__title {
    margin: 0 0 6px;
    font-size: 1.125rem;
    font-weight: 600;
}

.ta-fc-root--compact .ta-fc-card__lead {
    margin: 0 0 16px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.ta-fc-root--compact .ta-fc-info {
    margin-bottom: 14px;
    font-size: 0.8125rem;
}

.ta-fc-root--compact .ta-fc-backlink {
    margin-top: 12px;
}

.ta-fc-login-logged-in-text {
    margin: 0 0 12px;
    color: var(--ta-fc-ink-muted);
    font-size: 0.875rem;
}

.ta-fc-login-logged-in-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--ta-fc-radius-sm);
    background: var(--ta-fc-accent);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ta-fc-login-logged-in-link:hover {
    background: var(--ta-fc-accent-hover);
    color: #fff;
}

.wdtp-panel__content .ta-fc-root--compact {
    width: 100%;
}
