/*
 * TailCache admin styles.
 *
 * "Softblock" design language: each block of content is a self-contained
 * white card with a soft 1px border, gentle shadow, and 14-16px radius.
 * Lists render as stacks of card rows (not HTML tables), key-value status
 * info renders as inline pills (no big icons), and accents lean indigo
 * with restrained color pops for status (green/amber/red).
 *
 * Class prefixes:
 *   .tc-       — TailCache utilities used by the tab blade files
 *   .tc-pill   — inline status pill row (Dashboard)
 *   .tc-soft   — softblock card / list / row primitives
 *   .tc-kv     — key-value grids (zone info, etc.)
 *   .tc-toggle — large toggle row used for boolean settings
 */

/* ──────────────────────────────────────────────────────────────────────
   Filament tab row — picks up the site's indigo accent.
   ────────────────────────────────────────────────────────────────────── */
.fi-main .fi-tabs {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.fi-main .fi-tabs-item {
    border-radius: 8px;
    transition: all 0.15s ease;
}

.fi-main .fi-tabs-item[aria-selected="true"] {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .fi-main .fi-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.04);
}

.dark .fi-main .fi-tabs-item[aria-selected="true"] {
    background: rgb(39, 39, 42);
    color: #a5b4fc;
}

/* ──────────────────────────────────────────────────────────────────────
   Tab content layout — vertical stack of softblocks
   ────────────────────────────────────────────────────────────────────── */
.tc-tab {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* A form is allowed to sit between tc-tab and its softblocks. Without
   this, the form is the only flex child and the inner siblings collapse
   together. Promoting the form to a flex column inherits the gap. */
.tc-tab > form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ──────────────────────────────────────────────────────────────────────
   Pill row (Dashboard status overview)
   ────────────────────────────────────────────────────────────────────── */
.tc-pill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    padding: 0.875rem 1.125rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tc-pill-row--center {
    justify-content: center;
}

.dark .tc-pill-row {
    background: rgb(24, 24, 27);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #374151;
    white-space: nowrap;
}

.tc-pill + .tc-pill {
    padding-left: 1.25rem;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .tc-pill { color: #d1d5db; }
.dark .tc-pill + .tc-pill { border-left-color: rgba(255, 255, 255, 0.08); }

.tc-pill__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.tc-pill__value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.tc-pill__suffix {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.125rem;
}

.dark .tc-pill__label { color: #6b7280; }
.dark .tc-pill__value { color: #f3f4f6; }
.dark .tc-pill__suffix { color: #6b7280; }

/* Status dot used inside pills */
.tc-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.tc-dot--gray { background: #9ca3af; }
.tc-dot--warn { background: #f59e0b; }
.tc-dot--danger { background: #ef4444; }
.tc-dot--info { background: #3b82f6; }

/* ──────────────────────────────────────────────────────────────────────
   Softblock card — the foundational shape
   ────────────────────────────────────────────────────────────────────── */
.tc-soft {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.dark .tc-soft {
    background: rgb(24, 24, 27);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-soft__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.125rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.dark .tc-soft__header { border-bottom-color: rgba(255, 255, 255, 0.06); }

.tc-soft__title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tc-soft__title svg {
    width: 16px;
    height: 16px;
    color: #4f46e5;
    flex-shrink: 0;
}

.tc-soft__title-count {
    font-size: 0.625rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.25rem;
}

.dark .tc-soft__title { color: #e5e7eb; }
.dark .tc-soft__title svg { color: #a5b4fc; }
.dark .tc-soft__title-count {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.tc-soft__description {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
    line-height: 1.4;
    width: 100%;
    flex-basis: 100%;
}

.dark .tc-soft__description { color: #9ca3af; }

.tc-soft__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tc-soft__body {
    padding: 1rem 1.125rem;
}

.tc-soft__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.125rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #fafbfc;
    flex-wrap: wrap;
}

.dark .tc-soft__footer {
    border-top-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

/* Detached footer — sits outside any card, right-aligned. Used for
   page-level Save buttons that follow a section-grid of soft cards. */
.tc-soft__footer-detached {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────────────────
   Soft list — stack of card rows (Database tables, Backups,
   Cache buckets, URL list)
   ────────────────────────────────────────────────────────────────────── */
.tc-soft-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tc-soft-list--gap {
    gap: 0.5rem;
}

.tc-soft-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.125rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.tc-soft-row:last-child { border-bottom: 0; }

.tc-soft-row:hover { background: #fafbfc; }

.dark .tc-soft-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark .tc-soft-row:hover { background: rgba(255, 255, 255, 0.02); }

/* When the soft-list is not wrapped in a tc-soft card, give each row
   its own framing */
.tc-soft-list--standalone .tc-soft-row {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dark .tc-soft-list--standalone .tc-soft-row {
    background: rgb(24, 24, 27);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-soft-list--standalone .tc-soft-row:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dark .tc-soft-list--standalone .tc-soft-row:hover {
    background: rgb(24, 24, 27);
}

.tc-soft-row__lead {
    flex: 0 0 auto;
}

.tc-soft-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tc-soft-row__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-soft-row__title code {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.8125rem;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.tc-soft-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.tc-soft-row__meta strong {
    font-weight: 600;
    color: #6b7280;
}

.dark .tc-soft-row__title { color: #f3f4f6; }
.dark .tc-soft-row__title code {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
}
.dark .tc-soft-row__meta { color: #6b7280; }
.dark .tc-soft-row__meta strong { color: #9ca3af; }

.tc-soft-row__side {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.tc-soft-row__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ──────────────────────────────────────────────────────────────────────
   Tag (small inline label — replaces Filament badges where we want
   tighter typography to match the soft-row design)
   ────────────────────────────────────────────────────────────────────── */
.tc-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.15);
    white-space: nowrap;
}

.tc-tag--success {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.2);
}

.tc-tag--warn {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.2);
}

.tc-tag--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.2);
}

.tc-tag--gray {
    background: rgba(0, 0, 0, 0.04);
    color: #4b5563;
    border-color: rgba(0, 0, 0, 0.05);
}

.tc-tag--info {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.2);
}

.tc-tag--score {
    min-width: 36px;
    justify-content: center;
    font-size: 0.75rem;
    padding: 4px 10px;
}

.dark .tc-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.3);
}
.dark .tc-tag--success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}
.dark .tc-tag--warn {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}
.dark .tc-tag--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}
.dark .tc-tag--gray {
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.08);
}
.dark .tc-tag--info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

/* ──────────────────────────────────────────────────────────────────────
   Key-value grid (Zone info, etc.)
   ────────────────────────────────────────────────────────────────────── */
.tc-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.625rem;
}

.tc-kv {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.625rem 0.75rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 10px;
}

.dark .tc-kv {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.tc-kv__label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.tc-kv__value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.dark .tc-kv__label { color: #6b7280; }
.dark .tc-kv__value { color: #f3f4f6; }

/* ──────────────────────────────────────────────────────────────────────
   Form primitives
   ────────────────────────────────────────────────────────────────────── */
.tc-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.tc-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.tc-grid-2--lopsided {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
    .tc-grid-2,
    .tc-grid-2--lopsided {
        grid-template-columns: 1fr;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   Bucket grid (Cache buckets — 4 visual cards in a row)
   ────────────────────────────────────────────────────────────────────── */
.tc-bucket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.875rem;
}

.tc-bucket {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.125rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
}

.tc-bucket:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.dark .tc-bucket {
    background: rgb(24, 24, 27);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-bucket__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.tc-bucket__name {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0;
}

.dark .tc-bucket__name { color: #9ca3af; }

.tc-bucket__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    flex-shrink: 0;
}

.tc-bucket__icon svg { width: 16px; height: 16px; }

.dark .tc-bucket__icon {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.tc-bucket__ttl {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.dark .tc-bucket__ttl { color: #f3f4f6; }

.tc-bucket__raw {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.dark .tc-bucket__raw { color: #6b7280; }

/* Section header used between groups in a single tab (e.g., Asset
   Optimization heading inside the Cache tab) */
.tc-section-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.tc-section-head::before,
.tc-section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.dark .tc-section-head { color: #9ca3af; }
.dark .tc-section-head::before,
.dark .tc-section-head::after { background: rgba(255, 255, 255, 0.08); }

/* ──────────────────────────────────────────────────────────────────────
   Action card grid — used by Purge Cache section (one card per action,
   with icon + title + description + button)
   ────────────────────────────────────────────────────────────────────── */
.tc-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.875rem;
}

.tc-action-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tc-action-card:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.dark .tc-action-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark .tc-action-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-action-card__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.tc-action-card__icon svg { width: 18px; height: 18px; }

.tc-action-card__icon--danger { background: #ef4444; }
.tc-action-card__icon--info   { background: #4f46e5; }
.tc-action-card__icon--gray   { background: #9ca3af; }

.tc-action-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tc-action-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.tc-action-card__desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.45;
}

.tc-action-card__cta {
    margin-top: 0.25rem;
}

.dark .tc-action-card__title { color: #f3f4f6; }
.dark .tc-action-card__desc { color: #9ca3af; }

/* ──────────────────────────────────────────────────────────────────────
   Toolbar — single-row maintenance actions (Cache tab)

   4 buttons sharing the same height, identical density, hover state, and
   keyboard focus ring. Wraps to multiple rows on narrow viewports.
   ────────────────────────────────────────────────────────────────────── */
.tc-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tc-toolbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.tc-toolbar__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tc-toolbar__btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.tc-toolbar__btn:active {
    transform: translateY(0);
}

.tc-toolbar__btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.tc-toolbar__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tc-toolbar__btn--danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.25);
}

.tc-toolbar__btn--danger:hover {
    background: #fee2e2;
    border-color: rgba(239, 68, 68, 0.4);
}

.tc-toolbar__btn--primary {
    background: #4f46e5;
    color: white;
    border-color: #4338ca;
}

.tc-toolbar__btn--primary:hover {
    background: #4338ca;
}

.tc-toolbar__btn--info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.25);
}

.tc-toolbar__btn--info:hover {
    background: #dbeafe;
    border-color: rgba(59, 130, 246, 0.4);
}

.tc-toolbar__btn--gray {
    background: white;
    color: #4b5563;
    border-color: rgba(0, 0, 0, 0.1);
}

.tc-toolbar__btn--gray:hover {
    background: #fafbfc;
    border-color: rgba(0, 0, 0, 0.15);
}

.dark .tc-toolbar__btn {
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
}

.dark .tc-toolbar__btn--danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}
.dark .tc-toolbar__btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.dark .tc-toolbar__btn--primary {
    background: #6366f1;
    color: white;
    border-color: #4f46e5;
}

.dark .tc-toolbar__btn--info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}
.dark .tc-toolbar__btn--info:hover {
    background: rgba(59, 130, 246, 0.25);
}

.dark .tc-toolbar__btn--gray {
    background: rgba(255, 255, 255, 0.04);
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.1);
}
.dark .tc-toolbar__btn--gray:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Inline progress card stacked below the toolbar when a job is active. */
.tc-toolbar-progress {
    margin-top: 0.875rem;
    padding: 0.75rem 0.875rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.tc-toolbar-progress + .tc-toolbar-progress {
    margin-top: 0.625rem;
}

.dark .tc-toolbar-progress {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.tc-toolbar-progress__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tc-toolbar-progress__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f46e5;
    flex-shrink: 0;
}

.dark .tc-toolbar-progress__label {
    color: #a5b4fc;
}

.tc-toolbar-progress__status {
    flex: 1;
    font-size: 0.75rem;
    color: #4b5563;
    min-width: 0;
}

.dark .tc-toolbar-progress__status {
    color: #d1d5db;
}

.tc-toolbar-progress__dismiss {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    line-height: 1;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #6b7280;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.tc-toolbar-progress__dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
}

.dark .tc-toolbar-progress__dismiss {
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}

.dark .tc-toolbar-progress__dismiss:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f3f4f6;
}

.tc-toolbar-progress .tc-warm-progress {
    margin: 0;
}

/* ──────────────────────────────────────────────────────────────────────
   TTL card grid — clear per-bucket editors in Settings
   ────────────────────────────────────────────────────────────────────── */
.tc-ttl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.875rem;
}

.tc-ttl-card {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tc-ttl-card:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.08);
}

.dark .tc-ttl-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark .tc-ttl-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.tc-ttl-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tc-ttl-card__name {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0;
}

.dark .tc-ttl-card__name { color: #9ca3af; }

.tc-ttl-card__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    flex-shrink: 0;
}

.tc-ttl-card__icon svg { width: 14px; height: 14px; }

.dark .tc-ttl-card__icon {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* Wrapper around the input + unit suffix */
.tc-ttl-card__input {
    position: relative;
    display: flex;
    align-items: center;
}

.tc-ttl-card__input input {
    width: 100%;
    padding: 0.5rem 3rem 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-appearance: textfield;
}

.tc-ttl-card__input input::-webkit-outer-spin-button,
.tc-ttl-card__input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tc-ttl-card__input input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.dark .tc-ttl-card__input input {
    background: rgb(39, 39, 42);
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.1);
}

.tc-ttl-card__unit {
    position: absolute;
    right: 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.dark .tc-ttl-card__unit { color: #6b7280; }

.tc-ttl-card__preview {
    font-size: 0.75rem;
    color: #4f46e5;
    font-weight: 500;
}

.dark .tc-ttl-card__preview { color: #a5b4fc; }

.tc-field-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tc-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tc-field-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.dark .tc-field-label { color: #e5e7eb; }

.tc-field-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.dark .tc-field-hint { color: #9ca3af; }

.tc-field-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Textarea matching Filament input styling for multi-URL fields */
.tc-textarea {
    width: 100%;
    min-height: 90px;
    padding: 0.5rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #111827;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    resize: vertical;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tc-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.dark .tc-textarea {
    background: rgb(39, 39, 42);
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.1);
}

/* ──────────────────────────────────────────────────────────────────────
   Toggle row (large boolean setting, used for assets)
   ────────────────────────────────────────────────────────────────────── */
.tc-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 10px;
}

.dark .tc-toggle {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.tc-toggle__main {
    flex: 1;
    min-width: 0;
}

.tc-toggle__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.125rem;
}

.tc-toggle__hint {
    font-size: 0.6875rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.dark .tc-toggle__title { color: #f3f4f6; }
.dark .tc-toggle__hint { color: #9ca3af; }

/* Native checkbox dressed up to look like a switch */
.tc-toggle input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 0.1875rem;
}

/* ──────────────────────────────────────────────────────────────────────
   Action rows
   ────────────────────────────────────────────────────────────────────── */
.tc-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tc-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────────────────
   Checkbox grid (Cloudflare zone settings, Skeleton sections/zones)
   ────────────────────────────────────────────────────────────────────── */
.tc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.625rem 1rem;
    padding: 0.75rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 10px;
}

.dark .tc-checkbox-grid {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ──────────────────────────────────────────────────────────────────────
   Skeleton tab grid (still used by Skeleton tab — unchanged design)
   ────────────────────────────────────────────────────────────────────── */
.tc-skel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.tc-skel-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    margin: 0 0 0.625rem 0;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark .tc-skel-heading { color: #a5b4fc; }

/* ──────────────────────────────────────────────────────────────────────
   Inline confirm (drop / restore / purge — popovers inside <details>)
   ────────────────────────────────────────────────────────────────────── */
.tc-inline-confirm summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
}

.tc-inline-confirm summary::-webkit-details-marker { display: none; }

.tc-inline-confirm-body {
    margin-top: 0.625rem;
    padding: 0.875rem;
    background: white;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 320px;
}

.dark .tc-inline-confirm-body {
    background: rgb(24, 24, 27);
    border-color: rgba(239, 68, 68, 0.3);
}

.tc-inline-confirm-body p {
    margin: 0;
    font-size: 0.8125rem;
    color: #4b5563;
}

.dark .tc-inline-confirm-body p { color: #d1d5db; }

/* ──────────────────────────────────────────────────────────────────────
   Nameserver chips (Cloudflare zone info)
   ────────────────────────────────────────────────────────────────────── */
.tc-ns-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tc-ns-list li {
    padding: 0.3rem 0.625rem;
    background: rgba(99, 102, 241, 0.06);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.dark .tc-ns-list li {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.3);
}

/* ──────────────────────────────────────────────────────────────────────
   Misc helpers
   ────────────────────────────────────────────────────────────────────── */
.tc-divider {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 1rem 0;
}

.dark .tc-divider { border-top-color: rgba(255, 255, 255, 0.06); }

.tc-empty {
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.8125rem;
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.dark .tc-empty {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
    color: #6b7280;
}

.tc-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tc-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 360px;
    display: inline-block;
    vertical-align: middle;
}

.tc-mt-sm { margin-top: 0.5rem; }

/* ──────────────────────────────────────────────────────────────────────
   Warm-cache progress bar — `--pct` custom property drives width
   ────────────────────────────────────────────────────────────────────── */
.tc-warm-progress {
    position: relative;
    height: 18px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 9999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.tc-warm-progress__bar {
    width: var(--pct, 0%);
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.tc-warm-progress__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #111827;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.dark .tc-warm-progress { background: rgba(255, 255, 255, 0.05); }
.dark .tc-warm-progress__label {
    color: #f3f4f6;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Expandable "X URLs weren't cached — why?" details panel */
.tc-warm-details {
    margin: 0.5rem 0;
    font-size: 0.75rem;
}

.tc-warm-details__summary {
    cursor: pointer;
    color: #4f46e5;
    font-weight: 600;
    list-style: none;
    padding: 0.25rem 0;
}

.tc-warm-details__summary::-webkit-details-marker { display: none; }

.tc-warm-details__summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.15s ease;
}

.tc-warm-details[open] .tc-warm-details__summary::before {
    content: '▾ ';
}

.tc-warm-details__summary:hover { color: #4338ca; }

.dark .tc-warm-details__summary { color: #a5b4fc; }
.dark .tc-warm-details__summary:hover { color: #c7d2fe; }

.tc-warm-details__list {
    list-style: none;
    padding: 0.5rem 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 160px;
    overflow-y: auto;
}

.tc-warm-details__list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.tc-warm-details__list li:last-child { border-bottom: 0; }

.dark .tc-warm-details__list li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.tc-warm-details__url {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.75rem;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.dark .tc-warm-details__url {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
}

.tc-warm-details__reason {
    color: #6b7280;
    margin-left: 0.25rem;
}

.tc-warm-details__reason--fail {
    color: #b91c1c;
}

.dark .tc-warm-details__reason { color: #9ca3af; }
.dark .tc-warm-details__reason--fail { color: #fca5a5; }

.tc-inline-link {
    background: none;
    border: 0;
    padding: 0;
    color: #4f46e5;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tc-inline-link:hover { color: #4338ca; }

.dark .tc-inline-link { color: #a5b4fc; }
.dark .tc-inline-link:hover { color: #c7d2fe; }

/* ──────────────────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tc-section-grid {
        grid-template-columns: 1fr;
    }

    .tc-soft__header,
    .tc-soft__body,
    .tc-soft__footer {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .tc-soft-row {
        padding: 0.75rem 0.875rem;
        flex-wrap: wrap;
        gap: 0.625rem;
    }

    .tc-soft-row__main { flex-basis: calc(100% - 0px); }

    .tc-pill + .tc-pill {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 480px) {
    .tc-action-row,
    .tc-soft__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .tc-action-row > *,
    .tc-soft__footer > * {
        width: 100%;
        justify-content: center;
    }
}
