/*
 * The look (decision J5): white pages and blue accents in the manner of Zoho Books. A dark navy
 * top bar, a light grey sidebar whose open screen is a solid blue pill, flat bordered cards and
 * quiet table headings. Colours only: Filament's layout and behaviour are untouched. The primary
 * blue itself is Tailwind blue on the panel (AdminPanelProvider), so buttons and links follow it;
 * blue-600 keeps white text readable (docs/ui/README.md, quality floor).
 */

:root {
    --erp-navy: #21263c;
    --erp-navy-soft: #2e3450;
    --erp-blue: #2563eb;
    --erp-blue-dark: #1d4ed8;
    --erp-sidebar: #f7f8fa;
    --erp-sidebar-hover: #eceef3;
    --erp-border: #e4e7ec;
    --erp-head: #fafbfc;
    --erp-muted: #6b7280;
}

/* Page */

.fi-body {
    background-color: #fff;
}

.fi-header-heading {
    font-weight: 500;
    letter-spacing: 0;
    font-size: 1.5rem;
    line-height: 2rem;
}

.fi-breadcrumbs {
    font-size: 0.8125rem;
}

/* Top bar: dark navy, as Zoho's */

.fi-topbar {
    background-color: var(--erp-navy);
    color: #fff;
    box-shadow: none;
}

.fi-topbar .fi-logo {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0;
}

.fi-topbar .fi-icon-btn,
.fi-topbar .fi-icon-btn svg {
    color: rgb(255 255 255 / 0.8);
}

.fi-topbar .fi-icon-btn:hover {
    background-color: rgb(255 255 255 / 0.08);
}

.fi-topbar .fi-input-wrp {
    background-color: var(--erp-navy-soft);
    box-shadow: none;
    border: 1px solid rgb(255 255 255 / 0.12);
}

.fi-topbar .fi-input-wrp input,
.fi-topbar .fi-input-wrp svg {
    color: #fff;
}

.fi-topbar .fi-input-wrp input::placeholder {
    color: rgb(255 255 255 / 0.55);
}

.fi-topbar .erp-context label {
    color: rgb(255 255 255 / 0.6);
}

.fi-topbar .erp-context select {
    border-color: rgb(255 255 255 / 0.15);
    background-color: var(--erp-navy-soft);
    color: #fff;
}

/* Sidebar: light grey, the open screen a blue pill */

.fi-main-sidebar {
    background-color: var(--erp-sidebar);
    border-inline-end: 1px solid var(--erp-border);
}

.fi-sidebar-nav {
    padding-inline: 0.75rem;
    padding-block: 1rem;
    row-gap: 1rem;
}

.erp-nav-module-btn {
    font-weight: 500;
    color: #1f2937;
    border-radius: 0.375rem;
}

.erp-nav-module-btn:hover,
.fi-sidebar-item-btn:hover,
.fi-sidebar-group-btn:hover {
    background-color: var(--erp-sidebar-hover);
}

.erp-nav-module.erp-active > .erp-nav-module-btn,
.erp-nav-module.erp-active > .erp-nav-module-btn > svg {
    color: var(--erp-blue-dark);
}

.erp-nav-submodules .fi-sidebar-group-label {
    color: var(--erp-muted);
}

.fi-sidebar-item-btn {
    border-radius: 0.375rem;
}

.fi-sidebar-item-label {
    color: #1f2937;
    font-weight: 400;
}

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

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn svg {
    color: #fff;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-grouped-border-part {
    background-color: #fff;
}

.fi-sidebar-item-grouped-border-part {
    background-color: var(--gray-400);
}

/* Sidebar, compact as in Zoho Books: every module visible at once, rows close together. The list
   is the containing block of what it positions (the screen-reader module names), so nothing in it
   reaches past its scroll box and stretches the page into empty space. */

.fi-sidebar-nav {
    position: relative;
    padding-inline: 0.5rem;
    padding-block: 0.5rem;
    row-gap: 0.25rem;
}

.fi-sidebar-nav-groups.erp-nav {
    row-gap: 0.0625rem;
    margin-inline: 0;
    width: auto;
}

.erp-nav-zone {
    padding: 0.75rem 0.625rem 0.25rem;
    font-size: 0.625rem;
}

.erp-nav-module-btn {
    gap: 0.625rem;
    padding: 0.375rem 0.625rem;
}

.erp-nav-module-btn > svg {
    width: 1.125rem;
    height: 1.125rem;
}

.erp-nav-submodules {
    gap: 0;
    padding-inline-start: 1.75rem;
    margin-top: 0;
}

.erp-nav .fi-sidebar-group,
.erp-nav .fi-sidebar-group-items {
    row-gap: 0;
}

.erp-nav-submodules .fi-sidebar-group-btn {
    padding: 0.3125rem 0.5rem;
}

.erp-nav .fi-sidebar-item-btn {
    padding: 0.3125rem 0.5rem;
}

.erp-nav .fi-sidebar-item-label {
    font-size: 0.8125rem;
}

/* The + beside a screen: a new record in one click (App\Navigation\QuickCreate) */

.erp-nav .fi-sidebar-item {
    position: relative;
}

.erp-nav-create {
    position: absolute;
    inset-block: 0.1875rem;
    inset-inline-end: 0.1875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    border-radius: 0.25rem;
    color: var(--erp-blue-dark);
    background-color: #fff;
    box-shadow: 0 0 0 1px var(--erp-border);
    opacity: 0;
    transition: opacity 100ms;
}

.erp-nav .fi-sidebar-item:hover > .erp-nav-create,
.erp-nav .fi-sidebar-item.fi-active > .erp-nav-create,
.erp-nav-create:focus-visible {
    opacity: 1;
}

.erp-nav .fi-sidebar-item.fi-active > .erp-nav-create {
    color: #fff;
    background-color: var(--erp-blue-dark);
    box-shadow: none;
}

.erp-nav-create:hover {
    color: #fff;
    background-color: var(--erp-blue-dark);
}

@media (hover: none) {
    .erp-nav-create {
        opacity: 1;
    }
}

/* Tabs scroll sideways only: Filament's overflow-x makes the browser scroll them up and down too,
   and Windows then draws scroll arrows for a pixel or two of underline. */

.fi-tabs:not(.fi-vertical) {
    overflow-y: hidden;
}

/* Tables: denser rows and columns, so a register fits a laptop screen without scrolling sideways */

.fi-ta-text,
.fi-ta-icon,
.fi-ta-image {
    padding-inline: 0.5rem;
    padding-block: 0.625rem;
}

.fi-ta-header-cell {
    padding-inline: 0.5rem;
}

.fi-ta-header-cell:first-child,
.fi-ta-cell:first-child .fi-ta-text {
    padding-inline-start: 1rem;
}

/* Scroll bars: thin and light everywhere, not the thick grey Windows bars */

* {
    scrollbar-width: thin;
    scrollbar-color: #c7ccd6 transparent;
}

/* Detail pages: small grey labels over their values, rows close together (empty entries are left
   out by AppServiceProvider::configureDetailPages) */

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

.fi-in-entry-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--erp-muted);
}

.fi-section-content-ctn .fi-sc.fi-grid,
.fi-section-content .fi-grid {
    row-gap: 1rem;
}

/* Stat tiles: smaller, so the record's details come into view sooner */

.fi-wi-stats-overview-stat {
    padding: 1rem 1.25rem;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.5rem;
    line-height: 2rem;
}

/* A hub's tabs start at the left and use the full width, so none hide behind scrolling */

.fi-page-sub-navigation-tabs {
    justify-content: flex-start;
    max-width: 100%;
    margin-inline: 0;
}

/* Cards and tables: flat, with a thin border */

.fi-ta-ctn,
.fi-section:not(.fi-section-not-contained),
.fi-wi-stats-overview-stat,
.fi-fo-repeater-item {
    border-radius: 0.375rem;
    box-shadow: 0 0 0 1px var(--erp-border);
}

.fi-ta-header-cell {
    background-color: var(--erp-head);
    color: var(--erp-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-block: 0.625rem;
}

.fi-ta-header-cell .fi-ta-header-cell-sort-btn {
    text-transform: uppercase;
}

.fi-ta-row:hover {
    background-color: #f5f9ff;
}

/* Tabs: an underline, not a pill */

.fi-tabs.fi-contained,
.fi-tabs:not(.fi-vertical) {
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    border-bottom: 1px solid var(--erp-border);
    padding: 0;
    gap: 1.25rem;
}

/* Tabs inside a card start where the card's fields do, not against its border */

.fi-sc-tabs.fi-contained > .fi-tabs:not(.fi-vertical) {
    padding-inline: 1.5rem;
}

.fi-tabs:not(.fi-vertical) .fi-tabs-item {
    border-radius: 0;
    padding-inline: 0.125rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: #374151;
}

.fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active {
    background-color: transparent;
    border-bottom-color: var(--erp-blue);
}

.fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active .fi-tabs-item-label {
    color: var(--erp-blue-dark);
}

/* Buttons: a little squarer, like Zoho's */

.fi-btn {
    border-radius: 0.375rem;
}

/* Figures and headings: regular weight, as Zoho's */

.fi-wi-stats-overview-stat-value {
    font-weight: 500;
    font-size: 1.625rem;
    line-height: 2.25rem;
}

.fi-section-header-heading {
    font-weight: 500;
}

/* Sign-in: a brand panel beside the form (filament/auth/brand.blade.php), the form on a soft page. */

.fi-simple-layout:has(.erp-auth-brand) {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.07), transparent 40%),
        radial-gradient(circle at 70% 95%, rgba(224, 103, 58, 0.07), transparent 40%),
        #f8fafc;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-main-ctn {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-main {
    width: 100%;
    max-width: 26rem;
    padding: 2.5rem 2.25rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -24px rgba(15, 23, 42, 0.18);
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-header {
    align-items: flex-start;
    text-align: left;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-header .fi-logo {
    margin-bottom: 1.75rem;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-header-heading {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-simple-header-subheading {
    margin-top: 0.375rem;
    color: #64748b;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-input-wrp {
    min-height: 2.875rem;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-input-wrp:focus-within {
    background: #fff;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-input {
    padding-block: 0.75rem;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-btn {
    min-height: 2.875rem;
    border-radius: 0.75rem;
    font-weight: 600;
    background-image: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.7);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-simple-layout:has(.erp-auth-brand) .fi-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px -12px rgba(37, 99, 235, 0.8);
}

.erp-auth-brand {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 3.5rem;
    color: #fff;
    background: linear-gradient(155deg, #071a45 0%, #0d2c74 45%, #1747c2 100%);
    overflow: hidden;
}

/* Soft light on the field, and a floor of tile joints going away in perspective. */
.erp-auth-glow {
    position: absolute;
    z-index: -1;
    border-radius: 9999px;
    filter: blur(70px);
    pointer-events: none;
}

.erp-auth-glow-a {
    width: 28rem;
    height: 28rem;
    top: -8rem;
    right: -6rem;
    background: rgba(96, 165, 250, 0.45);
}

.erp-auth-glow-b {
    width: 22rem;
    height: 22rem;
    bottom: -6rem;
    left: -6rem;
    background: rgba(224, 103, 58, 0.35);
}

.erp-auth-floor {
    position: absolute;
    z-index: -1;
    left: -40%;
    right: -40%;
    bottom: -10%;
    height: 70%;
    transform: perspective(700px) rotateX(62deg);
    transform-origin: bottom center;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 64px);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
}

.erp-auth-brand-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.erp-auth-logo {
    height: 2.5rem;
    width: auto;
    max-width: 10rem;
    object-fit: contain;
    background: #fff;
    border-radius: 0.625rem;
    padding: 0.25rem;
}

.erp-auth-monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: #fff;
    color: #123c9c;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4);
}

.erp-auth-pitch {
    max-width: 34rem;
}

.erp-auth-eyebrow {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
}

.erp-auth-pitch h2 {
    font-size: clamp(2.25rem, 3.4vw, 3.25rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.125rem;
}

.erp-auth-pitch h2 span {
    background: linear-gradient(90deg, #fdba74, #f4895f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.erp-auth-pitch p {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    max-width: 28rem;
}

/* The AI line, shown when the AI module is on: a glowing tag, then what it does. */
.erp-auth-pitch p.erp-auth-ai {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.88);
}

.erp-auth-ai-tag {
    flex: none;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(90deg, #a78bfa, #f4895f);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.55);
}

/* A drawn preview in frosted glass: a bar chart rising, and two notes floating beside it. */
.erp-auth-preview {
    position: relative;
    margin-top: 2.75rem;
    height: 13rem;
    max-width: 30rem;
}

.erp-auth-card {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.erp-auth-card-main {
    left: 0;
    top: 0;
    width: 19rem;
    padding: 1.125rem 1.25rem 1.25rem;
    border-radius: 1rem;
}

.erp-auth-card-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.875rem;
}

.erp-auth-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    height: 6.5rem;
}

.erp-auth-bars i {
    flex: 1;
    border-radius: 0.3rem 0.3rem 0.1rem 0.1rem;
    background: linear-gradient(to top, rgba(147, 197, 253, 0.55), rgba(255, 255, 255, 0.95));
}

.erp-auth-bars i:last-child {
    background: linear-gradient(to top, #f4895f, #fdba74);
}

.erp-auth-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.erp-auth-chip-a {
    left: 16.5rem;
    top: 3rem;
}

.erp-auth-chip-b {
    left: 13rem;
    top: 9.5rem;
}

.erp-auth-preview-ai {
    height: 15.5rem;
}

.erp-auth-chip-c {
    left: 2rem;
    top: 12.5rem;
}

.erp-auth-spark {
    color: #c4b5fd;
    text-shadow: 0 0 10px rgba(196, 181, 253, 0.9);
}

.erp-auth-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.erp-auth-dot-green {
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
}

.erp-auth-dot-amber {
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

.erp-auth-foot {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.erp-auth-mobile-head {
    display: none;
}

@media (max-width: 64rem) {
    .fi-simple-layout:has(.erp-auth-brand) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .erp-auth-brand {
        display: none;
    }

    .erp-auth-mobile-head {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: 1rem 1.25rem;
        color: #fff;
        font-weight: 600;
        background: linear-gradient(155deg, #071a45, #1747c2);
    }

    .fi-simple-layout:has(.erp-auth-brand) .fi-simple-main-ctn {
        grid-column: 1;
        grid-row: 2;
        padding: 1.5rem 1rem;
    }

    .fi-simple-layout:has(.erp-auth-brand) .fi-simple-main {
        padding: 2rem 1.5rem;
    }
}

/* The wordmark: the first word in brand blue (white on the navy top bar), the rest in terracotta. */
.erp-wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3em;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.erp-wordmark-a {
    color: var(--erp-blue-dark);
}

.erp-wordmark-b {
    color: #e0673a;
    font-weight: 600;
}

.fi-topbar .erp-wordmark {
    font-size: 1.25rem;
}

.fi-topbar .erp-wordmark-a {
    color: #fff;
}

.fi-topbar .erp-wordmark-b {
    color: #f4895f;
}

/* The dashboard's AI question box: one line, tagged AI, opening Ask with the question. */
.erp-ask-box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.5rem 0.5rem 0.875rem;
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 0.875rem;
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.12), rgba(244, 137, 95, 0.08));
    box-shadow: 0 6px 18px -12px rgba(124, 58, 237, 0.5);
}

.erp-ask-box-tag {
    flex: none;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(90deg, #8b5cf6, #f4895f);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.erp-ask-box-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 0.9375rem;
    color: inherit;
}

.erp-ask-box-input:focus {
    outline: none;
    box-shadow: none;
}

.erp-ask-box-btn {
    flex: none;
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    background: #7c3aed;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
}

.erp-ask-box-btn:hover {
    background: #6d28d9;
}

/* "Powered by" at the foot of every page and under the sign-in form. */
.erp-powered-by {
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.erp-powered-by a {
    color: var(--gray-600);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.erp-powered-by a:hover {
    color: var(--primary-600);
}

.dark .erp-powered-by a {
    color: var(--gray-300);
}

.fi-simple-page .erp-powered-by {
    padding: 0;
    margin-top: -0.25rem;
}
