/* Dark navy sidebar, white content — layout inspired by the reference dashboard,
   kept strictly within the blue/white palette (no orange/other accents). */

.fi-sidebar {
    background-color: #0f2a4a;
    border-inline-end-color: #0f2a4a;
}

.fi-sidebar-header {
    background-color: #0f2a4a;
    border-color: rgba(255, 255, 255, 0.08);
}

.fi-sidebar-nav {
    background-color: #0f2a4a;
}

.fi-sidebar-group-label,
.fi-sidebar-item-label {
    color: rgba(255, 255, 255, 0.85);
}

/* Default (unselected) icon — blue, not yellow */
.fi-sidebar-item-icon {
    color: #5b9bd5 !important;
}

.fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.fi-sidebar-item-btn:hover .fi-sidebar-item-label {
    color: #ffffff;
}

.fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
    color: #f0b429 !important;
}

/* Selected item — solid, high-contrast highlight with a yellow icon */
.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background-color: #1e56a0 !important;
}

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

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #f0b429 !important;
}

/* Group headers styled as pill-shaped buttons rather than bare text rows,
   stacked with breathing room so the collapsed sidebar reads as a clean
   button list (see .max-erp-login-pill for the same "pill button" idiom
   used on the login page, for visual consistency across the app). */
.fi-sidebar-group {
    margin: 0 10px 6px;
}

.fi-sidebar-group-btn {
    color: rgba(255, 255, 255, 0.92);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.fi-sidebar-group-btn:hover {
    background-color: rgba(91, 155, 213, 0.16);
    border-color: rgba(91, 155, 213, 0.35);
    transform: translateX(2px);
}

.fi-sidebar-group-label {
    font-size: 13.5px;
    letter-spacing: 0.02em;
}

.fi-sidebar-group-collapse-btn {
    color: rgba(255, 255, 255, 0.55);
    transition: transform 0.15s ease, color 0.15s ease;
}

.fi-sidebar-group-btn:hover .fi-sidebar-group-collapse-btn {
    color: #f0b429;
}

/* Group currently containing the active page — accent left edge + brighter fill */
.fi-sidebar-group.fi-active > .fi-sidebar-group-btn {
    background-color: rgba(30, 86, 160, 0.35);
    border-color: rgba(30, 86, 160, 0.6);
    box-shadow: inset 3px 0 0 #f0b429;
}

.fi-sidebar-group-items {
    margin-top: 4px;
    padding-left: 2px;
}

/* Dashboard "quick actions" shortcut buttons (New Invoice / New Project) */
.max-erp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.max-erp-quick-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 240px;
    padding: 18px 22px;
    border-radius: 16px;
    text-decoration: none !important;
    color: #ffffff;
    background: linear-gradient(135deg, #1e56a0 0%, #0f2a4a 100%);
    box-shadow: 0 8px 20px rgba(15, 42, 74, 0.25);
    transform: translateY(0) scale(1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.max-erp-quick-action-btn--project {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
}

.max-erp-quick-action-btn:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 14px 30px rgba(15, 42, 74, 0.32);
    filter: brightness(1.06);
}

/* Click/tap feedback — a quick press-down "squash" plus a brief radial
   flash from the click point, reset instantly on release/tap-away. */
.max-erp-quick-action-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 10px rgba(15, 42, 74, 0.28);
    transition-duration: 0.06s;
}

.max-erp-quick-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.max-erp-quick-action-btn:active::after {
    opacity: 0.35;
    transform: scale(1);
    transition: opacity 0s, transform 0s;
}

.max-erp-quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.max-erp-quick-action-icon svg {
    width: 24px;
    height: 24px;
}

.max-erp-quick-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.max-erp-quick-action-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.max-erp-quick-action-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

/* Highlighted dark stat card (the "hero" tile, e.g. top-left in the reference) */
.fi-max-erp-stat-highlight {
    background-color: #0f2a4a !important;
    border-radius: 0.75rem;
}

.fi-max-erp-stat-highlight .fi-wi-stats-overview-stat-label,
.fi-max-erp-stat-highlight .fi-wi-stats-overview-stat-value,
.fi-max-erp-stat-highlight .fi-wi-stats-overview-stat-description {
    color: #ffffff !important;
}

.fi-max-erp-stat-highlight .fi-wi-stats-overview-stat-icon {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Sidebar / topbar brand logo (image mark cropped to the circle + wordmark).
   Text color is set per-context below since the same markup renders inside
   both the dark sidebar header and the light mobile topbar. */
.max-erp-brand-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 100%;
}

.max-erp-brand-logo img {
    height: 30px;
    width: 36px;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    flex-shrink: 0;
}

.max-erp-brand-logo-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.fi-sidebar-header .max-erp-brand-logo-name {
    color: #ffffff;
}

.fi-topbar .max-erp-brand-logo-name {
    color: #0f2a4a;
}

/* ---------------------------------------------------------------------
   Login page — floating rounded card on a blue gradient backdrop.
   Inline styles aren't practical for hover/media-query rules, so this
   part of the login markup relies on this stylesheet instead — the
   base structural layout is duplicated inline in login-page.blade.php
   as a fallback in case this file fails to load.
   --------------------------------------------------------------------- */

body:has(.max-erp-login) {
    margin: 0;
    background: linear-gradient(135deg, #4f6ef7 0%, #6c8cf9 50%, #8fa8ff 100%);
}

.max-erp-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 16px;
    font-family: var(--font-family, inherit);
}

.max-erp-login-box {
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 26, 74, 0.3);
}

.max-erp-login-form-panel {
    flex: 1 1 54%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(160deg, #1e3a8a 0%, #16305e 100%);
    padding: 40px 40px 28px;
    position: relative;
    overflow: hidden;
}

.max-erp-login-form-panel::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -70px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.max-erp-login-form-panel::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.max-erp-login-form-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 360px;
    margin: 0 auto;
    padding: 12px 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.max-erp-login-heading {
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.2;
}

.max-erp-login-subheading {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 28px;
}

.max-erp-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fca5a5;
    font-size: 13px;
    margin: 0 0 16px;
}

.max-erp-login-error svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.max-erp-login-forgot {
    display: block;
    text-align: right;
    margin-top: -8px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.max-erp-login-forgot:hover {
    color: #bfd6ff !important;
}

.max-erp-login-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
}

.max-erp-login-form-panel label,
.max-erp-login-form-panel .fi-fo-field-label-content {
    color: #ffffff !important;
}

.max-erp-login-form-panel input {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.max-erp-login-form-panel input::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.max-erp-login-form-panel .fi-input-wrp {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.max-erp-login-form-panel .fi-input-wrp-suffix svg,
.max-erp-login-form-panel svg.fi-icon {
    color: rgba(255, 255, 255, 0.45) !important;
}

.max-erp-login-form-panel .fi-checkbox-input {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.max-erp-login-form-panel .fi-btn {
    border-radius: 10px;
    font-weight: 700;
    background-color: #1e3a8a !important;
    transition: background-color 0.2s, transform 0.1s;
}

.max-erp-login-form-panel .fi-btn:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-1px);
}

.max-erp-login-brand-panel {
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    padding: 40px 32px;
    text-align: center;
}

.max-erp-login-logo-box {
    display: block;
    width: 170px;
    background: #ffffff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(15, 42, 74, 0.1);
    margin: 0 auto 22px;
}

.max-erp-login-logo-img {
    width: 100%;
    height: auto;
    display: block;
}

.max-erp-login-monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 100%;
    border-radius: 12px;
    background: linear-gradient(150deg, #1e56a0 0%, #0f2a4a 100%);
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
}

.max-erp-login-brand-name {
    color: #1e3a8a;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.25;
}

.max-erp-login-tagline {
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 24px;
}

.max-erp-login-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 999px;
    margin-bottom: 10px;
    text-decoration: none !important;
    transition: box-shadow 0.2s;
}

.max-erp-login-pill:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.max-erp-login-pill svg {
    height: 14px;
    width: 14px;
    color: #4c6ef5;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .max-erp-login-box {
        flex-direction: column;
        max-width: 460px;
        min-height: 0;
    }

    .max-erp-login-brand-panel {
        display: none;
    }

    .max-erp-login-form-panel {
        padding: 32px 24px 24px;
    }

    .max-erp-login-heading {
        font-size: 26px;
    }
}
