/*
 * Nirmata "Frosted glass" theme (chosen by Amol, 2026-10-21), for the HQ and startup panels.
 * Light grey canvas, translucent white panels with blur, a floating sidebar, DM Sans, ink primary
 * buttons and a restrained Startions blue (Startions Web design system). Light mode only.
 * Plain CSS over Filament's own classes, loaded after Filament's stylesheet.
 */
:root {
    --ng-ink: #172630;
    --ng-ink-hover: #294553;
    --ng-ink-soft: #42535d;
    --ng-muted: #586873;
    --ng-blue: #159fe9;
    --ng-deep: #0676b4;
    --ng-canvas: #e9ecee;
    --ng-glass: rgba(255, 255, 255, 0.58);
    --ng-glass-strong: rgba(255, 255, 255, 0.86);
    --ng-glass-line: rgba(255, 255, 255, 0.75);
    --ng-hair: rgba(23, 38, 48, 0.07);
    --ng-shadow: 0 10px 28px rgba(23, 38, 48, 0.08);
    --ng-blur: blur(22px) saturate(1.4);
    --ng-radius: 18px;
}

/* Canvas */
html body.fi-body {
    color: var(--ng-ink);
    background-color: var(--ng-canvas);
    background-image:
        radial-gradient(circle at 18% 22%, #f7f9fa 0, rgba(247, 249, 250, 0) 38%),
        radial-gradient(circle at 82% 8%, #dfe9ef 0, rgba(223, 233, 239, 0) 34%),
        radial-gradient(circle at 70% 88%, #e4e8ea 0, rgba(228, 232, 234, 0) 40%);
    background-attachment: fixed;
}

/* The glass surface, shared by every panel-like element */
html body.fi-body .fi-sidebar,
html body.fi-body .fi-topbar,
html body.fi-body .fi-section:not(.fi-section-not-contained),
html body.fi-body .fi-ta-ctn,
html body.fi-body .fi-wi-stats-overview-stat,
html body.fi-body .fi-simple-main,
html body.fi-body .hq-tile,
html body.fi-body .hq-type {
    background-color: var(--ng-glass);
    -webkit-backdrop-filter: var(--ng-blur);
    backdrop-filter: var(--ng-blur);
    border: 1px solid var(--ng-glass-line);
    box-shadow: var(--ng-shadow);
    --tw-ring-color: transparent;
}

/* Floating sidebar */
@media (min-width: 64rem) {
    html body.fi-body .fi-sidebar {
        margin: 16px 0 16px 16px;
        height: calc(100dvh - 32px);
        top: 16px;
        border-radius: 22px;
    }
}
html body.fi-body .fi-sidebar-header,
html body.fi-body.fi-body-has-topbar .fi-sidebar-header {
    background: transparent;
    box-shadow: none;
}
html body.fi-body .fi-sidebar-nav {
    padding-inline: 14px;
    padding-block: 18px 22px;
    row-gap: 22px;
}
html body.fi-body .fi-sidebar-group-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ng-muted);
}
html body.fi-body .fi-sidebar-group-label::before {
    content: "";
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: var(--ng-blue);
    flex-shrink: 0;
}
html body.fi-body .fi-sidebar-item-btn {
    border-radius: 10px;
    padding-block: 8px;
}
html body.fi-body .fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, 0.7);
}
html body.fi-body .fi-sidebar-item-label {
    color: var(--ng-ink-soft);
    font-weight: 500;
}
html body.fi-body .fi-sidebar-item-icon {
    color: var(--ng-muted);
}
html body.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--ng-ink);
    box-shadow: 0 6px 16px -8px rgba(23, 38, 48, 0.6);
}
html body.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
html body.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon {
    color: #ffffff;
}
html body.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    --tw-ring-color: transparent;
}

/* Floating top bar */
html body.fi-body .fi-topbar-ctn {
    padding: 16px 16px 0;
}
html body.fi-body .fi-topbar {
    border-radius: var(--ng-radius);
}

/* Page content */
html body.fi-body .fi-main {
    padding-top: 6px;
}
html body.fi-body .fi-header-heading {
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--ng-ink);
}
html body.fi-body .fi-header-subheading {
    color: var(--ng-muted);
}

/* Cards, tables, stats */
html body.fi-body .fi-section:not(.fi-section-not-contained),
html body.fi-body .fi-ta-ctn,
html body.fi-body .fi-wi-stats-overview-stat {
    border-radius: var(--ng-radius);
}
html body.fi-body .fi-section-header-heading {
    font-weight: 600;
    letter-spacing: -0.02em;
}
html body.fi-body .fi-section:not(.fi-section-not-contained) > .fi-section-content-ctn > .fi-section-footer,
html body.fi-body .fi-ta-header,
html body.fi-body .fi-ta-header-toolbar,
html body.fi-body .fi-ta-content,
html body.fi-body .fi-ta-footer,
html body.fi-body .fi-pagination {
    border-color: var(--ng-hair);
    background-color: transparent;
}
html body.fi-body .fi-ta-table > thead > tr,
html body.fi-body .fi-ta-header-cell {
    background-color: transparent;
}
html body.fi-body .fi-ta-header-cell-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ng-muted);
}
html body.fi-body .fi-ta-table > tbody > tr,
html body.fi-body .fi-ta-row {
    border-color: var(--ng-hair);
}
html body.fi-body .fi-ta-row:hover,
html body.fi-body .fi-ta-row.fi-clickable:hover {
    background-color: rgba(255, 255, 255, 0.55);
}
html body.fi-body .fi-ta-table > :not(:last-child),
html body.fi-body .fi-ta-table > tbody {
    --tw-divide-opacity: 1;
    border-color: var(--ng-hair);
}
html body.fi-body .fi-wi-stats-overview-stat-value {
    font-weight: 600;
    letter-spacing: -0.04em;
}

/* Fields */
html body.fi-body .fi-input-wrp {
    background-color: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    box-shadow: none;
    --tw-ring-color: rgba(23, 38, 48, 0.1);
}
html body.fi-body .fi-input-wrp:focus-within {
    --tw-ring-color: var(--ng-deep);
}

/* Buttons: primary actions are ink, as on startions.com */
html body.fi-body .fi-btn {
    border-radius: 12px;
}
html body.fi-body .fi-btn.fi-color-primary:not(.fi-outlined) {
    background-color: var(--ng-ink);
    color: #ffffff;
}
html body.fi-body .fi-btn.fi-color-primary:not(.fi-outlined):hover {
    background-color: var(--ng-ink-hover);
}
html body.fi-body .fi-btn.fi-color-gray:not(.fi-outlined),
html body.fi-body .fi-btn.fi-outlined {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Tabs */
html body.fi-body .fi-tabs {
    background-color: rgba(23, 38, 48, 0.05);
    border-radius: 12px;
    box-shadow: none;
    --tw-ring-color: transparent;
}
html body.fi-body .fi-tabs-item {
    border-radius: 9px;
}
html body.fi-body .fi-tabs-item.fi-active {
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(23, 38, 48, 0.08);
}

/* Floating layers stay readable: more opaque glass */
html body.fi-body .fi-dropdown-panel,
html body.fi-body .fi-modal-window {
    background-color: var(--ng-glass-strong);
    -webkit-backdrop-filter: var(--ng-blur);
    backdrop-filter: var(--ng-blur);
    border: 1px solid var(--ng-glass-line);
    border-radius: var(--ng-radius);
}
html body.fi-body .fi-modal-close-overlay {
    background-color: rgba(23, 38, 48, 0.28);
}

/* Sign-in and other simple pages */
html body.fi-body .fi-simple-main {
    border-radius: 22px;
}

/* Brand mark (Nirmata) */
.ng-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--ng-ink);
}
.ng-brand-tile {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--ng-ink);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
}
.ng-brand-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.ng-brand-sub {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ng-muted);
}

/* HQ overview's own blocks */
html body.fi-body .hq-tile,
html body.fi-body .hq-type {
    border-radius: var(--ng-radius);
}
html body.fi-body .hq-type:hover {
    border-color: rgba(6, 118, 180, 0.35);
}
html body.fi-body .hq-table td {
    border-top-color: var(--ng-hair);
}
html body.fi-body .hq-table a {
    color: var(--ng-ink);
}
html body.fi-body .hq-badge {
    background: rgba(21, 159, 233, 0.12);
    color: #0b5e8c;
}

@media (prefers-reduced-motion: reduce) {
    html body.fi-body * {
        transition: none !important;
    }
}
