/*
 * MINT Toolbox panel – layout of MINTernals (reference screenshot, Nov 2026), colours from
 * the MINT CI. Plain CSS served from public/, no build step: loaded after Filament's
 * styles and unlayered, so it wins over Filament's defaults.
 */
:root {
    /* Primary for headings, pills and table headers: Anthracite (CI). Buttons get the same
       value through the Filament "primary" palette in AdminPanelProvider. */
    --mint-primary: #333333;
    /* Toolbox signature: Anthracite sidebar with Orange accent (MINTernals: Petrol,
       Deal & Data Library: Dark Blue). */
    --mint-sidebar: #333333;
    --mint-accent: #eba44d;
    --mint-green: #4fb79d;
    --mint-green-light: #78d6bf;
    --mint-beige: #f8f3eb;
    --mint-anthracite: #333333;
    --mint-grey: #737373;
    --mint-hairline: #dfdfdf;
    --mint-hairline-beige: #e9e2d6;
    --mint-radius-card: 0.875rem;
    --mint-radius-control: 0.5rem;
}

/* ---------- Page ---------------------------------------------------------- */
.fi-body {
    background-color: var(--mint-beige);
    color: var(--mint-anthracite);
}

.fi-header-heading,
.fi-simple-header-heading {
    font-weight: 700;
    color: var(--mint-primary);
    letter-spacing: -0.01em;
}

.fi-header-subheading {
    color: var(--mint-grey);
}

/* ---------- Top bar: slim, beige, hairline below --------------------------- */
.fi-topbar,
.fi-topbar > nav {
    background-color: var(--mint-beige);
    box-shadow: none;
    border-bottom: 1px solid var(--mint-hairline-beige);
}

.fi-topbar .fi-icon-btn {
    color: var(--mint-primary);
}

/* ---------- Sidebar: Anthracite panel with rounded corners ---------------------- */
@media (min-width: 64rem) {
    .fi-sidebar {
        margin: 0.5rem 0 0.5rem 0.5rem;
        height: calc(100dvh - 1rem);
        border-radius: 1rem;
        overflow: hidden;
    }
}

.fi-sidebar,
.fi-sidebar-header,
.fi-sidebar-nav,
.fi-sidebar-footer {
    background-color: var(--mint-sidebar);
    box-shadow: none;
    border: 0;
}

.fi-sidebar-header {
    padding-top: 1.25rem;
    padding-bottom: 0.75rem;
}

.fi-sidebar .fi-icon-btn {
    color: rgb(255 255 255 / 0.85);
}

/* Group labels ("Platform", "Administration"): small, light, sentence case. */
.fi-sidebar-group-label,
.fi-sidebar-group-btn,
.fi-sidebar-group-collapse-btn {
    color: rgb(255 255 255 / 0.75);
    font-weight: 500;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
}

.fi-sidebar-item-btn {
    border-radius: var(--mint-radius-control);
}

.fi-sidebar-item-label,
.fi-sidebar-item-icon,
.fi-sidebar-item-grouped-border-part {
    color: #ffffff;
    font-weight: 500;
}

.fi-sidebar-item-grouped-border-part {
    background-color: rgb(255 255 255 / 0.35);
}

.fi-sidebar-item-btn:hover,
.fi-sidebar-item-btn:focus-visible {
    background-color: rgb(255 255 255 / 0.08);
}

/* Active item: darker band with an orange marker and icon (Toolbox accent). */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: rgb(0 0 0 / 0.25);
    box-shadow: inset 3px 0 0 var(--mint-accent);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #ffffff;
    font-weight: 600;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--mint-accent);
}

/* User menu at the bottom of the sidebar. */
.fi-sidebar .fi-user-menu-trigger,
.fi-sidebar .fi-user-menu-trigger * {
    color: #ffffff;
}

.fi-sidebar .fi-user-menu-trigger:hover {
    background-color: rgb(255 255 255 / 0.08);
}

.fi-sidebar-footer {
    border-top: 1px solid rgb(255 255 255 / 0.1);
}

/* Global search in the sidebar: translucent field instead of a white box. */
.fi-sidebar .fi-global-search-field .fi-input-wrp {
    background-color: rgb(255 255 255 / 0.08);
    --tw-ring-color: rgb(255 255 255 / 0.12);
    outline-color: rgb(255 255 255 / 0.12);
    box-shadow: none;
}

.fi-sidebar .fi-global-search-field input,
.fi-sidebar .fi-global-search-field svg {
    color: rgb(255 255 255 / 0.85);
}

.fi-sidebar .fi-global-search-field input::placeholder {
    color: rgb(255 255 255 / 0.5);
}

/* ---------- Brand: SVG lockup, white on the sidebar, colour elsewhere ----- */
.mint-logo-on-light,
.mint-logo-on-dark {
    height: 100%;
    width: auto;
    max-width: none;
}

.mint-logo-on-dark,
.fi-sidebar .mint-logo-on-light {
    display: none;
}

.fi-sidebar .mint-logo-on-dark {
    display: block;
}

/* Logo centred across the full sidebar width; the collapse arrow sits on the left edge. */
.fi-sidebar-header {
    position: relative;
    justify-content: center;
}

.fi-sidebar-header-logo-ctn {
    flex: 0 0 auto;
}

.fi-sidebar-header .fi-logo {
    margin-inline-start: 0;
}

.fi-sidebar-close-collapse-sidebar-btn {
    position: absolute;
    left: 0.75rem;
}

/* ---------- Cards: white, rounded, hairline instead of shadow -------------- */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-modal-window {
    border-radius: var(--mint-radius-card);
}

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat {
    background-color: #ffffff;
    box-shadow: none;
    --tw-ring-color: var(--mint-hairline);
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
}

/* Side-by-side sections (heading left, fields right): only the fields are a card. */
.fi-section.fi-aside {
    background-color: transparent;
    outline: none;
    box-shadow: none;
}

.fi-section.fi-aside > .fi-section-content-ctn {
    background-color: #ffffff;
    border-radius: var(--mint-radius-card);
    box-shadow: none;
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
}

.fi-section.fi-aside .fi-section-header-description {
    color: var(--mint-grey);
}

.fi-section-header-heading {
    font-weight: 600;
    color: var(--mint-primary);
}

.fi-wi-stats-overview-stat-value {
    font-weight: 800;
    color: var(--mint-primary);
}

/* Login card on the beige page. */
.fi-simple-main {
    border-radius: var(--mint-radius-card);
    box-shadow: none;
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
}

/* ---------- Tables -------------------------------------------------------- */
.fi-ta-header-cell {
    font-weight: 600;
    color: var(--mint-primary);
}

.fi-ta-row:hover,
.fi-ta-row:hover > td {
    background-color: #fbf8f3;
}

/* ---------- Inputs & buttons ---------------------------------------------- */
.fi-input-wrp,
.fi-btn {
    border-radius: var(--mint-radius-control);
}

.fi-btn {
    font-weight: 500;
}

/* Wide tables scroll inside their card instead of widening the page (phones). */
.fi-main-ctn,
.fi-main,
.fi-page,
.fi-ta-ctn {
    min-width: 0;
    max-width: 100%;
}

/* Client colour (seeded by MINT ID, see App\Support\ClientColor). */
.mint-client-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 9999px;
    vertical-align: middle;
}

/* ---------- Time Tracker: timer bar at the top of every page ---------------- */
.mint-timer {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border-radius: var(--mint-radius-card);
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
}

.mint-timer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.mint-timer-fields {
    flex: 1 1 32rem;
    min-width: 0;
}

.mint-timer-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    background-color: var(--mint-accent);
    box-shadow: 0 0 0 4px rgb(235 164 77 / 0.25);
    animation: mint-pulse 1.6s ease-in-out infinite;
}

@keyframes mint-pulse {
    50% { box-shadow: 0 0 0 7px rgb(235 164 77 / 0.08); }
}

.mint-timer-running {
    flex: 1 1 16rem;
    min-width: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--mint-anthracite);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inline inputs (running timer): look like text until hovered or focused. */
.mint-inline-input {
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--mint-radius-control);
    background: transparent;
    color: var(--mint-anthracite);
    font: inherit;
}

.mint-inline-input:hover {
    border-color: var(--mint-hairline);
}

.mint-inline-input:focus {
    outline: none;
    border-color: var(--mint-accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgb(235 164 77 / 0.2);
}

.mint-timer-since {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.8125rem;
    color: var(--mint-grey);
    white-space: nowrap;
}

.mint-timer-since input {
    width: 4.25rem;
    padding-inline: 0.25rem;
    text-align: center;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

/* Description: the main input, so a little larger than the rest. */
.mint-timer-description input {
    font-size: 1rem;
}

/* Coloured project label (client colour), used in the timer bar and My time. */
.mint-timer-chip,
.mint-entry-project {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mint-timer-chip {
    max-width: 34rem;
}

/* Selected project in the timer bar: always one line, "…" when too long. */
.mint-timer-project .fi-select-input-value-ctn,
.mint-timer-project .fi-select-input-value-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Manual mode: date, from–to next to the fields. */
.mint-timer-manual {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--mint-grey);
}

.mint-manual-date {
    width: 9.5rem;
    font-size: 0.875rem;
    border-color: var(--mint-hairline);
}

.mint-manual-time {
    width: 4.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    border-color: var(--mint-hairline);
}

.mint-timer-modes {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mint-timer-error {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #db5461;
}

/* Tags: small chips, click to edit; faint tag icon when there are none. */
.mint-tags {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.25rem 0.375rem;
    border: 0;
    border-radius: var(--mint-radius-control);
    background: none;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.mint-tags:hover:not(:disabled) {
    background-color: #f6f2ec;
}

.mint-tags:disabled {
    cursor: default;
}

.mint-tag {
    padding: 0.0625rem 0.5rem;
    border-radius: 9999px;
    background-color: #f3eee6;
    color: var(--mint-anthracite);
    font-size: 0.75rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mint-tag-more {
    background-color: transparent;
    color: var(--mint-grey);
}

.mint-tag-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #c9c3b8;
}

.mint-tags:hover .mint-tag-icon {
    color: var(--mint-grey);
}

/* Tags field in the timer bar: one line – chips first, then the input; chips scroll
   sideways instead of wrapping into a second row. */
.mint-timer-tags .fi-async-component-content {
    display: flex;
    align-items: center;
    min-width: 0;
}

.mint-timer-tags .fi-async-component-content > input {
    flex: 1 1 4rem;
    min-width: 4rem;
}

.mint-timer-tags .fi-async-component-content > div[wire\:ignore] {
    order: -1;
    min-width: 0;
    max-width: 70%;
}

.mint-timer-tags .fi-fo-tags-input-tags-ctn {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 0;
    padding: 0 0 0 0.5rem;
}

.mint-timer-tags .fi-fo-tags-input-tags-ctn .fi-badge {
    flex-shrink: 0;
}

/* Included hours line below the timer bar (only for projects with a quota). */
.mint-timer-usage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid #f0ece5;
    font-size: 0.8125rem;
    color: var(--mint-grey);
}

.mint-timer-usage b {
    color: var(--mint-anthracite);
}

.mint-timer-usage-bar {
    width: 8rem;
    height: 0.375rem;
    border-radius: 9999px;
    background-color: #f0ece5;
    overflow: hidden;
}

.mint-timer-usage-bar > div {
    height: 100%;
}

.mint-option-meta {
    margin-left: 0.375rem;
    font-size: 0.8125rem;
    color: var(--mint-grey);
}

.mint-timer-clock {
    font-size: 1.375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--mint-anthracite);
    min-width: 6rem;
    text-align: right;
}

.mint-timer-clock-idle {
    color: #c9c3b8;
}

/* Start: Toolbox orange with dark text (white on orange lacks contrast). */
.fi-btn.mint-btn-accent {
    background-color: var(--mint-accent);
    color: var(--mint-anthracite);
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-inline: 1.25rem;
}

.fi-btn.mint-btn-accent .fi-icon {
    color: var(--mint-anthracite);
}

.fi-btn.mint-btn-accent:hover {
    background-color: #e3962f;
}

.fi-btn.mint-btn-accent:disabled {
    background-color: #f3d3a8;
    color: rgb(51 51 51 / 0.55);
    opacity: 1;
}

/* Stop: Anthracite button with a red square (CI red on white text lacks contrast). */
.mint-timer-stop .fi-icon {
    color: #db5461;
}

/* ---------- Time Tracker: My time (one line per entry) --------------------- */
/* Week bar: data on white like the day cards (only page titles sit on the beige). */
.mint-week-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border-radius: var(--mint-radius-card);
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
}

.mint-week-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mint-anthracite);
}

.mint-week-range {
    font-size: 0.8125rem;
    color: var(--mint-grey);
}

.mint-week-user {
    min-width: 12rem;
}

.mint-week-search {
    flex: 1 1 14rem;
    max-width: 22rem;
}

/* Week | Month segmented switch */
.mint-view-switch {
    display: inline-flex;
    padding: 0.1875rem;
    border-radius: var(--mint-radius-control);
    background-color: #f3eee6;
}

.mint-view-switch button {
    padding: 0.25rem 0.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mint-grey);
    cursor: pointer;
}

.mint-view-switch button.is-active {
    background-color: #ffffff;
    color: var(--mint-anthracite);
    font-weight: 600;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.mint-week-total {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--mint-grey);
}

.mint-week-total b,
.mint-day-head b {
    margin-left: 0.375rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mint-anthracite);
    font-variant-numeric: tabular-nums;
}

.mint-day {
    background-color: #ffffff;
    border-radius: var(--mint-radius-card);
    outline: 1px solid var(--mint-hairline);
    outline-offset: -1px;
    overflow: hidden;
}

.mint-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1rem;
    background-color: #f3eee6;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mint-grey);
}

.mint-entry {
    display: grid;
    /* Fixed column widths so every row lines up: description · project · tags · times · duration · amount · actions */
    grid-template-columns: minmax(12rem, 1fr) 16rem 7.5rem 9.5rem 4.5rem 5.5rem 4.25rem;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    border-top: 1px solid #f0ece5;
}

.mint-entry:hover {
    background-color: #fcfaf6;
}

.mint-entry.is-running {
    box-shadow: inset 3px 0 0 var(--mint-accent);
}

/* Inputs look like text until hovered/focused. */
.mint-entry input {
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--mint-radius-control);
    background: transparent;
    color: var(--mint-anthracite);
    font: inherit;
    font-size: 0.9375rem;
}

.mint-entry input:hover {
    border-color: var(--mint-hairline);
}

.mint-entry input:focus {
    outline: none;
    border-color: var(--mint-accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgb(235 164 77 / 0.2);
}

.mint-entry-desc.is-static {
    padding: 0.375rem 0.5rem;
    font-size: 0.9375rem;
    color: var(--mint-anthracite);
}

.mint-entry-project {
    justify-self: stretch;
    min-width: 0;
    text-align: left;
    background: none;
    border: 0;
    padding: 0.375rem 0.5rem;
    border-radius: var(--mint-radius-control);
    cursor: pointer;
}

.mint-entry-project:hover:not(:disabled) {
    background-color: #f6f2ec;
}

.mint-entry-project:disabled {
    cursor: default;
}

.mint-entry-client {
    font-weight: 400;
    color: var(--mint-grey);
}

.mint-entry-times {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    color: var(--mint-grey);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mint-entry-times input {
    width: 3.75rem;
    padding-inline: 0.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.mint-entry-duration {
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--mint-anthracite);
}

input.mint-entry-duration {
    width: 100%;
    text-align: right;
    font-weight: 700;
}

.mint-entry-duration.is-running {
    color: #c4801f;
}

.mint-entry-amount {
    font-size: 0.8125rem;
    color: var(--mint-grey);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mint-entry-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.125rem;
}

.mint-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--mint-grey);
}

/* Phones: description on its own line, the rest below. */
@media (max-width: 64rem) {
    .mint-entry {
        grid-template-columns: 1fr auto 4rem auto;
        row-gap: 0.25rem;
    }

    .mint-entry-desc {
        grid-column: 1 / -1;
    }

    .mint-entry-project {
        grid-column: 1 / -1;
    }

    .mint-entry-amount {
        display: none;
    }
}

/* ---------- Time Tracker: report ------------------------------------------- */
.mint-report-period {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--mint-anthracite);
}

.mint-report {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.mint-report th {
    text-align: left;
    font-weight: 600;
    color: var(--mint-primary);
    padding: 0 0.5rem 0.75rem;
    border-bottom: 2px solid var(--mint-hairline);
}

.mint-report td {
    padding: 0.5rem;
    border-bottom: 1px solid #f0ece5;
}

.mint-report .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mint-report-client td {
    font-weight: 700;
    color: var(--mint-primary);
    background-color: #fbf8f3;
    padding-top: 0.75rem;
}

.mint-report-project {
    padding-left: 1.5rem !important;
}

.mint-report-project span {
    color: var(--mint-grey);
    font-size: 0.8125rem;
}

.mint-report-tagrow td {
    color: var(--mint-grey);
    font-size: 0.8125rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.mint-report-credit td {
    color: #3f9a83;
}

.mint-report tfoot tr.mint-report-subtotal td {
    font-weight: 600;
    color: var(--mint-grey);
    border-top: 0;
}

.mint-report tfoot td {
    font-weight: 800;
    color: var(--mint-primary);
    border-top: 2px solid var(--mint-primary);
    border-bottom: 0;
}

.mint-report-note {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--mint-grey);
}

/* ---------- Pills: status solid Anthracite, tags outlined (as in MINTernals) --- */
.fi-badge {
    border-radius: 9999px;
    font-weight: 600;
}

.fi-badge.fi-color-primary {
    background-color: var(--mint-primary);
    color: #ffffff;
    --tw-ring-color: var(--mint-primary);
}

.fi-badge.fi-color-primary .fi-icon,
.fi-badge.fi-color-primary .fi-badge-label {
    color: #ffffff;
}

/* Remove-"x" on tag chips: Filament paints it in the badge colour at 50 % – dark on our
   Anthracite pill, i.e. invisible. White instead, full white on hover. */
.fi-badge.fi-color-primary .fi-badge-delete-btn-icon {
    color: rgba(255, 255, 255, 0.7);
}

.fi-badge.fi-color-primary .fi-badge-delete-btn:hover .fi-badge-delete-btn-icon,
.fi-badge.fi-color-primary .fi-badge-delete-btn:focus-visible .fi-badge-delete-btn-icon {
    color: #ffffff;
}

.fi-badge.fi-color-gray {
    background-color: #ffffff;
    color: var(--mint-anthracite);
    --tw-ring-color: var(--mint-hairline);
}
