/* ================================================================
   NUIP Admin — Custom Filament 4 Theme
   Elegant, professional form styling for the Project Dashboard
   ================================================================ */

/* ─── Font import ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── CSS Variables (accent palette) ─── */
:root {
    --nuip-blue:    #3b82f6;
    --nuip-violet:  #8b5cf6;
    --nuip-indigo:  #6366f1;
    --nuip-slate:   #64748b;
    --nuip-emerald: #10b981;
    --nuip-amber:   #f59e0b;
    --nuip-red:     #ef4444;
    --nuip-orange:  #f97316;
    --nuip-teal:    #14b8a6;
    --nuip-shadow:  0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --nuip-shadow-hover: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --nuip-radius:  0.75rem;
}

/* ================================================================
   TABS — cleaner pill-style active indicator
   ================================================================ */

/* Tab list container */
.fi-tabs {
    border-bottom: 2px solid rgb(229 231 235) !important;
    padding-bottom: 0 !important;
    gap: 0.25rem !important;
    overflow-x: auto;
}

.dark .fi-tabs {
    border-bottom-color: rgb(55 65 81) !important;
}

/* Individual tab button */
.fi-tabs-tab {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    padding: 0.625rem 1rem !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease !important;
    white-space: nowrap;
}

.fi-tabs-tab:not([aria-selected="true"]) {
    color: rgb(107 114 128) !important;
}

.fi-tabs-tab:not([aria-selected="true"]):hover {
    background-color: rgb(249 250 251) !important;
    color: rgb(55 65 81) !important;
}

.dark .fi-tabs-tab:not([aria-selected="true"]):hover {
    background-color: rgb(31 41 55) !important;
    color: rgb(209 213 219) !important;
}

/* Active tab — primary colored bottom border */
.fi-tabs-tab[aria-selected="true"] {
    font-weight: 600 !important;
    border-bottom-color: currentColor !important;
    background-color: transparent !important;
}

/* Tab icons */
.fi-tabs-tab svg {
    width: 1rem !important;
    height: 1rem !important;
    opacity: 0.8;
}

.fi-tabs-tab[aria-selected="true"] svg {
    opacity: 1;
}

/* ================================================================
   SECTIONS — card styling with elevation + left accent
   ================================================================ */

.fi-section {
    border-radius: var(--nuip-radius) !important;
    box-shadow: var(--nuip-shadow) !important;
    border: 1px solid rgb(229 231 235) !important;
    transition: box-shadow 0.2s ease !important;
    margin-bottom: 1rem;
    overflow: visible !important;
    position: relative;
}

.fi-section:hover {
    box-shadow: var(--nuip-shadow-hover) !important;
}

.dark .fi-section {
    border-color: rgb(55 65 81) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

.dark .fi-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

/* ─── Section Header ─── */
.fi-section-header {
    padding: 0.875rem 1.25rem !important;
    background: rgb(249 250 251) !important;
    border-bottom: 1px solid rgb(243 244 246) !important;
    border-radius: var(--nuip-radius) var(--nuip-radius) 0 0 !important;
}

.dark .fi-section-header {
    background: rgb(17 24 39) !important;
    border-bottom-color: rgb(55 65 81) !important;
}

.fi-section-header-heading {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.4 !important;
}

.fi-section-header-description {
    font-size: 0.72rem !important;
    margin-top: 0.15rem !important;
    line-height: 1.5 !important;
    color: rgb(107 114 128) !important;
}

.dark .fi-section-header-description {
    color: rgb(156 163 175) !important;
}

/* ─── Section Content ─── */
.fi-section-content-ctn,
.fi-section-content {
    padding: 1.25rem !important;
}

/* ─── Section collapse button ─── */
.fi-section-header-collapse-button {
    color: rgb(156 163 175) !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
}

.fi-section-header-collapse-button:hover {
    color: rgb(75 85 99) !important;
}

/* ─── Sidebar collapse/expand buttons ─── */
.fi-sidebar-collapse-button,
.fi-sidebar-expand-button {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.fi-sidebar-collapse-button svg,
.fi-sidebar-expand-button svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* ================================================================
   LEFT-ACCENT COLORS — box-shadow inset trick (respects border-radius)
   ================================================================ */

/* Blueprint Blue — Core identity, key dates, EVM, QA, Schedule, Documents */
.nuip-accent-blue {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-blue) !important;
}
.nuip-accent-blue:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-blue) !important;
}
.dark .nuip-accent-blue {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-blue) !important;
}

/* Violet — Status & Admin, Consultants */
.nuip-accent-violet {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-violet) !important;
}
.nuip-accent-violet:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-violet) !important;
}
.dark .nuip-accent-violet {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-violet) !important;
}

/* Indigo — Project Scope */
.nuip-accent-indigo {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-indigo) !important;
}
.nuip-accent-indigo:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-indigo) !important;
}
.dark .nuip-accent-indigo {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-indigo) !important;
}

/* Slate — Codes & References */
.nuip-accent-slate {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-slate) !important;
}
.nuip-accent-slate:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-slate) !important;
}
.dark .nuip-accent-slate {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-slate) !important;
}

/* Emerald — DLP, Financial, Milestones */
.nuip-accent-emerald {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-emerald) !important;
}
.nuip-accent-emerald:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-emerald) !important;
}
.dark .nuip-accent-emerald {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-emerald) !important;
}

/* Amber — Developer, Duration, Manpower */
.nuip-accent-amber {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-amber) !important;
}
.nuip-accent-amber:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-amber) !important;
}
.dark .nuip-accent-amber {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-amber) !important;
}

/* Red — Contractor, HSE Indicator */
.nuip-accent-red {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-red) !important;
}
.nuip-accent-red:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-red) !important;
}
.dark .nuip-accent-red {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-red) !important;
}

/* Orange — Incident Tracker */
.nuip-accent-orange {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-orange) !important;
}
.nuip-accent-orange:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-orange) !important;
}
.dark .nuip-accent-orange {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-orange) !important;
}

/* Teal — QA & Compliance */
.nuip-accent-teal {
    box-shadow: var(--nuip-shadow), inset 4px 0 0 0 var(--nuip-teal) !important;
}
.nuip-accent-teal:hover {
    box-shadow: var(--nuip-shadow-hover), inset 4px 0 0 0 var(--nuip-teal) !important;
}
.dark .nuip-accent-teal {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 4px 0 0 0 var(--nuip-teal) !important;
}

/* ================================================================
   FORM FIELDS — label, input, helper text polish
   ================================================================ */

/* Field labels — slightly smaller, upper-weight */
.fi-fo-field-wrp > label,
.fi-fo-field-wrp-label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

/* Required asterisk */
.fi-fo-field-wrp > label sup,
.fi-fo-field-wrp-label sup {
    color: var(--nuip-red) !important;
    font-size: 0.65rem !important;
    margin-left: 0.1rem;
}

/* Helper / hint text — muted, smaller */
.fi-fo-hint-wrapper p,
.fi-fo-field-wrp-hint {
    font-size: 0.7rem !important;
    opacity: 0.7 !important;
    margin-top: 0.2rem !important;
    line-height: 1.4 !important;
    font-style: italic;
}

/* Input, Select, Textarea borders — rounder */
.fi-input,
.fi-select-input {
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.fi-input:focus,
.fi-select-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.fi-textarea {
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
}

/* Placeholder italic style */
.fi-input::placeholder,
.fi-textarea::placeholder {
    font-style: italic;
    opacity: 0.55;
    font-size: 0.8125rem;
}

/* ─── OMR prefix badges ─── */
.fi-input-wrapper-prefix {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    color: rgb(107 114 128) !important;
    background: rgb(249 250 251) !important;
    border-right: 1px solid rgb(209 213 219) !important;
    padding: 0 0.625rem !important;
}

.dark .fi-input-wrapper-prefix {
    background: rgb(31 41 55) !important;
    border-right-color: rgb(55 65 81) !important;
    color: rgb(156 163 175) !important;
}

/* ─── Disabled inputs — clearly muted ─── */
.fi-input:disabled,
.fi-select-input:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgb(249 250 251) !important;
}

.dark .fi-input:disabled,
.dark .fi-select-input:disabled {
    background: rgb(31 41 55) !important;
}

/* ================================================================
   PLACEHOLDER COMPONENTS (auto-calculated display values)
   ================================================================ */

.fi-fo-placeholder {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(17 24 39);
    padding: 0.5rem 0;
}

.dark .fi-fo-placeholder {
    color: rgb(243 244 246);
}

/* ================================================================
   REPEATER — cleaner item cards
   ================================================================ */

.fi-fo-repeater-item {
    border-radius: 0.625rem !important;
    border: 1px solid rgb(229 231 235) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    transition: box-shadow 0.15s ease !important;
}

.fi-fo-repeater-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
}

.dark .fi-fo-repeater-item {
    border-color: rgb(55 65 81) !important;
}

/* ================================================================
   DATE PICKER — consistent rounding
   ================================================================ */

.fi-date-picker-input {
    border-radius: 0.5rem !important;
}

/* ================================================================
   SELECT DROPDOWN — consistent styling
   ================================================================ */

.fi-select-option {
    font-size: 0.8125rem !important;
}

/* ================================================================
   GRID GAPS — consistent spacing between fields
   ================================================================ */

.fi-fo-grid {
    gap: 1rem !important;
}

/* ================================================================
   FORM PAGE HEADER — page title area
   ================================================================ */

.fi-header-heading {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

/* ================================================================
   BREADCRUMBS — subtle & compact
   ================================================================ */

.fi-breadcrumbs {
    font-size: 0.75rem !important;
}

/* ================================================================
   SAVE / ACTION BUTTONS — slightly more rounded
   ================================================================ */

.fi-btn {
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    letter-spacing: 0.01em;
    transition: all 0.15s ease !important;
}

.fi-btn-primary {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
}

.fi-btn-primary:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.18) !important;
    transform: translateY(-1px);
}

.fi-btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12) !important;
}

/* ================================================================
   TABS PANEL CONTENT — give space above first section
   ================================================================ */

.fi-tabs-content {
    padding-top: 1.25rem !important;
}

/* ================================================================
   DARK MODE BODY — ensure smooth dark bg
   ================================================================ */

.dark .fi-main {
    background: rgb(9 9 11) !important;
}

/* ================================================================
   SIDEBAR + ACCORDION UX — project edit page layout
   ================================================================ */

/* Hide native Filament tab bar on edit-project page only */
.fi-resource-edit-record-page .fi-tabs-list {
    display: none !important;
}

/* Main sidebar + content flex layout */
.nuip-edit-layout {
    display: flex;
    gap: 1.5rem;
}

.nuip-sidebar {
    width: 15rem;
    flex-shrink: 0;
    padding: 1rem 0;
}

/* Sidebar section */
.nuip-sidebar-section {
    margin-bottom: 1rem;
}

.nuip-sidebar-section-header {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    user-select: none;
}

.nuip-sidebar-section-header:hover {
    background-color: rgb(243 244 246);
}

.dark .nuip-sidebar-section-header:hover {
    background-color: rgb(31 41 55);
}

.nuip-sidebar-section.is-open .nuip-sidebar-section-header {
    font-weight: 700;
}

/* Sidebar section content */
.nuip-sidebar-section-content {
    padding-left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Individual sidebar item */
.nuip-sidebar-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: rgb(55 65 81);
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.dark .nuip-sidebar-item {
    color: rgb(209 213 219);
}

.nuip-sidebar-item:hover {
    background-color: rgb(243 244 246);
}

.dark .nuip-sidebar-item:hover {
    background-color: rgb(31 41 55);
}

.nuip-sidebar-item.is-active {
    background-color: rgb(219 234 254);
    color: rgb(29 78 216);
    font-weight: 600;
    border-left-color: currentColor;
}

.dark .nuip-sidebar-item.is-active {
    background-color: rgb(30 58 138);
    color: rgb(147 197 253);
}

/* Content area wrapper */
.nuip-content-area {
    flex: 1;
    min-width: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nuip-edit-layout {
        flex-direction: column;
    }

    .nuip-sidebar {
        width: 100%;
    }

    /* On mobile, sidebar becomes a dropdown */
    .nuip-sidebar-section-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nuip-sidebar-section.is-open .nuip-sidebar-section-content {
        max-height: 500px;
    }
}

/* Fix form area in sidebar layout */
.fi-resource-edit-record-page .fi-tabs-content {
    padding-top: 0 !important;
}

/* Ensure relation managers have proper spacing */
[x-cloak] {
    display: none !important;
}

/* ================================================================
   DASHBOARD — KPI Cards, Budget Widget, Project Cards
   ================================================================ */

/* KPI row — override stat card compact sizing */
.fi-wi-stats-overview-stat {
    padding: 1rem !important;
}

/* Budget widget 4-column grid */
.nuip-budget-widget-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 1024px) {
    .nuip-budget-widget-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .nuip-budget-widget-grid { grid-template-columns: 1fr; }
}

/* Metric sub-cards */
.nuip-metric-card {
    background: white;
    border-radius: var(--nuip-radius);
    padding: 1.25rem;
    border: 1px solid rgb(229 231 235);
    box-shadow: var(--nuip-shadow);
}
.dark .nuip-metric-card {
    background: rgb(17 24 39);
    border-color: rgb(55 65 81);
}

.nuip-metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    margin-bottom: 0.5rem;
}
.nuip-metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: rgb(17 24 39);
    margin-bottom: 0.5rem;
}
.dark .nuip-metric-value { color: rgb(243 244 246); }

.nuip-metric-sub {
    font-size: 0.75rem;
    color: rgb(107 114 128);
    margin-top: 0.375rem;
}

/* Progress bars */
.nuip-progress-bar-track {
    height: 6px;
    background: rgb(229 231 235);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}
.nuip-progress-track--lg { height: 10px; }
.nuip-progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}
.nuip-progress-blue    { background: var(--nuip-blue); }
.nuip-progress-emerald { background: var(--nuip-emerald); }
.nuip-progress-teal    { background: var(--nuip-teal); }
.nuip-progress-amber   { background: var(--nuip-amber); }
.nuip-progress-red     { background: var(--nuip-red); }

/* Alert banner */
.nuip-alert-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.75rem;
}
.nuip-alert-banner svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.nuip-alert-banner--warning {
    background: rgb(254 243 199);
    color: rgb(146 64 14);
    border: 1px solid rgb(252 211 77);
}
.dark .nuip-alert-banner--warning {
    background: rgb(78 42 5);
    color: rgb(253 230 138);
    border-color: rgb(146 64 14);
}

/* Budget amounts */
.nuip-budget-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.nuip-amount-blue   { color: var(--nuip-blue); }
.nuip-amount-green  { color: var(--nuip-emerald); }
.nuip-amount-orange { color: var(--nuip-orange); }
.nuip-amount-sep    { color: rgb(156 163 175); }

/* SPI value colors */
.nuip-spi-value { font-size: 2.5rem; font-weight: 800; }
.nuip-spi--green { color: var(--nuip-emerald); }
.nuip-spi--amber { color: var(--nuip-amber); }
.nuip-spi--red   { color: var(--nuip-red); }

/* Financial strip */
.nuip-financial-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    background: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: var(--nuip-radius);
    padding: 0.75rem 1.25rem;
    margin-top: 0.25rem;
}
.dark .nuip-financial-strip {
    background: rgb(17 24 39);
    border-color: rgb(55 65 81);
}
.nuip-strip-item {
    display: flex;
    flex-direction: column;
    padding: 0.375rem 1.25rem;
    flex: 1;
    min-width: 160px;
}
.nuip-strip-divider {
    width: 1px;
    height: 2.5rem;
    background: rgb(229 231 235);
}
.dark .nuip-strip-divider { background: rgb(55 65 81); }
.nuip-strip-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    font-weight: 600;
}
.nuip-strip-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: rgb(17 24 39);
    margin-top: 0.125rem;
}
.dark .nuip-strip-value { color: rgb(243 244 246); }
.nuip-strip-blue   { color: var(--nuip-blue) !important; }
.nuip-strip-green  { color: var(--nuip-emerald) !important; }
.nuip-strip-orange { color: var(--nuip-orange) !important; }

/* Active Projects Widget header */
.nuip-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.nuip-widget-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.nuip-widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgb(17 24 39);
}
.dark .nuip-widget-title { color: rgb(243 244 246); }

/* View toggle */
.nuip-view-toggle {
    display: flex;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    overflow: hidden;
}
.dark .nuip-view-toggle { border-color: rgb(55 65 81); }
.nuip-toggle-btn {
    padding: 0.375rem 0.625rem;
    background: white;
    color: rgb(107 114 128);
    cursor: pointer;
    transition: all 0.15s ease;
}
.dark .nuip-toggle-btn { background: rgb(17 24 39); color: rgb(156 163 175); }
.nuip-toggle-btn--active {
    background: var(--nuip-blue);
    color: white;
}

/* Tighten vertical gap between Active Projects widget and KPI row */
.fi-page-dashboard .fi-widgets {
    row-gap: 0.75rem !important;
}

/* Project cards grid */
.nuip-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (max-width: 1024px) { .nuip-projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .nuip-projects-grid { grid-template-columns: 1fr; } }
@media (min-width: 1536px) { .nuip-projects-grid { grid-template-columns: repeat(3, 1fr); } }

.nuip-projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Project card */
.nuip-project-card {
    background: white;
    border: 1px solid rgb(229 231 235);
    border-radius: var(--nuip-radius);
    padding: 1rem;
    box-shadow: var(--nuip-shadow);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.dark .nuip-project-card {
    background: rgb(17 24 39);
    border-color: rgb(55 65 81);
}
.nuip-project-card:hover {
    box-shadow: var(--nuip-shadow-hover);
    transform: translateY(-1px);
}

.nuip-project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.nuip-badge-group {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nuip-project-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(17 24 39);
    line-height: 1.4;
    flex: 1;
}
.dark .nuip-project-title { color: rgb(243 244 246); }

.nuip-project-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.nuip-project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgb(107 114 128);
}
.nuip-project-meta-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.nuip-project-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgb(107 114 128);
    margin-bottom: 0.25rem;
}

.nuip-project-card-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(243 244 246);
}
.dark .nuip-project-card-footer { border-top-color: rgb(55 65 81); }
.nuip-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--nuip-blue);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.nuip-card-link svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.nuip-card-link:hover { opacity: 0.75; }

/* Badges */
.nuip-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.nuip-badge--info   { background: rgb(219 234 254); color: rgb(29 78 216); }
.nuip-badge--slate  { background: rgb(241 245 249); color: rgb(51 65 85); }
.dark .nuip-badge--info  { background: rgb(30 58 138); color: rgb(147 197 253); }
.dark .nuip-badge--slate { background: rgb(30 41 59); color: rgb(148 163 184); }

.nuip-empty-state {
    padding: 2rem;
    text-align: center;
    color: rgb(107 114 128);
    font-size: 0.875rem;
}

/* ================================================================
   DASHBOARD — Premium Ambient Gradient Background + Animations
   ================================================================ */

/* ─── Keyframes ─── */
@keyframes nuip-orb-a {
    0%, 100% { transform: translate(0px, 0px) scale(1); opacity: 1; }
    25%       { transform: translate(60px, -40px) scale(1.08); opacity: 0.85; }
    50%       { transform: translate(20px, 50px) scale(0.95); opacity: 1; }
    75%       { transform: translate(-40px, -20px) scale(1.04); opacity: 0.9; }
}
@keyframes nuip-orb-b {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    33%       { transform: translate(-70px, 40px) scale(1.06); }
    66%       { transform: translate(50px, -60px) scale(0.94); }
}
@keyframes nuip-orb-c {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    50%       { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes nuip-orb-d {
    0%, 100% { transform: translate(0px, 0px) scale(1); }
    40%       { transform: translate(-30px, -50px) scale(1.05); }
    80%       { transform: translate(60px, 20px) scale(0.96); }
}
@keyframes nuip-widget-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nuip-bg-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.88; }
}

/* ─── Base: premium clean cool-white ─── */
.fi-layout {
    position: relative;
    min-height: 100vh;
    background-color: #f4f7fc !important;
    /* Layered ambient light pools — amber (brand), indigo, sky, emerald */
    background-image:
        radial-gradient(ellipse 90% 55% at 88% -8%,  rgba(251, 191, 36, 0.22)  0%, transparent 58%),
        radial-gradient(ellipse 70% 60% at -5% 105%, rgba(99,  102, 241, 0.16)  0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 50% -5%,  rgba(147, 197, 253, 0.18) 0%, transparent 52%),
        radial-gradient(ellipse 45% 55% at 100% 90%, rgba(16,  185, 129, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 0%   50%, rgba(251, 191, 36, 0.08)  0%, transparent 50%)
        !important;
    animation: nuip-bg-pulse 12s ease-in-out infinite !important;
}

/* ─── Orb 1 — large warm amber, top-right ─── */
.fi-layout::before {
    content: '';
    position: fixed;
    width: 700px;
    height: 700px;
    top: -200px;
    right: -180px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
    background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, rgba(245, 158, 11, 0.14) 45%, transparent 70%);
    animation: nuip-orb-a 20s ease-in-out infinite;
}

/* ─── Orb 2 — deep indigo, bottom-left ─── */
.fi-layout::after {
    content: '';
    position: fixed;
    width: 750px;
    height: 750px;
    bottom: -220px;
    left: -180px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(110px);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.20) 0%, rgba(139, 92, 246, 0.10) 45%, transparent 70%);
    animation: nuip-orb-b 26s ease-in-out infinite;
}

/* ─── Orb 3 — sky blue, top-center ─── */
.fi-main-ctn::before {
    content: '';
    position: fixed;
    width: 580px;
    height: 580px;
    top: -100px;
    left: 30%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(95px);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(99, 179, 237, 0.08) 50%, transparent 70%);
    animation: nuip-orb-c 32s ease-in-out infinite;
}

/* ─── Orb 4 — emerald, center-right ─── */
.fi-main-ctn::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    top: 45%;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.07) 50%, transparent 70%);
    animation: nuip-orb-d 22s ease-in-out infinite;
}

/* ─── Main content above orbs ─── */
.fi-main-ctn {
    position: relative;
    z-index: 1;
}

/* ─── Widget entrance animation (staggered cascade) ─── */
.fi-wi-stats-overview,
.fi-wi-chart,
.fi-wi-table,
.fi-wi-account {
    animation: nuip-widget-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fi-widgets > *:nth-child(1)  { animation-delay: 0.04s; }
.fi-widgets > *:nth-child(2)  { animation-delay: 0.11s; }
.fi-widgets > *:nth-child(3)  { animation-delay: 0.18s; }
.fi-widgets > *:nth-child(4)  { animation-delay: 0.25s; }
.fi-widgets > *:nth-child(5)  { animation-delay: 0.32s; }
.fi-widgets > *:nth-child(6)  { animation-delay: 0.39s; }
.fi-widgets > *:nth-child(7)  { animation-delay: 0.46s; }

/* ─── Widget cards: frosted glass on top of gradient ─── */
.fi-wi-stats-overview,
.fi-wi-chart,
.fi-wi-table {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(14px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 4px 24px rgba(99, 102, 241, 0.06),
        0 1px 6px rgba(0, 0, 0, 0.05) !important;
    border-radius: var(--nuip-radius) !important;
}

/* ─── Stat cards: lighter glass ─── */
.fi-wi-stats-overview-stat {
    background: rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 0.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* ─── Dark mode ─── */
.dark .fi-layout {
    background-color: #0b0f1a !important;
    background-image:
        radial-gradient(ellipse 80% 55% at 88% -8%,  rgba(251, 191, 36, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 65% 55% at -5% 105%, rgba(99,  102, 241, 0.12) 0%, transparent 58%),
        radial-gradient(ellipse 50% 40% at 50% -5%,  rgba(56,  189, 248, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 45% 50% at 100% 90%, rgba(16,  185, 129, 0.08) 0%, transparent 55%)
        !important;
    animation: nuip-bg-pulse 12s ease-in-out infinite !important;
}
.dark .fi-layout::before {
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, rgba(245,158,11,0.07) 45%, transparent 70%);
}
.dark .fi-layout::after {
    background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, rgba(139,92,246,0.07) 45%, transparent 70%);
}
.dark .fi-wi-stats-overview,
.dark .fi-wi-chart,
.dark .fi-wi-table {
    background: rgba(15, 23, 42, 0.80) !important;
    backdrop-filter: blur(14px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.04) inset !important;
}
.dark .fi-wi-stats-overview-stat {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ─────────────────────────────────────────────────
   Key Dates section — elevated date cards
   ───────────────────────────────────────────────── */
.nuip-key-dates .fi-section-content {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border-radius: 0.75rem;
    padding: 1.25rem !important;
}

.nuip-key-dates .fi-fo-field-wrp {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nuip-key-dates .fi-fo-field-wrp:hover {
    border-color: var(--nuip-blue, #3b82f6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.nuip-key-dates .fi-fo-field-wrp:focus-within {
    border-color: var(--nuip-blue, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.nuip-key-dates label {
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569 !important;
}

.nuip-key-dates .fi-input,
.nuip-key-dates input[type="text"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: #0f172a !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
}

.nuip-key-dates .fi-input-wrp {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.nuip-key-dates .fi-fo-field-wrp-helper-text {
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    margin-top: 0.35rem !important;
}

/* Dark mode */
.dark .nuip-key-dates .fi-section-content {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
}
.dark .nuip-key-dates .fi-fo-field-wrp {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.5);
}
.dark .nuip-key-dates .fi-fo-field-wrp:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 14px rgba(96, 165, 250, 0.18);
}
.dark .nuip-key-dates label {
    color: #cbd5e1 !important;
}
.dark .nuip-key-dates .fi-input,
.dark .nuip-key-dates input[type="text"] {
    color: #f1f5f9 !important;
}
.dark .nuip-key-dates .fi-fo-field-wrp-helper-text {
    color: #64748b !important;
}
