/**
 * Fint custom CSS
 * Add project-specific overrides and custom styles here.
 */

/* Dark theme: black background mainly (override blue/navy) */
.dark {
  --color-gray-800: #171717;
  --color-gray-900: #000000;
  --color-gray-950: #000000;
}
.dark,
.dark body {
  background-color: #000;
}
/* Override explicit navy #151D2C used in dark utilities */
.dark [class*="151D2C"] {
  background-color: #000;
}
.dark [class*="151D2C"]::before {
  background-color: rgba(0, 0, 0, 0.9);
}
.dark [class*="from-"][class*="151D2C"] {
  --tw-gradient-from: #000;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.header-logo {
    height: 20px;
}

/* White logo: hidden in light mode (no space), visible in dark mode */
.header-logo-dark {
    display: none;
}
.dark .header-logo-dark {
    display: inline-block !important;
}

/* Page title in header: margin-left on mobile only (next to hamburger), none from lg up */
.page-title-header {
    margin-left: 1rem;
}
@media (min-width: 1024px) {
    .page-title-header {
        margin-left: 0;
    }
}

/* Company dropdown search: remove focus ring, keep border colors */
.company-dropdown-search:focus,
.company-dropdown-search:focus-visible,
.company-dropdown-search:active {
    outline: none !important;
    box-shadow: none !important;
    border-top-color: #e5e7eb !important;
    border-bottom-color: #e5e7eb !important;
}
.dark .company-dropdown-search:focus,
.dark .company-dropdown-search:focus-visible,
.dark .company-dropdown-search:active {
    border-top-color: #4b5563 !important;
    border-bottom-color: #4b5563 !important;
}

.company-switcher-dropdown {
    max-height: 80dvh;
}
.company-switcher-dropdown:not([x-cloak]) {
    display: flex;
    flex-direction: column;
}
.company-switcher-dropdown-list {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
}

/*
 * Mosaic .form-checkbox hard-codes violet for :checked and focus ring.
 * Utility classes cannot override compiled @layer rules — use explicit override.
 */
.form-checkbox {
    color: #111827;
}
.form-checkbox:checked {
    background-color: #111827 !important;
    border-color: transparent !important;
    color: #fff;
}
.form-checkbox:checked:hover,
.form-checkbox:checked:focus {
    background-color: #030712 !important;
}
.form-checkbox:focus-visible {
    --tw-ring-color: color-mix(in oklab, #111827 45%, transparent);
}
html.dark .form-checkbox:checked {
    background-color: #000 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}
html.dark .form-checkbox:checked:hover,
html.dark .form-checkbox:checked:focus {
    background-color: #171717 !important;
    border-color: #6b7280 !important;
}
html.dark .form-checkbox:focus-visible {
    --tw-ring-color: color-mix(in oklab, #fff 35%, transparent);
}

/* Radios: same dark treatment as checkboxes (Mosaic uses violet for .form-radio :checked). */
.form-radio {
    color: #111827;
}
.form-radio:checked {
    background-color: #111827 !important;
    border-color: transparent !important;
    color: #fff;
}
.form-radio:checked:hover,
.form-radio:checked:focus {
    background-color: #030712 !important;
}
.form-radio:focus-visible {
    --tw-ring-color: color-mix(in oklab, #111827 45%, transparent);
}
html.dark .form-radio:checked {
    background-color: #000 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}
html.dark .form-radio:checked:hover,
html.dark .form-radio:checked:focus {
    background-color: #171717 !important;
    border-color: #6b7280 !important;
}
html.dark .form-radio:focus-visible {
    --tw-ring-color: color-mix(in oklab, #fff 35%, transparent);
}

/*
 * Mosaic .form-switch hard-codes violet for :checked.
 * Utility classes cannot override compiled @layer rules — use explicit override.
 */
.form-switch input[type="checkbox"]:checked + label {
    background-color: #111827 !important;
}
html.dark .form-switch input[type="checkbox"]:checked + label {
    background-color: #000 !important;
}

/* Pointer cursor on buttons (native + Mosaic .btn* on <a> / <button>) */
button:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="reset"]:not(:disabled),
.btn,
.btn-sm,
.btn-xs {
    cursor: pointer;
}

/* Activate-service modal: Growth row (Mosaic build omits border-black / bg-black utilities) */
.fint-activate-plan-card {
    border-width: 2px;
    border-style: solid;
    border-color: #000;
}
html.dark .fint-activate-plan-card {
    border-color: #f3f4f6;
}

.fint-activate-plan-radio {
    box-sizing: border-box;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    border: 2px solid #000;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
html.dark .fint-activate-plan-radio {
    border-color: #f3f4f6;
    background-color: #171717;
}

.fint-activate-plan-radio-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #000;
}
html.dark .fint-activate-plan-radio-dot {
    background-color: #f3f4f6;
}

/* Stripe Elements: override browser :focus-within outline with a consistent gray ring */
#fint-card-number,
#fint-card-expiry,
#fint-card-cvc {
    outline: none;
}
#fint-card-number:focus-within,
#fint-card-expiry:focus-within,
#fint-card-cvc:focus-within {
    outline: none;
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.15);
}
html.dark #fint-card-number:focus-within,
html.dark #fint-card-expiry:focus-within,
html.dark #fint-card-cvc:focus-within {
    border-color: #9ca3af !important;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.15);
}

/* Missing base (non-prefixed) col-span utilities not generated in this Tailwind build */
.col-span-1 {
    grid-column: span 1 / span 1;
}
.col-span-2 {
    grid-column: span 2 / span 2;
}

/* Signup /services: two mutually exclusive options per service (modal has a single row above) */
#fint-signup-services-form label.signup-svc-option:not(:has(input:checked)) .fint-activate-plan-radio-dot {
    background-color: transparent !important;
}

label.signup-svc-option {
    display: block;
    width: 100%;
    cursor: pointer;
    position: relative;
}

label.signup-svc-option .fint-activate-plan-card {
    border: 1px solid rgb(229 231 235);
}

html.dark label.signup-svc-option .fint-activate-plan-card {
    border-color: rgb(55 65 81 / 0.6);
}

label.signup-svc-option:has(input:checked) .fint-activate-plan-card {
    border-color: rgb(17 24 39);
    box-shadow: 0 0 0 1px rgb(17 24 39);
}

html.dark label.signup-svc-option:has(input:checked) .fint-activate-plan-card {
    border-color: rgb(243 244 246);
    box-shadow: 0 0 0 1px rgb(243 244 246);
}

#fint-signup-services-form label.signup-svc-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/*
 * eFactura document detail: 30/70 columns from xl (1280px) up, stacked below.
 * xl ships only fixed-px widths in this Tailwind build, so define the split here.
 * gap-6 is 1.5rem, so subtract half (0.75rem) from each side to stay exact.
 */
@media (min-width: 1280px) {
    .fint-doc-detail-left {
        width: calc(30% - 0.75rem);
        flex: none;
    }
    .fint-doc-detail-right {
        width: calc(70% - 0.75rem);
    }
}

/*
 * Extrase /transactions: transaction detail slide-over.
 * Tailwind `inset-0` sets left+right to 0, so the box is forced full-width and `w-[500px]` is ignored.
 * From sm up, reset horizontal inset and lock width to 500px.
 */
@media (min-width: 640px) {
    .fint-extrase-tx-panel-shell {
        left: auto !important;
        right: 0 !important;
        width: 500px !important;
        max-width: min(500px, 100vw) !important;
    }
}

/*
 * Header notifications dropdown.
 * Tailwind max-sm:/sm: position utilities are not in the compiled mosaic style.css,
 * so mobile layout is handled here: full-width below header on narrow viewports,
 * bell-anchored dropdown from 640px up.
 */
.notifications-panel {
    position: fixed;
    z-index: 50;
    top: 4rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    margin-top: 0;
}
@media (min-width: 640px) {
    .notifications-panel {
        position: absolute;
        z-index: 10;
        top: 100%;
        right: 0;
        left: auto;
        width: 20rem;
        max-width: min(20rem, calc(100vw - 2rem));
        margin-top: 0.25rem;
    }
}

/*
 * Dashboard stat rows (Solduri, Tranzacții, service cards).
 * 2-up on mobile; vertical dividers from md up.
 */
.fint-dash-widget-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 1rem;
}

/* Dashboard stat rows — mobile: stacked + centered; lg+: inline columns */
.fint-dash-stat-row {
    display: flex;
    flex-direction: column;
}
.fint-dash-stat-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    text-align: center;
}
.fint-dash-stat-item:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}
.dark .fint-dash-stat-item:not(:last-child) {
    border-bottom-color: rgba(55, 65, 81, 0.6);
}
.fint-dash-stat-divider {
    display: none;
}
@media (min-width: 1024px) {
    .fint-dash-stat-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .fint-dash-stat-item {
        justify-content: flex-start;
        align-items: center;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        text-align: left;
        width: auto;
    }
    .fint-dash-stat-item:not(:last-child) {
        border-bottom: none;
    }
    .fint-dash-stat-divider {
        display: block;
        margin-right: 1.25rem;
    }
    .fint-dash-stat-inner {
        margin-right: 1.25rem;
    }
    .fint-dash-stat-row--equal > .fint-dash-stat-item {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }
    .fint-dash-stat-row--equal > .fint-dash-stat-item:not(:last-child) {
        border-bottom: none;
        border-right: 1px solid #e5e7eb;
    }
    .dark .fint-dash-stat-row--equal > .fint-dash-stat-item:not(:last-child) {
        border-right-color: rgba(55, 65, 81, 0.6);
    }
}

.fint-dash-chart-wrap {
    min-height: 12rem;
}
@media (min-width: 640px) {
    .fint-dash-chart-wrap {
        min-height: 16rem;
    }
}
