/*
 * PROENÇA & FERRAZ — Logística e Ferramental
 * Interface corporativa preta industrial, responsiva e isolada.
 */
:root {
    --pflf-bg: var(--pfi-bg, #03080d);
    --pflf-bg-deep: var(--pfi-bg-elevated, #071119);
    --pflf-surface: var(--pfi-surface, #0d1a23);
    --pflf-surface-2: var(--pfi-surface-alt, #132630);
    --pflf-surface-3: #182f3b;
    --pflf-border: var(--pfi-border, rgba(180, 222, 243, .14));
    --pflf-border-strong: var(--pfi-border-strong, rgba(180, 222, 243, .25));
    --pflf-text: var(--pfi-text, #f2f7fa);
    --pflf-soft: var(--pfi-text-soft, #bccbd3);
    --pflf-muted: var(--pfi-muted, #879ca8);
    --pflf-blue: var(--pfi-blue-light, #24b7e8);
    --pflf-blue-dark: var(--pfi-blue, #0b5a7a);
    --pflf-red: var(--pfi-red, #e21b23);
    --pflf-red-soft: #ff6970;
    --pflf-green: var(--pfi-success, #25c77a);
    --pflf-yellow: var(--pfi-warning, #f2b84b);
    --pflf-violet: #9b7cf6;
    --pflf-cyan: #42d6e8;
    --pflf-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    --pflf-shadow-soft: 0 14px 38px rgba(0, 0, 0, .22);
    --pflf-radius: 18px;
    --pflf-radius-sm: 12px;
    --pflf-font: var(--pfi-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.pflf-surface,
.pflf-profile-segment,
.pflf-shell,
.pflf-admin-wrap {
    color-scheme: dark;
}

.pflf-shell,
.pflf-shell *,
.pflf-admin-wrap,
.pflf-admin-wrap * {
    box-sizing: border-box;
}

.pflf-shell {
    position: relative;
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 0 0 28px;
    color: var(--pflf-text);
    font-family: var(--pflf-font);
    line-height: 1.55;
    isolation: isolate;
}

.pflf-shell a {
    color: var(--pflf-blue);
    text-decoration: none;
}

.pflf-shell a:hover,
.pflf-shell a:focus-visible {
    color: #8ee6ff;
}

.pflf-shell :focus-visible {
    outline: 3px solid rgba(36, 183, 232, .45);
    outline-offset: 3px;
}

.pflf-shell h1,
.pflf-shell h2,
.pflf-shell h3,
.pflf-shell h4,
.pflf-shell p,
.pflf-shell dl,
.pflf-shell dt,
.pflf-shell dd {
    margin-top: 0;
}

.pflf-shell h1,
.pflf-shell h2,
.pflf-shell h3,
.pflf-shell h4 {
    color: var(--pflf-text);
    font-family: inherit;
    letter-spacing: -.02em;
}

.pflf-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--pflf-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}

.pflf-code {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 9px;
    border: 1px solid rgba(36, 183, 232, .24);
    border-radius: 999px;
    background: rgba(36, 183, 232, .09);
    color: #a9eaff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

/* Hero */
.pflf-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
    gap: 28px;
    align-items: center;
    min-height: 270px;
    margin-bottom: 16px;
    padding: clamp(28px, 4.8vw, 62px);
    overflow: hidden;
    border: 1px solid rgba(111, 203, 240, .16);
    border-radius: calc(var(--pflf-radius) + 4px);
    background:
        radial-gradient(circle at 83% 18%, rgba(36, 183, 232, .22), transparent 29%),
        radial-gradient(circle at 20% 110%, rgba(226, 27, 35, .16), transparent 35%),
        linear-gradient(135deg, #06111a 0%, #0a1b27 52%, #08141d 100%);
    box-shadow: var(--pflf-shadow);
}

.pflf-hero::before,
.pflf-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.pflf-hero::before {
    inset: 0;
    background-image:
        linear-gradient(rgba(107, 190, 225, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 190, 225, .04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.78), transparent 90%);
}

.pflf-hero::after {
    width: 360px;
    height: 360px;
    right: -170px;
    bottom: -220px;
    border: 1px solid rgba(36, 183, 232, .23);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(36, 183, 232, .04), 0 0 0 88px rgba(226, 27, 35, .025);
}

.pflf-hero__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pflf-hero__copy,
.pflf-hero__status {
    position: relative;
    z-index: 2;
}

.pflf-hero h1 {
    max-width: 780px;
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 62px);
    line-height: .98;
    text-wrap: balance;
}

.pflf-hero__copy > p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--pflf-soft);
    font-size: clamp(15px, 1.35vw, 19px);
}

.pflf-hero__identity {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.pflf-hero__identity span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--pflf-border);
    border-radius: 999px;
    background: rgba(2, 10, 16, .45);
    color: var(--pflf-soft);
    font-size: 12px;
    font-weight: 700;
}

.pflf-hero__status {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 28px 20px;
    border: 1px solid rgba(72, 207, 159, .20);
    border-radius: 20px;
    background: rgba(4, 16, 23, .72);
    text-align: center;
    backdrop-filter: blur(13px);
}

.pflf-hero__status strong {
    color: var(--pflf-text);
    font-size: 17px;
}

.pflf-hero__status small {
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-signal {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    border: 7px solid rgba(37, 199, 122, .13);
    border-radius: 50%;
    background: var(--pflf-green);
    box-shadow: 0 0 22px rgba(37, 199, 122, .75);
}

.pflf-hero__status.is-critical {
    border-color: rgba(255, 76, 84, .35);
    background: rgba(44, 5, 9, .72);
}

.pflf-hero__status.is-critical .pflf-signal {
    border-color: rgba(226, 27, 35, .18);
    background: var(--pflf-red-soft);
    box-shadow: 0 0 28px rgba(226, 27, 35, .9);
    animation: pflf-critical-pulse 1.15s ease-in-out infinite;
}

@keyframes pflf-critical-pulse {
    0%,
100% { transform: scale(.92); opacity: .58; }
    50% { transform: scale(1.16); opacity: 1; }
}

/* Tabs */
.pflf-tabs {
    position: sticky;
    z-index: 20;
    top: calc(var(--pfi-header-height, 64px) + 8px);
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--pflf-border);
    border-radius: var(--pflf-radius);
    background: rgba(7, 17, 25, .92);
    box-shadow: var(--pflf-shadow-soft);
    scrollbar-width: thin;
    backdrop-filter: blur(18px);
}

.pflf-tabs a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--pflf-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: .2s ease;
}

.pflf-tabs a span {
    font-size: 17px;
}

.pflf-tabs a:hover {
    border-color: var(--pflf-border);
    background: rgba(36, 183, 232, .06);
    color: var(--pflf-text);
}

.pflf-tabs a.is-active {
    border-color: rgba(36, 183, 232, .32);
    background: linear-gradient(135deg, rgba(11, 90, 122, .82), rgba(8, 57, 78, .82));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 9px 24px rgba(0,0,0,.18);
}

.pflf-content {
    display: grid;
    gap: 18px;
}

/* Generic panels */
.pflf-section,
.pflf-panel,
.pflf-alert-panel,
.pflf-form-card,
.pflf-detail-card,
.pflf-empty,
.pflf-directorate {
    border: 1px solid var(--pflf-border);
    border-radius: var(--pflf-radius);
    background: linear-gradient(145deg, rgba(14, 29, 39, .96), rgba(8, 18, 26, .96));
    box-shadow: var(--pflf-shadow-soft);
}

.pflf-section,
.pflf-alert-panel,
.pflf-panel,
.pflf-directorate {
    padding: clamp(18px, 2.4vw, 30px);
}

.pflf-section__header,
.pflf-alert-panel > header,
.pflf-panel > header,
.pflf-form-card > header,
.pflf-detail-card > header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.pflf-section__header h2,
.pflf-alert-panel h2,
.pflf-panel h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.7vw, 34px);
}

.pflf-section__header p,
.pflf-alert-panel header p,
.pflf-panel header p,
.pflf-form-card header p,
.pflf-detail-card header p {
    margin-bottom: 0;
    color: var(--pflf-muted);
}

.pflf-notice {
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(37, 199, 122, .26);
    border-left: 5px solid var(--pflf-green);
    border-radius: var(--pflf-radius-sm);
    background: rgba(37, 199, 122, .10);
    color: #d8ffed;
    font-weight: 700;
}

.pflf-notice--error {
    border-color: rgba(255, 94, 101, .30);
    border-left-color: var(--pflf-red-soft);
    background: rgba(226, 27, 35, .12);
    color: #ffdfe1;
}

.pflf-empty {
    padding: 32px;
    text-align: center;
}

.pflf-empty strong,
.pflf-empty h3 {
    display: block;
    margin: 0 0 7px;
    color: var(--pflf-text);
    font-size: 20px;
}

.pflf-empty p {
    margin-bottom: 0;
    color: var(--pflf-muted);
}

/* Buttons */
.pflf-button,
.pflf-shell button.pflf-button,
.pflf-shell input[type="submit"].pflf-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid var(--pflf-border-strong);
    border-radius: 11px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.pflf-button:hover,
.pflf-button:focus-visible {
    transform: translateY(-1px);
}

.pflf-button--primary {
    border-color: rgba(36, 183, 232, .38);
    background: linear-gradient(135deg, #0b7199, #07526f);
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(0, 91, 126, .24);
}

.pflf-button--primary:hover {
    background: linear-gradient(135deg, #0c83ad, #08698d);
}

.pflf-button--ghost {
    background: rgba(255,255,255,.035);
    color: var(--pflf-soft) !important;
}

.pflf-button--ghost:hover {
    border-color: rgba(36, 183, 232, .40);
    background: rgba(36, 183, 232, .09);
    color: #fff !important;
}

.pflf-button--danger {
    border-color: rgba(255, 80, 88, .30);
    background: rgba(226, 27, 35, .10);
    color: #ff9da2 !important;
}

/* Metrics */
.pflf-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(155px, 1fr));
    gap: 12px;
}

.pflf-metric {
    position: relative;
    display: grid;
    min-height: 150px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--pflf-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(17, 34, 45, .98), rgba(8, 18, 26, .98));
    box-shadow: var(--pflf-shadow-soft);
    transition: transform .2s ease, border-color .2s ease;
}

.pflf-metric::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -38px;
    bottom: -42px;
    border-radius: 50%;
    background: currentColor;
    opacity: .09;
}

.pflf-metric:hover {
    transform: translateY(-3px);
    border-color: rgba(36, 183, 232, .34);
}

.pflf-metric > span {
    color: var(--pflf-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.pflf-metric strong {
    align-self: center;
    color: var(--pflf-text);
    font-size: clamp(25px, 2.8vw, 42px);
    line-height: 1;
}

.pflf-metric small {
    align-self: end;
    color: var(--pflf-soft);
    font-size: 11px;
}

.pflf-metric--blue { color: var(--pflf-blue); }
.pflf-metric--red { color: var(--pflf-red-soft); border-color: rgba(255, 80, 88, .22); }
.pflf-metric--green { color: var(--pflf-green); }
.pflf-metric--cyan { color: var(--pflf-cyan); }
.pflf-metric--gold { color: var(--pflf-yellow); }
.pflf-metric--violet { color: var(--pflf-violet); }

/* Alerts */
.pflf-alert-panel.is-critical {
    border-color: rgba(255, 80, 88, .34);
    box-shadow: 0 0 0 1px rgba(226, 27, 35, .08), 0 24px 70px rgba(73, 0, 5, .28);
}

.pflf-alert-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.pflf-alert-metrics > div {
    display: grid;
    gap: 2px;
    padding: 13px 15px;
    border: 1px solid var(--pflf-border);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
}

.pflf-alert-metrics strong {
    color: var(--pflf-text);
    font-size: 25px;
}

.pflf-alert-metrics span {
    color: var(--pflf-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.pflf-alert-list {
    display: grid;
    gap: 9px;
}

.pflf-alert {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    min-height: 72px;
    padding: 13px 16px;
    border: 1px solid var(--pflf-border);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
    color: var(--pflf-soft) !important;
}

.pflf-alert:hover {
    border-color: rgba(36, 183, 232, .35);
    background: rgba(36, 183, 232, .055);
}

.pflf-alert strong {
    display: block;
    margin-bottom: 2px;
    color: var(--pflf-text);
    font-size: 13px;
}

.pflf-alert p {
    margin: 0;
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-alert__light {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--pflf-yellow);
    box-shadow: 0 0 15px rgba(242, 184, 75, .72);
}

.pflf-alert--critical {
    border-color: rgba(255, 80, 88, .24);
    background: rgba(226, 27, 35, .065);
}

.pflf-alert--critical .pflf-alert__light {
    background: var(--pflf-red-soft);
    box-shadow: 0 0 20px rgba(255, 80, 88, .92);
    animation: pflf-critical-pulse 1.15s ease-in-out infinite;
}

/* Dashboard */
.pflf-dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 18px;
}

.pflf-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pflf-flow > div {
    min-height: 170px;
    padding: 16px;
    border: 1px solid var(--pflf-border);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}

.pflf-flow > div > span {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    margin-bottom: 18px;
    border: 1px solid rgba(36, 183, 232, .30);
    border-radius: 50%;
    background: rgba(36, 183, 232, .09);
    color: var(--pflf-blue);
    font-size: 11px;
    font-weight: 900;
}

.pflf-flow strong {
    display: block;
    margin-bottom: 6px;
    color: var(--pflf-text);
}

.pflf-flow p {
    margin: 0;
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-quick-actions {
    display: grid;
    gap: 10px;
}

.pflf-quick-actions a {
    display: grid;
    gap: 3px;
    padding: 15px;
    border: 1px solid var(--pflf-border);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
}

.pflf-quick-actions a:hover {
    border-color: rgba(36, 183, 232, .38);
    background: rgba(36, 183, 232, .065);
}

.pflf-quick-actions strong {
    color: var(--pflf-text);
}

.pflf-quick-actions span {
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-directorate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pflf-directorate-grid > div {
    display: grid;
    gap: 6px;
    min-height: 112px;
    align-content: center;
    padding: 18px;
    border: 1px solid var(--pflf-border);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}

.pflf-directorate-grid strong {
    color: var(--pflf-text);
    font-size: 33px;
}

.pflf-directorate-grid span {
    color: var(--pflf-muted);
    font-size: 12px;
}

/* Cards & fleet */
.pflf-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(270px, 1fr));
    gap: 14px;
}

.pflf-vehicle-card {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--pflf-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(18, 37, 48, .96), rgba(9, 20, 28, .96));
}

.pflf-vehicle-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--pflf-green);
}

.pflf-vehicle-card.pflf-status--blocked::before,
.pflf-vehicle-card.pflf-status--maintenance::before {
    background: var(--pflf-red-soft);
}

.pflf-vehicle-card.pflf-status--in_use::before {
    background: var(--pflf-blue);
}

.pflf-vehicle-card > header,
.pflf-detail-card > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.pflf-vehicle-card h3,
.pflf-detail-card h3 {
    margin: 8px 0 4px;
    font-size: 20px;
}

.pflf-vehicle-card header p,
.pflf-detail-card header p {
    margin: 0;
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-vehicle-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.pflf-vehicle-card dl > div {
    padding: 10px;
    border: 1px solid var(--pflf-border);
    border-radius: 11px;
    background: rgba(255,255,255,.022);
}

.pflf-vehicle-card dt {
    color: var(--pflf-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.pflf-vehicle-card dd {
    margin: 3px 0 0;
    color: var(--pflf-text);
    font-weight: 800;
}

.pflf-due-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.pflf-due {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--pflf-border);
    border-radius: 10px;
    background: rgba(255,255,255,.02);
}

.pflf-due small {
    color: var(--pflf-muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.pflf-due strong {
    color: var(--pflf-soft);
    font-size: 11px;
}

.pflf-due--warning { border-color: rgba(242, 184, 75, .30); background: rgba(242, 184, 75, .07); }
.pflf-due--critical,
.pflf-due--expired { border-color: rgba(255, 80, 88, .34); background: rgba(226, 27, 35, .08); }
.pflf-due--ok { border-color: rgba(37, 199, 122, .23); }

.pflf-bus-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--pflf-border);
}

.pflf-bus-summary span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(36, 183, 232, .07);
    color: var(--pflf-soft);
    font-size: 10px;
    font-weight: 700;
}

.pflf-vehicle-card > footer,
.pflf-detail-card > footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--pflf-border);
}

.pflf-vehicle-card > footer a {
    padding: 7px 10px;
    border-radius: 9px;
    background: rgba(36, 183, 232, .07);
    font-size: 11px;
    font-weight: 800;
}

/* Pills */
.pflf-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--pflf-border);
    border-radius: 999px;
    background: rgba(255,255,255,.035);
    color: var(--pflf-soft);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.pflf-pill--blocked,
.pflf-pill--critical,
.pflf-pill--overdue { border-color: rgba(255,80,88,.34); background: rgba(226,27,35,.10); color: #ffadb1; }
.pflf-pill--high,
.pflf-pill--restricted { border-color: rgba(242,184,75,.35); background: rgba(242,184,75,.08); color: #ffe0a0; }
.pflf-pill--released,
.pflf-pill--returned,
.pflf-pill--resolved { border-color: rgba(37,199,122,.30); background: rgba(37,199,122,.08); color: #a8f4ce; }
.pflf-pill--active,
.pflf-pill--extended { border-color: rgba(36,183,232,.30); background: rgba(36,183,232,.08); color: #a6eaff; }

/* Forms */
.pflf-form-card,
.pflf-detail-card {
    margin-bottom: 18px;
    padding: clamp(18px, 2.6vw, 30px);
}

.pflf-form-card--compact {
    padding: 16px 18px;
}

.pflf-form,
.pflf-form-card form {
    display: grid;
    gap: 17px;
}

.pflf-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.pflf-form label,
.pflf-inline-form label {
    display: grid;
    gap: 7px;
    color: var(--pflf-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
}

.pflf-field-full {
    grid-column: 1 / -1;
}

.pflf-form input,
.pflf-form select,
.pflf-form textarea,
.pflf-inline-form input,
.pflf-inline-form select,
.pflf-settings input,
.pflf-settings select {
    width: 100%;
    min-height: 45px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--pflf-border-strong);
    border-radius: 10px;
    outline: none;
    background: #08151e;
    color: var(--pflf-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.18);
}

.pflf-form textarea {
    min-height: 96px;
    resize: vertical;
}

.pflf-form input::placeholder,
.pflf-form textarea::placeholder {
    color: #667b87;
}

.pflf-form input:focus,
.pflf-form select:focus,
.pflf-form textarea:focus,
.pflf-inline-form select:focus {
    border-color: rgba(36,183,232,.70);
    box-shadow: 0 0 0 3px rgba(36,183,232,.10);
}

.pflf-form-section-title {
    margin: 9px 0 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--pflf-border);
    color: var(--pflf-blue) !important;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pflf-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    padding-top: 5px;
}

.pflf-inline-form {
    display: flex;
    gap: 12px;
    align-items: end;
}

.pflf-inline-form label {
    flex: 1 1 300px;
}

.pflf-bus-fields {
    display: none;
    padding: 16px;
    border: 1px solid rgba(36,183,232,.20);
    border-radius: 14px;
    background: rgba(36,183,232,.035);
}

.pflf-bus-fields.is-visible {
    display: block;
}

/* Checklists */
.pflf-checklist-grid,
.pflf-check-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pflf-check-item,
.pflf-check-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, .42fr);
    gap: 9px 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--pflf-border);
    border-radius: 12px;
    background: rgba(255,255,255,.024);
}

.pflf-check-item > strong {
    color: var(--pflf-soft);
    font-size: 12px;
}

.pflf-check-item > input {
    grid-column: 1 / -1;
}

.pflf-check-result {
    grid-template-columns: auto minmax(0, 1fr);
}

.pflf-check-result > span {
    grid-row: 1 / span 2;
    align-self: stretch;
    display: grid;
    place-items: center;
    min-width: 90px;
    padding: 8px;
    border-radius: 9px;
    background: rgba(37,199,122,.09);
    color: #aaf4ce;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
}

.pflf-check-result--nc > span {
    background: rgba(226,27,35,.11);
    color: #ffadb1;
}

.pflf-check-result--na > span {
    background: rgba(135,156,168,.11);
    color: #c3d0d7;
}

.pflf-check-result strong { color: var(--pflf-text); font-size: 12px; }
.pflf-check-result p { margin: 0; color: var(--pflf-muted); font-size: 11px; }

/* Detail */
.pflf-detail-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.pflf-detail-columns > div {
    padding: 15px;
    border: 1px solid var(--pflf-border);
    border-radius: 13px;
    background: rgba(255,255,255,.023);
}

.pflf-detail-columns h4 {
    margin: 0 0 7px;
    color: var(--pflf-blue);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pflf-detail-columns p {
    margin: 0;
    color: var(--pflf-soft);
    font-size: 13px;
}

/* Tables */
.pflf-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--pflf-border);
    border-radius: 14px;
    background: rgba(2, 9, 14, .34);
    scrollbar-color: #1f5065 #071119;
}

.pflf-table {
    width: 100%;
    min-width: 860px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    color: var(--pflf-soft);
    font-family: inherit;
    font-size: 12px;
}

.pflf-table thead th {
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid var(--pflf-border-strong);
    background: #0c212d;
    color: #a9dff4;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.pflf-table tbody td {
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid rgba(180,222,243,.08);
    background: transparent;
    color: var(--pflf-soft);
    vertical-align: top;
}

.pflf-table tbody tr:last-child td { border-bottom: 0; }
.pflf-table tbody tr:hover td { background: rgba(36,183,232,.035); }
.pflf-table tbody tr.is-critical td { background: rgba(226,27,35,.045); }
.pflf-table strong { color: var(--pflf-text); }
.pflf-table small { color: var(--pflf-muted); }
.pflf-table a { font-weight: 800; }

/* Rentals */
.pflf-rental-items {
    display: grid;
    gap: 13px;
}

.pflf-rental-item {
    padding: 17px;
    border: 1px solid var(--pflf-border);
    border-radius: 14px;
    background: rgba(255,255,255,.022);
}

.pflf-rental-item__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.pflf-rental-item__head strong {
    color: var(--pflf-text);
}

.pflf-remove-rental-item {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,80,88,.28);
    border-radius: 9px;
    cursor: pointer;
    background: rgba(226,27,35,.08);
    color: #ff9da2;
    font-size: 21px;
}

.pflf-rental-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(242,184,75,.25);
    border-radius: 13px;
    background: rgba(242,184,75,.055);
}

.pflf-rental-total span {
    color: var(--pflf-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.pflf-rental-total strong {
    color: #ffd986;
    font-size: 27px;
}

/* Reports */
.pflf-report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.pflf-report-grid article {
    display: grid;
    align-content: start;
    min-height: 245px;
    padding: 20px;
    border: 1px solid var(--pflf-border);
    border-radius: 15px;
    background: rgba(255,255,255,.024);
}

.pflf-report-grid article > span {
    font-size: 31px;
}

.pflf-report-grid h3 {
    margin: 15px 0 7px;
    font-size: 17px;
}

.pflf-report-grid p {
    margin-bottom: 18px;
    color: var(--pflf-muted);
    font-size: 12px;
}

.pflf-report-grid .pflf-button {
    align-self: end;
    margin-top: auto;
}
.pflf-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 4px 0;
    padding: 5px 10px;
    border: 1px solid rgba(36,183,232,.26);
    border-radius: 999px;
    background: rgba(8, 32, 44, .78);
    color: #a9eaff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .025em;
}

/* Responsive */
@media (max-width: 1250px) {
    .pflf-metric-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
    .pflf-card-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
    .pflf-report-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
    .pflf-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pflf-tabs { grid-template-columns: repeat(6, minmax(140px, 1fr)); }
}

@media (max-width: 950px) {
    .pflf-hero { grid-template-columns: 1fr; }
    .pflf-hero__status { justify-self: stretch; grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
    .pflf-hero__status .pflf-signal { grid-row: 1 / span 2; align-self: center; margin: 0 8px 0 0; }
    .pflf-dashboard-columns { grid-template-columns: 1fr; }
    .pflf-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pflf-directorate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .pflf-shell { padding-inline: 0; }
    .pflf-hero { min-height: 0; padding: 27px 20px; border-radius: 16px; }
    .pflf-hero h1 { font-size: clamp(30px, 11vw, 47px); }
    .pflf-hero__identity { display: grid; }
    .pflf-tabs { top: 6px; grid-template-columns: repeat(6, minmax(135px, 1fr)); border-radius: 13px; }
    .pflf-metric-grid,
.pflf-card-grid,
.pflf-report-grid,
.pflf-alert-metrics,
.pflf-directorate-grid,
.pflf-checklist-grid,
.pflf-check-results,
.pflf-detail-columns,
.pflf-form-grid,
.pflf-flow { grid-template-columns: 1fr; }
    .pflf-section,
.pflf-panel,
.pflf-alert-panel,
.pflf-form-card,
.pflf-detail-card { padding: 17px; border-radius: 14px; }
    .pflf-section__header,
.pflf-alert-panel > header,
.pflf-panel > header,
.pflf-form-card > header,
.pflf-detail-card > header { display: grid; }
    .pflf-metric { min-height: 125px; }
    .pflf-inline-form { display: grid; }
    .pflf-button { width: 100%; }
    .pflf-form-actions .pflf-button { flex: 1 1 100%; }
    .pflf-check-item { grid-template-columns: 1fr; }
    .pflf-check-item > input { grid-column: auto; }
    .pflf-alert { grid-template-columns: 16px minmax(0, 1fr); }
    .pflf-alert > span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pflf-shell *,
.pflf-shell *::before,
.pflf-shell *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Print only for in-portal print; dedicated print endpoint has its own sheet. */
@media print {
    .pflf-tabs,
.pflf-button,
.pflf-enable-sound,
.pflf-form-actions,
.pflf-quick-actions { display: none !important; }
    .pflf-shell,
.pflf-section,
.pflf-panel,
.pflf-alert-panel,
.pflf-detail-card { color: #111 !important; background: #fff !important; box-shadow: none !important; }
}
