/*
 * TitleBlox look and feel for the Filament panels (brand kit v1.0, TitleBlox_Brand-Guide_v1.0.pdf).
 *
 * Palettes, fonts, logos and the favicon are set on the panels (app/Filament/Brand.php); this file
 * holds what the panel API can't express. Filament's prebuilt theme sits in CSS cascade layers, so
 * these unlayered rules win without !important. Use Filament's variables (--primary-600, --gray-950)
 * and fi-* classes; check dark mode (html.dark) for every rule.
 *
 * Registered as a Filament asset: after editing, run `php artisan filament:assets`
 * (publishes to public/css/app/titleblox-brand.css), then hard-refresh.
 */

/* Tokens ---------------------------------------------------------------------------------------- */

:root {
    /* 04_Color/TitleBlox_Colors.css */
    --tbx-carbon: #15171a;
    --tbx-signal-violet: #5b3df5;
    --tbx-lilac: #c8beff;
    --tbx-chalk: #f3f2ee;
    --tbx-steel: #62676f;
    --tbx-violet-700: #4528d6;
    --tbx-violet-400: #7a63ff;
    --tbx-violet-300: #a596ff;
    --tbx-lilac-100: #ece8ff;
    --tbx-neutral-400: #a9adb4;

    /* Typography: the guide's fallback stack behind IBM Plex Sans (set by ->font()) */
    --default-font-family:
        var(--font-family), system-ui, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
        'Segoe UI Emoji';

    /* UI tokens: radius 6 px on controls (rounded-lg), 8 px on cards (rounded-xl) */
    --radius-lg: 6px;
    --radius-xl: 8px;
}

/* Type scale -------------------------------------------------------------------------------------
 * Heading 1  SemiBold 28/34, -2%   page titles
 * Heading 2  SemiBold 20/28, -1%   sign-in and modal headings
 * Heading 3  SemiBold 16/24         section headings (Filament's default already matches)
 * Sentence case, left-aligned, tabular figures in tables.
 */

.fi-header-heading {
    font-size: 1.75rem;
    line-height: 2.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.fi-modal-heading,
.fi-simple-header-heading {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.fi-simple-header {
    align-items: flex-start;
}

.fi-simple-header-heading,
.fi-simple-header-subheading {
    text-align: start;
}

.fi-ta-table,
.fi-in-text,
.fi-wi-stats-overview-stat-value {
    font-variant-numeric: tabular-nums;
}

.fi-wi-stats-overview-stat-value {
    letter-spacing: -0.02em;
}

/* Table column headings are small labels: caps, tracked, Steel */
.fi-ta-header-cell {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.dark .fi-ta-header-cell {
    color: var(--gray-400);
}

/* Top bar: Carbon chrome with the reversed logo, in light and dark mode --------------------------- */

.fi-topbar {
    background-color: var(--tbx-carbon);
    --tw-ring-color: color-mix(in oklab, #fff 8%, transparent);
}

.fi-topbar .fi-logo.fi-logo-light {
    display: none;
}

.fi-topbar .fi-logo.fi-logo-dark {
    display: flex;
}

.fi-topbar > .fi-icon-btn,
.fi-topbar-start .fi-icon-btn {
    color: var(--tbx-neutral-400);
}

.fi-topbar > .fi-icon-btn:hover,
.fi-topbar-start .fi-icon-btn:hover {
    color: #fff;
    background-color: color-mix(in oklab, #fff 8%, transparent);
}

.fi-topbar .fi-global-search-field .fi-input-wrp {
    background-color: color-mix(in oklab, #fff 6%, transparent);
    --tw-ring-color: color-mix(in oklab, #fff 16%, transparent);
}

.fi-topbar .fi-global-search-field .fi-input-wrp:focus-within {
    --tw-ring-color: var(--tbx-violet-400);
}

.fi-topbar .fi-global-search-field .fi-input {
    color: #fff;
}

.fi-topbar .fi-global-search-field .fi-input::placeholder,
.fi-topbar .fi-global-search-field .fi-input-wrp-prefix > .fi-icon,
.fi-topbar .fi-global-search-field .fi-input-wrp-suffix {
    color: var(--tbx-neutral-400);
}

/* Small tag after the logo, e.g. on the platform admin panel */
.tbx-panel-tag {
    margin-inline-start: 0.75rem;
    padding: 0.125rem 0.375rem;
    border: 1px solid color-mix(in oklab, var(--tbx-violet-300) 50%, transparent);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tbx-violet-300);
    white-space: nowrap;
}

/* Navigation: Lilac 100 marks the selected item ----------------------------------------------------- */

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--primary-100);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: var(--primary-600);
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: color-mix(in oklab, var(--primary-400) 14%, transparent);
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: var(--primary-400);
}

/* Buttons: Signal Violet with white text, Violet 700 when pressed ------------------------------------ */

.fi-btn.fi-color-primary:not(.fi-outlined) {
    --text: #fff;
    --hover-text: #fff;
    --dark-text: #fff;
    --dark-hover-text: #fff;
}

.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-disabled):not([disabled]):active {
    background-color: var(--primary-700);
}

/* Sign-in screen: Carbon panel with the tagline beside the form (guide p.15), desktop only ---------- */

.tbx-auth-aside {
    display: none;
}

@media (min-width: 64rem) {
    .fi-simple-layout:has(> .tbx-auth-aside) {
        flex-direction: row;
        align-items: stretch;
    }

    .fi-simple-layout:has(> .tbx-auth-aside) > .fi-simple-main-ctn {
        flex: 1 1 auto;
        min-width: 0;
        padding-inline: 2rem;
    }

    /* The panel carries the logo, so the form card doesn't repeat it */
    .fi-simple-layout:has(> .tbx-auth-aside) .fi-simple-header > .fi-logo {
        display: none;
    }

    .tbx-auth-aside {
        position: sticky;
        top: 0;
        display: flex;
        flex: 0 0 min(46%, 40rem);
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 3rem;
        min-height: 100dvh;
        padding: 3rem 3.5rem;
        background-color: var(--tbx-carbon);
        color: #fff;
    }

    .dark .tbx-auth-aside {
        box-shadow: inset -1px 0 0 color-mix(in oklab, #fff 8%, transparent);
    }
}

.tbx-auth-aside-logo {
    display: block;
    width: auto;
    height: 2.25rem;
}

.tbx-auth-aside-tagline {
    margin: 0;
    font-size: 2.5rem;
    line-height: 2.75rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.tbx-auth-aside-descriptor {
    max-width: 26rem;
    margin: 1rem 0 0;
    font-size: 0.875rem;
    line-height: 1.375rem;
    color: var(--tbx-neutral-400);
}

.tbx-auth-aside-symbol {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
}

/* Density and field hierarchy (2026-09-29) --------------------------------------------------------
 * A little more compact than Filament's defaults, and read-only fields (infolists) read as label and
 * value: labels are small caps in Steel, like the table headings; values are the content - a step
 * larger, medium weight, Carbon (white in dark mode). Form labels are a step quieter than the inputs.
 */

.fi-page-header-main-ctn {
    padding-block: 1.25rem;
    row-gap: 1.25rem;
}

.fi-section-header {
    padding: 0.75rem 1.25rem;
}

.fi-section-content {
    padding: 1rem 1.25rem;
}

.fi-sc-has-gap {
    gap: 1rem 1.5rem;
}

.fi-ta-text,
.fi-ta-header-cell {
    padding-block: 0.625rem;
}

.fi-sidebar-item-btn {
    padding-block: 0.375rem;
}

.fi-fo-field {
    row-gap: 0.375rem;
}

.fi-in-entry {
    row-gap: 0.125rem;
}

.fi-in-entry-label {
    font-size: 0.6875rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.dark .fi-in-entry-label {
    color: var(--gray-400);
}

.fi-in-text-item {
    font-size: 0.9375rem;
    line-height: 1.375rem;
    font-weight: 500;
    color: var(--gray-950);
}

.dark .fi-in-text-item {
    color: #fff;
}

.fi-in-placeholder {
    font-weight: 400;
    color: var(--gray-400);
}

.dark .fi-in-placeholder {
    color: var(--gray-500);
}

.fi-fo-field-label-content {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
}

.dark .fi-fo-field-label-content {
    color: var(--gray-300);
}

/* Record pages: the tab row (title block, relation managers) runs the full width, left-aligned */
.fi-sc-tabs > .fi-tabs:not(.fi-contained) {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    justify-content: flex-start;
}

/* Run page (livewire/run-live-events): the sections, the events table and the artifacts list. The panel CSS is
   prebuilt, so Tailwind utilities written in app views (py-1, w-full ...) do not exist - these classes replace them. */
.tbx-run-live {
    display: grid;
    gap: 1.5rem;
}

.tbx-events-wrap {
    overflow-x: auto;
}

.tbx-events {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.tbx-events th {
    padding: 0 0.75rem 0.5rem;
    text-align: start;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

.tbx-events td {
    padding: 0.5rem 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-950);
}

.tbx-events tbody tr:first-child td {
    border-top: 0;
}

.tbx-events th:first-child,
.tbx-events td:first-child {
    padding-inline-start: 0;
}

.tbx-events th:last-child,
.tbx-events td:last-child {
    padding-inline-end: 0;
}

.tbx-events .tbx-num,
.tbx-events .tbx-time {
    width: 1%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--gray-500);
}

.tbx-events .tbx-type,
.tbx-events .tbx-step {
    width: 1%;
    white-space: nowrap;
}

.tbx-events .tbx-step {
    font-family: var(--mono-font-family, ui-monospace, SFMono-Regular, Consolas, monospace);
    font-size: 0.8125rem;
    color: var(--gray-700);
}

.tbx-events .tbx-msg {
    overflow-wrap: anywhere;
}

.dark .tbx-events th {
    color: var(--gray-400);
    border-bottom-color: rgb(255 255 255 / 0.1);
}

.dark .tbx-events td {
    border-top-color: rgb(255 255 255 / 0.05);
    color: #fff;
}

.dark .tbx-events .tbx-num,
.dark .tbx-events .tbx-time {
    color: var(--gray-400);
}

.dark .tbx-events .tbx-step {
    color: var(--gray-300);
}

.tbx-artifacts {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.tbx-muted {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.dark .tbx-muted {
    color: var(--gray-400);
}

/* Badges in the events table keep their whole label (Filament clips badge labels, which lets a narrow column
   squeeze them). */
.tbx-events .tbx-type .fi-badge-label {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

/* Settings (resources/views/filament/settings-tabs.blade.php): the group tabs run the full width with a rule under
   them; the screens in the chosen group sit below as a row of small pills (Lilac 100 marks the open one). */
.tbx-settings-tabs {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tbx-settings-groups.fi-tabs {
    max-width: none;
    margin-inline: 0;
    justify-content: flex-start;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
    padding-inline: 0;
    box-shadow: none;
    background: transparent;
    scrollbar-width: none; /* on a phone the row scrolls sideways without a bar */
}

.dark .tbx-settings-groups.fi-tabs {
    border-bottom-color: rgb(255 255 255 / 0.1);
}

.tbx-settings-groups .fi-tabs-item {
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding-inline: 0.875rem;
}

.tbx-settings-groups .fi-tabs-item.fi-active {
    border-bottom-color: var(--tbx-signal-violet);
    background: transparent;
}

.dark .tbx-settings-groups .fi-tabs-item.fi-active {
    border-bottom-color: var(--tbx-violet-400);
}

.tbx-settings-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tbx-settings-subtab {
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--gray-700);
    background: #fff;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.tbx-settings-subtab:hover {
    border-color: var(--tbx-violet-300);
    color: var(--tbx-violet-700);
}

.tbx-settings-subtab.tbx-active {
    border-color: var(--tbx-lilac);
    background: var(--tbx-lilac-100);
    color: var(--tbx-violet-700);
}

.dark .tbx-settings-subtab {
    border-color: rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.03);
    color: var(--gray-300);
}

.dark .tbx-settings-subtab:hover {
    border-color: var(--tbx-violet-400);
    color: #fff;
}

.dark .tbx-settings-subtab.tbx-active {
    border-color: var(--tbx-violet-400);
    background: rgb(91 61 245 / 0.25);
    color: #fff;
}

/* Dashboard (resources/views/filament/app/pages/dashboard.blade.php) --------------------------------------------
   A Carbon welcome banner on a drafting grid, four number cards, the activity chart, recent runs and projects, and the
   setup checklist. Tones: violet (brand), blue, amber, green. */
.tbx-dash .fi-page-content {
    row-gap: 1.5rem;
}

.tbx-dash-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    overflow: hidden;
    padding: 2rem 2.25rem;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(520px 260px at 88% 10%, rgb(91 61 245 / 0.55), transparent 65%),
        radial-gradient(380px 220px at 0% 100%, rgb(122 99 255 / 0.18), transparent 70%),
        linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px) 0 0 / 22px 22px,
        var(--tbx-carbon);
    box-shadow: 0 10px 30px -12px rgb(21 23 26 / 0.45);
}

.dark .tbx-dash-hero {
    border: 1px solid rgb(255 255 255 / 0.08);
}

.tbx-dash-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tbx-lilac);
}

.tbx-dash-title {
    margin: 0.375rem 0 0;
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tbx-dash-lede {
    margin: 0.5rem 0 0;
    max-width: 36rem;
    font-size: 0.9375rem;
    color: rgb(255 255 255 / 0.72);
}

.tbx-dash-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgb(91 61 245 / 0.3);
    color: #fff;
    font-weight: 500;
}

.tbx-dash-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #34d399;
    animation: tbx-pulse 1.8s infinite;
}

@keyframes tbx-pulse {
    0% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0.55); }
    70% { box-shadow: 0 0 0 7px rgb(52 211 153 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); }
}

.tbx-dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.5rem;
}

.tbx-dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5625rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.07);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.tbx-dash-btn:hover {
    background: rgb(255 255 255 / 0.14);
    border-color: rgb(255 255 255 / 0.28);
}

.tbx-dash-btn:active {
    transform: translateY(1px);
}

.tbx-dash-btn-primary {
    border-color: var(--tbx-violet-400);
    background: var(--tbx-signal-violet);
    box-shadow: 0 6px 18px -6px rgb(91 61 245 / 0.8);
}

.tbx-dash-btn-primary:hover {
    background: var(--tbx-violet-400);
    border-color: var(--tbx-violet-300);
}

.tbx-dash-btn-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.tbx-dash-sheet {
    width: 18rem;
    height: auto;
    filter: drop-shadow(0 12px 24px rgb(0 0 0 / 0.35));
    transform: rotate(-3deg);
}

.tbx-sheet-paper { fill: rgb(255 255 255 / 0.05); stroke: rgb(200 190 255 / 0.35); stroke-width: 1; }
.tbx-sheet-border { fill: none; stroke: rgb(200 190 255 / 0.55); stroke-width: 1.2; }
.tbx-sheet-thin { stroke: rgb(200 190 255 / 0.35); stroke-width: 1; }
.tbx-sheet-duct { fill: none; stroke: var(--tbx-violet-300); stroke-width: 2.4; stroke-linejoin: round; }
.tbx-sheet-dim { stroke: var(--tbx-lilac); stroke-width: 0.8; stroke-dasharray: 3 2; }
.tbx-sheet-tag { fill: var(--tbx-signal-violet); }
.tbx-sheet-accent-fill { fill: var(--tbx-violet-400); }
.tbx-sheet-bubble { fill: none; stroke: var(--tbx-lilac); stroke-width: 1.2; }

@media (max-width: 900px) {
    .tbx-dash-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.5rem;
    }

    .tbx-dash-sheet {
        display: none;
    }

    .tbx-dash-title {
        font-size: 1.625rem;
        line-height: 2rem;
    }
}

/* Number cards */
.tbx-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 1100px) {
    .tbx-dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tbx-dash-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tbx-dash-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(21 23 26 / 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.tbx-dash-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -10px rgb(21 23 26 / 0.18);
}

.tbx-dash-stat-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--tbx-lilac-100);
    color: var(--tbx-signal-violet);
}

.tbx-dash-stat-icon .fi-icon,
.tbx-dash-stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

[data-tone='blue'] .tbx-dash-stat-icon { background: #e0ebff; color: #2563eb; }
[data-tone='amber'] .tbx-dash-stat-icon { background: #fef3c7; color: #b45309; }
[data-tone='green'] .tbx-dash-stat-icon { background: #dcfce7; color: #15803d; }

.tbx-dash-stat-label {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.tbx-dash-stat-value {
    margin: 0.125rem 0 0;
    font-size: 1.75rem;
    line-height: 2.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--gray-950);
}

.tbx-dash-stat-note {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Two columns of cards */
.tbx-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .tbx-dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tbx-dash-col {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}

.tbx-dash-card {
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(21 23 26 / 0.04);
}

.tbx-dash-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tbx-dash-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    color: var(--gray-950);
}

.tbx-dash-card-sub {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.tbx-dash-link {
    flex: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tbx-signal-violet);
    text-decoration: none;
}

.tbx-dash-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Activity chart */
.tbx-dash-legend {
    display: flex;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.tbx-dash-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.tbx-dash-key {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 3px;
    background: var(--tbx-signal-violet);
}

.tbx-dash-key-failed {
    background: #ef4444;
}

.tbx-dash-chart {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 0.375rem;
    height: 11rem;
    /* four faint gridlines over the bar area (the last 1.25rem is the date row) */
    background: repeating-linear-gradient(to bottom, var(--gray-100) 0 1px, transparent 1px calc((100% - 1.25rem) / 4)) top / 100% calc(100% - 1.25rem) no-repeat;
}

.tbx-dash-bar-col {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 1.25rem;
    height: 100%;
    min-width: 0;
}

.tbx-dash-bar-track {
    display: flex;
    align-items: flex-end;
    height: 100%;
    border-bottom: 2px solid var(--gray-200);
}

.tbx-dash-bar {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, var(--tbx-violet-400), var(--tbx-signal-violet));
    transition: filter 0.15s;
}

.tbx-dash-bar-col:hover .tbx-dash-bar {
    filter: brightness(1.12);
}

.tbx-dash-bar-failed {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ef4444;
}

.tbx-dash-bar-label {
    padding-top: 0.25rem;
    font-size: 0.6875rem;
    white-space: nowrap;
    text-align: center;
    color: var(--gray-500);
}

/* Lists (runs, projects, checklist) */
.tbx-dash-list,
.tbx-dash-steps {
    display: grid;
    margin: 0 -0.5rem;
    padding: 0;
    list-style: none;
}

.tbx-dash-list > li + li {
    border-top: 1px solid var(--gray-100);
}

.tbx-dash-row,
.tbx-dash-steps a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.12s;
}

.tbx-dash-row:hover,
.tbx-dash-steps a:hover {
    background: var(--gray-50);
}

.tbx-dash-row-main {
    display: grid;
    flex: 1;
    min-width: 0;
}

.tbx-dash-row-title,
.tbx-dash-row-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbx-dash-row-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-950);
}

.tbx-dash-row-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.tbx-dash-dot {
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    background: #9ca3af;
    box-shadow: 0 0 0 3px rgb(156 163 175 / 0.18);
}

.tbx-dash-dot[data-color='success'] { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 0.18); }
.tbx-dash-dot[data-color='danger'] { background: #ef4444; box-shadow: 0 0 0 3px rgb(239 68 68 / 0.18); }
.tbx-dash-dot[data-color='info'] { background: #3b82f6; box-shadow: 0 0 0 3px rgb(59 130 246 / 0.18); }
.tbx-dash-dot[data-color='warning'] { background: #f59e0b; animation: tbx-pulse-amber 1.8s infinite; }

@keyframes tbx-pulse-amber {
    0% { box-shadow: 0 0 0 0 rgb(245 158 11 / 0.5); }
    70% { box-shadow: 0 0 0 6px rgb(245 158 11 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(245 158 11 / 0); }
}

@media (prefers-reduced-motion: reduce) {
    .tbx-dash-live-dot,
    .tbx-dash-dot[data-color='warning'] {
        animation: none;
    }
}

.tbx-dash-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9px;
    background: var(--tbx-lilac-100);
    color: var(--tbx-violet-700);
    font-size: 0.75rem;
    font-weight: 600;
}

.tbx-dash-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    border: 1px dashed var(--gray-200);
    border-radius: 10px;
    font-size: 0.875rem;
    text-align: center;
    color: var(--gray-500);
}

.tbx-dash-empty p {
    margin: 0;
    max-width: 26rem;
}

.tbx-dash-empty-icon {
    width: 2rem;
    height: 2rem;
    color: var(--gray-300);
}

/* Setup checklist */
.tbx-dash-setup {
    border-color: var(--tbx-lilac);
    background: linear-gradient(180deg, rgb(236 232 255 / 0.7), #fff 9rem);
}

.tbx-dash-ring {
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
}

.tbx-dash-ring-track { fill: none; stroke: var(--gray-200); stroke-width: 3.5; }
.tbx-dash-ring-fill { fill: none; stroke: var(--tbx-signal-violet); stroke-width: 3.5; stroke-linecap: round; }
.tbx-dash-ring-text { font-size: 9px; font-weight: 600; fill: var(--gray-950); }

.tbx-dash-step-check {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border: 2px solid var(--gray-300);
    border-radius: 999px;
    background: #fff;
    color: #fff;
}

.tbx-dash-step-check svg {
    width: 0.875rem;
    height: 0.875rem;
}

.tbx-dash-step.is-done .tbx-dash-step-check {
    border-color: var(--tbx-signal-violet);
    background: var(--tbx-signal-violet);
}

.tbx-dash-step.is-done .tbx-dash-row-title {
    color: var(--gray-500);
    text-decoration: line-through;
    text-decoration-color: var(--gray-300);
}

.tbx-dash-step-go {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--gray-400);
}

.tbx-dash-prefs {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tbx-dash-prefs:hover {
    border-color: var(--tbx-lilac);
    box-shadow: 0 8px 20px -10px rgb(91 61 245 / 0.35);
}

/* Dashboard, dark mode */
.dark .tbx-dash-stat,
.dark .tbx-dash-card {
    border-color: rgb(255 255 255 / 0.1);
    background: var(--gray-900);
    box-shadow: none;
}

.dark .tbx-dash-stat-value,
.dark .tbx-dash-card-title,
.dark .tbx-dash-row-title {
    color: #fff;
}

.dark .tbx-dash-ring-text {
    fill: #fff;
}

.dark .tbx-dash-stat-label,
.dark .tbx-dash-stat-note,
.dark .tbx-dash-card-sub,
.dark .tbx-dash-row-sub,
.dark .tbx-dash-legend,
.dark .tbx-dash-bar-label,
.dark .tbx-dash-empty {
    color: var(--gray-400);
}

.dark .tbx-dash-stat-icon { background: rgb(91 61 245 / 0.2); color: var(--tbx-violet-300); }
.dark [data-tone='blue'] .tbx-dash-stat-icon { background: rgb(37 99 235 / 0.2); color: #93c5fd; }
.dark [data-tone='amber'] .tbx-dash-stat-icon { background: rgb(245 158 11 / 0.18); color: #fcd34d; }
.dark [data-tone='green'] .tbx-dash-stat-icon { background: rgb(34 197 94 / 0.18); color: #86efac; }

.dark .tbx-dash-link {
    color: var(--tbx-violet-300);
}

.dark .tbx-dash-list > li + li {
    border-top-color: rgb(255 255 255 / 0.06);
}

.dark .tbx-dash-row:hover,
.dark .tbx-dash-steps a:hover {
    background: rgb(255 255 255 / 0.05);
}

.dark .tbx-dash-bar-track {
    border-bottom-color: rgb(255 255 255 / 0.12);
}

.dark .tbx-dash-chart {
    background-image: repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.06) 0 1px, transparent 1px calc((100% - 1.25rem) / 4));
}

.dark .tbx-dash-avatar {
    background: rgb(91 61 245 / 0.22);
    color: var(--tbx-lilac);
}

.dark .tbx-dash-empty {
    border-color: rgb(255 255 255 / 0.1);
}

.dark .tbx-dash-empty-icon {
    color: var(--gray-600);
}

.dark .tbx-dash-setup {
    border-color: rgb(122 99 255 / 0.45);
    background: linear-gradient(180deg, rgb(91 61 245 / 0.16), var(--gray-900) 9rem);
}

.dark .tbx-dash-ring-track { stroke: rgb(255 255 255 / 0.1); }
.dark .tbx-dash-ring-fill { stroke: var(--tbx-violet-400); }

.dark .tbx-dash-step-check {
    border-color: var(--gray-600);
    background: transparent;
}

.dark .tbx-dash-step.is-done .tbx-dash-step-check {
    border-color: var(--tbx-violet-400);
    background: var(--tbx-violet-400);
}

.dark .tbx-dash-prefs:hover {
    border-color: rgb(122 99 255 / 0.5);
}

/* Settings -> Company -> Branding (resources/views/filament/branding-current.blade.php): what is set now */
.tbx-brand-current {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
}

.tbx-brand-thumb {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: #fff;
    color: var(--tbx-signal-violet);
}

.tbx-brand-thumb.is-logo {
    width: 8rem;
    /* a checkerboard shows a transparent background */
    background:
        conic-gradient(var(--gray-100) 25%, #fff 0 50%, var(--gray-100) 0 75%, #fff 0) 0 0 / 14px 14px;
}

.tbx-brand-thumb.is-empty {
    border-style: dashed;
    background: #fff;
    color: var(--gray-400);
}

.tbx-brand-thumb img {
    max-width: 100%;
    max-height: 100%;
    padding: 0.375rem;
    object-fit: contain;
}

.tbx-brand-thumb-missing {
    padding: 0.25rem;
    font-size: 0.6875rem;
    text-align: center;
    color: var(--gray-500);
}

.tbx-brand-file-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.tbx-brand-ext {
    position: absolute;
    bottom: 0.375rem;
    padding: 0 0.3rem;
    border-radius: 4px;
    background: var(--tbx-signal-violet);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

.tbx-brand-meta {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.tbx-brand-meta p {
    margin: 0;
}

.tbx-brand-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-950);
}

.tbx-brand-path {
    overflow: hidden;
    font-family: var(--mono-font-family, ui-monospace, SFMono-Regular, Consolas, monospace);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-600);
}

.tbx-brand-note {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.dark .tbx-brand-current {
    border-color: rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.03);
}

.dark .tbx-brand-thumb {
    border-color: rgb(255 255 255 / 0.1);
    background: var(--gray-900);
    color: var(--tbx-violet-300);
}

.dark .tbx-brand-thumb.is-logo {
    background:
        conic-gradient(var(--gray-800) 25%, var(--gray-900) 0 50%, var(--gray-800) 0 75%, var(--gray-900) 0) 0 0 / 14px 14px;
}

.dark .tbx-brand-name {
    color: #fff;
}

.dark .tbx-brand-path {
    color: var(--gray-300);
}

.dark .tbx-brand-note {
    color: var(--gray-400);
}

/* Application colors (Chris, 2026-09-30; DECISIONS B7) ------------------------------------------
 * <x-color-chip> (resources/views/components/color-chip.blade.php): a small rounded swatch and a label for an
 * application's color - Settings -> Documents -> Applications and the scope-of-work table. The swatch color is set
 * inline; its ring keeps pale colors visible on white and dark ones on a dark page. tbx-colors-*: the Applications
 * screen (resources/views/filament/app/pages/application-colors.blade.php).
 */

.tbx-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 100%;
    padding: 0.125rem 0.5rem 0.125rem 0.3125rem;
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--gray-700);
    vertical-align: middle;
    white-space: nowrap;
}

.tbx-color-chip.is-bare {
    padding: 0;
    border: 0;
    background: none;
}

.tbx-color-chip-swatch {
    flex: none;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}

.tbx-color-chip.is-empty .tbx-color-chip-swatch {
    border: 1px dashed var(--gray-400);
    box-shadow: none;
}

.tbx-color-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbx-color-chip-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.tbx-colors-intro {
    display: grid;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.375rem;
    color: var(--gray-700);
}

.tbx-colors-intro p {
    margin: 0;
}

.tbx-colors-note {
    color: var(--gray-500);
}

.tbx-colors-intro code {
    padding: 0 0.25rem;
    border-radius: 4px;
    background: var(--gray-100);
    font-family: var(--mono-font-family, ui-monospace, SFMono-Regular, Consolas, monospace);
    font-size: 0.8125rem;
}

.tbx-colors-problems {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.dark .tbx-color-chip {
    border-color: rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: var(--gray-200);
}

.dark .tbx-color-chip.is-bare {
    background: none;
}

.dark .tbx-color-chip-swatch {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}

.dark .tbx-color-chip.is-empty .tbx-color-chip-swatch {
    border-color: var(--gray-500);
    box-shadow: none;
}

.dark .tbx-colors-intro {
    color: var(--gray-300);
}

.dark .tbx-colors-note {
    color: var(--gray-400);
}

.dark .tbx-colors-intro code {
    background: rgb(255 255 255 / 0.08);
}

/* Dashboard -> Scopes of work (Phase 4): one bar split by status, its legend, and the SOWs waiting on answers */
.tbx-dash-sow-bar {
    display: flex;
    gap: 2px;
    height: 0.625rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--gray-100);
}

.tbx-dash-sow-seg {
    flex-basis: 0;
    min-width: 6px;
}

.tbx-dash-sow-seg[data-color='gray'], .tbx-dash-sow-dot[data-color='gray'] { background: #9ca3af; }
.tbx-dash-sow-seg[data-color='info'], .tbx-dash-sow-dot[data-color='info'] { background: #3b82f6; }
.tbx-dash-sow-seg[data-color='warning'], .tbx-dash-sow-dot[data-color='warning'] { background: #f59e0b; }
.tbx-dash-sow-seg[data-color='danger'], .tbx-dash-sow-dot[data-color='danger'] { background: #ef4444; }
.tbx-dash-sow-seg[data-color='primary'], .tbx-dash-sow-dot[data-color='primary'] { background: var(--tbx-signal-violet); }
.tbx-dash-sow-seg[data-color='success'], .tbx-dash-sow-dot[data-color='success'] { background: #22c55e; }

.tbx-dash-sow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.875rem;
    margin: 0.625rem 0 0.25rem;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.tbx-dash-sow-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.tbx-dash-sow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
}

.tbx-dash-sow-q {
    font-weight: 600;
    color: #dc2626;
}

.dark .tbx-dash-sow-bar {
    background: rgb(255 255 255 / 0.08);
}

.dark .tbx-dash-sow-legend {
    color: var(--gray-400);
}

.dark .tbx-dash-sow-q {
    color: #fca5a5;
}
