:root {
    --dpfm-blue: #003A70;
    --dpfm-red: #E30613;
    --dpfm-background: #f3f5f7;
    --dpfm-border: #d8dee6;
    --dpfm-text: #1f2933;
    --dpfm-muted: #5f6b7a;
    --dpfm-white: #ffffff;
    --dpfm-button-hover-blue: #005294;
    --dpfm-button-active-blue: #002f5a;
    --dpfm-button-focus-ring: rgba(0, 58, 112, 0.24);
    --dpfm-button-danger-hover: #bf0510;
    --dpfm-button-danger-active: #9f050d;
    --dpfm-button-height: 2.5rem;
    --dpfm-button-icon-size: 2.5rem;
    --dpfm-button-min-width: 7rem;
    --dpfm-button-compact-min-width: 5.5rem;
    --dpfm-button-padding-x: 1rem;
    --dpfm-button-radius: 8px;
    --dpfm-button-gap: 0.6rem;
    --dpfm-button-font-size: 0.94rem;
    --dpfm-page-max-width: 1680px;
    --dpfm-topbar-height: 72px;
    --dpfm-dark-background: #111827;
    --dpfm-dark-surface: #172033;
    --dpfm-dark-surface-muted: #1f2937;
    --dpfm-dark-border: #334155;
    --dpfm-dark-text: #e5eef7;
    --dpfm-dark-muted: #a7b3c4;
    --dpfm-dark-title: #f1f5f9;
    --dpfm-dark-blue: #3b82f6;
    --dpfm-dark-blue-strong: #145a92;
    --dpfm-dark-red: #ef4444;
}

html,
body {
    background: var(--dpfm-background);
    color: var(--dpfm-text);
    font-family: "Segoe UI", Arial, sans-serif;
}

html {
    scroll-padding-top: calc(var(--dpfm-topbar-height) + 1rem);
}

a {
    color: var(--dpfm-blue);
}

main.page h1 {
    scroll-margin-top: calc(var(--dpfm-topbar-height) + 1rem);
}

.dpfm-welcome {
    max-width: 960px;
    margin: 0 auto;
}

.dpfm-hero {
    background: linear-gradient(135deg, var(--dpfm-blue), #005294);
    border-radius: 16px;
    color: var(--dpfm-white);
    padding: 2.5rem;
    box-shadow: 0 16px 40px rgba(0, 58, 112, 0.18);
}

.dpfm-eyebrow {
    display: inline-flex;
    align-items: center;
    border-left: 4px solid var(--dpfm-red);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    padding-left: 0.75rem;
    text-transform: uppercase;
}

.dpfm-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    margin: 0;
}

.dpfm-hero h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0.75rem 0 1rem;
}

.dpfm-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 680px;
}

.dpfm-card {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 14px;
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.dpfm-card h3 {
    color: var(--dpfm-blue);
    margin: 0 0 0.75rem;
}

.dpfm-card p {
    color: var(--dpfm-muted);
    line-height: 1.6;
    margin: 0;
}

.dpfm-table {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.dpfm-table th,
.dpfm-table td {
    border-bottom: 1px solid var(--dpfm-border);
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: middle;
}

.dpfm-table th {
    background: #eef3f8;
    color: var(--dpfm-blue);
    font-weight: 700;
}

.dpfm-button,
.dpfm-btn,
.dpfm-btn-primary,
.dpfm-btn-secondary,
.dpfm-btn-outline,
.dpfm-btn-danger,
.dpfm-public-button {
    align-items: center;
    background: var(--dpfm-blue);
    border: 1px solid var(--dpfm-blue);
    border-radius: var(--dpfm-button-radius);
    box-shadow: 0 1px 2px rgba(0, 58, 112, 0.08);
    box-sizing: border-box;
    color: var(--dpfm-white);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: var(--dpfm-button-font-size);
    font-weight: 700;
    gap: 0.45rem;
    justify-content: center;
    line-height: 1.15;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-min-width);
    padding: 0 var(--dpfm-button-padding-x);
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.08s ease;
    vertical-align: middle;
    white-space: nowrap;
}

.dpfm-button:hover,
.dpfm-btn:hover,
.dpfm-btn-primary:hover,
.dpfm-public-button:hover {
    background: var(--dpfm-button-hover-blue);
    border-color: var(--dpfm-button-hover-blue);
    color: var(--dpfm-white);
    box-shadow: 0 6px 16px rgba(0, 58, 112, 0.16);
}

.dpfm-button:active,
.dpfm-btn:active,
.dpfm-btn-primary:active,
.dpfm-public-button:active {
    background: var(--dpfm-button-active-blue);
    border-color: var(--dpfm-button-active-blue);
    box-shadow: 0 2px 8px rgba(0, 58, 112, 0.14);
    transform: translateY(1px);
}

.dpfm-button:focus-visible,
.dpfm-btn:focus-visible,
.dpfm-btn-primary:focus-visible,
.dpfm-btn-secondary:focus-visible,
.dpfm-btn-outline:focus-visible,
.dpfm-btn-danger:focus-visible,
.dpfm-link-button:focus-visible,
.dpfm-filter-button:focus-visible,
.dpfm-public-button:focus-visible,
.dpfm-dqa-link:focus-visible,
.dpfm-logout-link:focus-visible {
    outline: 3px solid var(--dpfm-button-focus-ring);
    outline-offset: 2px;
}

.dpfm-button:disabled,
.dpfm-btn:disabled,
.dpfm-btn-primary:disabled,
.dpfm-btn-secondary:disabled,
.dpfm-btn-outline:disabled,
.dpfm-btn-danger:disabled,
.dpfm-public-button:disabled,
.dpfm-button[aria-disabled="true"],
.dpfm-btn[aria-disabled="true"],
.dpfm-btn-primary[aria-disabled="true"],
.dpfm-btn-secondary[aria-disabled="true"],
.dpfm-btn-outline[aria-disabled="true"],
.dpfm-btn-danger[aria-disabled="true"],
.dpfm-public-button[aria-disabled="true"],
.dpfm-link-button:disabled,
.dpfm-link-button[aria-disabled="true"],
.dpfm-filter-button:disabled,
.dpfm-filter-button[aria-disabled="true"],
.dpfm-person-toggle:disabled,
.dpfm-fleet-toggle:disabled,
.dpfm-job-function-toggle:disabled,
.dpfm-team-toggle:disabled,
.dpfm-vessel-toggle:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.56;
    pointer-events: none;
    transform: none;
}

.dpfm-button:disabled:hover,
.dpfm-btn:disabled:hover,
.dpfm-btn-primary:disabled:hover,
.dpfm-btn-secondary:disabled:hover,
.dpfm-btn-outline:disabled:hover,
.dpfm-btn-danger:disabled:hover,
.dpfm-public-button:disabled:hover,
.dpfm-button[aria-disabled="true"]:hover,
.dpfm-btn[aria-disabled="true"]:hover,
.dpfm-btn-primary[aria-disabled="true"]:hover,
.dpfm-btn-secondary[aria-disabled="true"]:hover,
.dpfm-btn-outline[aria-disabled="true"]:hover,
.dpfm-btn-danger[aria-disabled="true"]:hover,
.dpfm-public-button[aria-disabled="true"]:hover,
.dpfm-link-button:disabled:hover,
.dpfm-link-button[aria-disabled="true"]:hover,
.dpfm-filter-button:disabled:hover,
.dpfm-filter-button[aria-disabled="true"]:hover,
.dpfm-person-toggle:disabled:hover,
.dpfm-fleet-toggle:disabled:hover,
.dpfm-job-function-toggle:disabled:hover,
.dpfm-team-toggle:disabled:hover,
.dpfm-vessel-toggle:disabled:hover {
    box-shadow: none;
    transform: none;
}

.dpfm-button-danger,
.dpfm-btn-danger {
    background: var(--dpfm-red);
    border-color: var(--dpfm-red);
}

.dpfm-button-danger:hover,
.dpfm-btn-danger:hover {
    background: var(--dpfm-button-danger-hover);
    border-color: var(--dpfm-button-danger-hover);
}

.dpfm-button-danger:active,
.dpfm-btn-danger:active {
    background: var(--dpfm-button-danger-active);
    border-color: var(--dpfm-button-danger-active);
}


.dpfm-topbar {
    align-items: center;
    background: var(--dpfm-white);
    border-bottom: 1px solid var(--dpfm-border);
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0, 58, 112, 0.08);
    display: flex;
    gap: 2rem;
    height: var(--dpfm-topbar-height);
    left: 0;
    padding: 0 2rem;
    position: sticky;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.dpfm-brand {
    border-left: 4px solid var(--dpfm-red);
    color: var(--dpfm-blue);
    flex: 0 0 auto;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding-left: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.dpfm-nav {
    align-items: center;
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    gap: 0.75rem;
    min-width: 0;
}

.dpfm-nav a,
.dpfm-nav-button,
.dpfm-nav-placeholder {
    align-items: center;
    background: transparent;
    appearance: none;
    border: 0;
    border-radius: 999px;
    color: var(--dpfm-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    gap: 0.45rem;
    line-height: normal;
    padding: 0.55rem 0.85rem;
    text-align: left;
    text-decoration: none;
}

.dpfm-nav-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    justify-content: center;
    line-height: 1;
    width: 1.1rem;
}

.dpfm-index-link-label {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    min-width: 0;
}

.dpfm-index-link-icon {
    color: var(--dpfm-accent);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
    width: 1.1rem;
}

.dpfm-nav a.active,
.dpfm-nav a:hover,
.dpfm-nav-button:hover,
.dpfm-nav-dropdown:hover > .dpfm-nav-button {
    background: #eef3f8;
    color: var(--dpfm-blue);
}

.dpfm-nav a:focus,
.dpfm-nav-button:focus {
    outline: none;
}

.dpfm-nav-dropdown {
    flex: 0 0 auto;
    position: relative;
}

.dpfm-nav-dropdown-menu {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 58, 112, 0.14);
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    left: 0;
    min-width: 220px;
    padding: 0.5rem;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.dpfm-nav-dropdown:hover .dpfm-nav-dropdown-menu {
    display: flex;
}

.dpfm-nav-dropdown-menu a,
.dpfm-nav-placeholder {
    white-space: nowrap;
}

.dpfm-nav-placeholder {
    color: #8a96a5;
    cursor: not-allowed;
    opacity: 0.72;
}

.dpfm-nav-placeholder:hover {
    background: transparent;
    color: #8a96a5;
}

.dpfm-topbar-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    margin-left: auto;
}

.dpfm-dqa-link {
    align-items: center;
    background: linear-gradient(135deg, var(--dpfm-blue), #005294);
    border: 1px solid rgba(0, 58, 112, 0.18);
    border-radius: var(--dpfm-button-radius);
    box-shadow: 0 8px 18px rgba(0, 58, 112, 0.14);
    box-sizing: border-box;
    color: var(--dpfm-white);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    height: var(--dpfm-button-height);
    justify-content: center;
    letter-spacing: 0.04em;
    line-height: 1;
    min-width: var(--dpfm-button-height);
    padding: 0 0.65rem;
    position: relative;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.dpfm-dqa-link:hover,
.dpfm-dqa-link.active {
    background: linear-gradient(135deg, #005294, var(--dpfm-blue));
    color: var(--dpfm-white);
    transform: translateY(-1px);
}

.dpfm-ai-nav-link {
    min-width: var(--dpfm-button-height);
}

.dpfm-user-signout-link {
    gap: 0.35rem;
    min-width: 0;
}

.dpfm-user-signout-initials {
    align-items: center;
    background: #eef3f8;
    border: 1px solid var(--dpfm-border);
    border-radius: calc(var(--dpfm-button-radius) - 2px);
    box-sizing: border-box;
    color: var(--dpfm-blue);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 900;
    height: 1.7rem;
    justify-content: center;
    line-height: 1;
    min-width: 2rem;
    padding: 0 0.45rem;
}

.dpfm-theme-toggle {
    align-items: center;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: var(--dpfm-button-radius);
    box-shadow: 0 4px 12px rgba(0, 58, 112, 0.1);
    box-sizing: border-box;
    color: var(--dpfm-blue);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 900;
    height: var(--dpfm-button-icon-size);
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.08s ease;
    width: var(--dpfm-button-icon-size);
}

.dpfm-theme-toggle:hover {
    background: #eef3f8;
    border-color: var(--dpfm-blue);
    box-shadow: 0 8px 18px rgba(0, 58, 112, 0.14);
    transform: translateY(-1px);
}

.dpfm-theme-toggle:focus-visible {
    outline: 3px solid var(--dpfm-button-focus-ring);
    outline-offset: 2px;
}

.dpfm-logout-link {
    align-items: center;
    border: 1px solid var(--dpfm-border);
    border-radius: var(--dpfm-button-radius);
    box-sizing: border-box;
    color: var(--dpfm-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: var(--dpfm-button-font-size);
    font-weight: 700;
    justify-content: center;
    line-height: 1.15;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-min-width);
    padding: 0 var(--dpfm-button-padding-x);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.08s ease;
    white-space: nowrap;
}

.dpfm-logout-link:hover {
    background: #eef3f8;
    border-color: var(--dpfm-blue);
    color: var(--dpfm-blue);
}

.dpfm-dqa-alert {
    align-items: center;
    background: var(--dpfm-red);
    border: 2px solid var(--dpfm-white);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.65rem;
    height: 1rem;
    justify-content: center;
    position: absolute;
    right: -0.25rem;
    top: -0.25rem;
    width: 1rem;
}

@media (max-width: 760px) {
    .dpfm-topbar {
        gap: 0.75rem;
        padding: 0 0.75rem;
    }

    .dpfm-nav {
        gap: 0.35rem;
        overflow-x: auto;
        padding: 0.25rem 0;
        scrollbar-width: none;
    }

    .dpfm-nav::-webkit-scrollbar {
        display: none;
    }

    .dpfm-nav a,
    .dpfm-nav-button,
    .dpfm-nav-placeholder {
        padding: 0.5rem 0.65rem;
    }

    .dpfm-topbar-actions {
        gap: 0.5rem;
    }

    .dpfm-section-heading.dpfm-organizations-domain-heading-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

.dpfm-login-shell {
    align-items: center;
    background: var(--dpfm-white);
    display: flex;
    justify-content: center;
    min-height: min(680px, calc(100vh - 220px));
    padding: 2rem 1rem;
}

.dpfm-login-panel {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 18px 44px rgba(0, 58, 112, 0.1);
    display: grid;
    gap: 1.25rem;
    max-width: 440px;
    padding: 2rem;
    width: 100%;
}

.dpfm-login-brand {
    border-left: 4px solid var(--dpfm-red);
    display: grid;
    gap: 0.15rem;
    padding-left: 0.85rem;
}

.dpfm-login-brand span {
    color: var(--dpfm-blue);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.dpfm-login-brand small {
    color: var(--dpfm-muted);
    font-weight: 700;
}

.dpfm-login-title {
    color: var(--dpfm-blue);
    font-size: 2rem;
    line-height: 1.1;
    margin: 0;
}

.dpfm-login-title:focus,
.dpfm-login-title:focus-visible {
    box-shadow: none;
    outline: none;
}

.dpfm-login-form {
    display: grid;
    gap: 0.75rem;
}

.dpfm-login-form label {
    color: var(--dpfm-blue);
    font-weight: 800;
}

.dpfm-login-form input {
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--dpfm-text);
    font: inherit;
    padding: 0.8rem 0.9rem;
    width: 100%;
}

.dpfm-login-form input:focus {
    border-color: var(--dpfm-blue);
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.12);
    outline: none;
}

.dpfm-login-submit {
    margin-top: 0.5rem;
    text-align: center;
}

.dpfm-login-error {
    background: #fde8e8;
    border: 1px solid #f5b5b5;
    border-radius: 8px;
    color: #9f1c1c;
    font-weight: 700;
    margin: 0;
    padding: 0.85rem 1rem;
}

@media (max-width: 640px) {
    .dpfm-login-shell {
        padding: 1rem 0;
    }

    .dpfm-login-panel {
        padding: 1.25rem;
    }
}

.dpfm-page-shell {
    max-width: var(--dpfm-page-max-width);
    margin: 0 auto;
}

.dpfm-page-header {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.dpfm-page-header h1 {
    color: var(--dpfm-blue);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin: 0;
}

.dpfm-page-header p:last-child {
    color: var(--dpfm-muted);
    margin: 0.75rem 0 0;
}

.dpfm-vessels-card {
    margin-top: 0;
}

.dpfm-vessels-search-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.dpfm-content-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.dpfm-edit-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: flex-end;
}

.dpfm-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dpfm-search-label {
    color: var(--dpfm-blue);
    font-weight: 700;
}

.dpfm-search-input {
    border: 1px solid var(--dpfm-border);
    border-radius: 10px;
    color: var(--dpfm-text);
    font: inherit;
    min-width: min(100%, 320px);
    padding: 0.75rem 0.9rem;
}

.dpfm-search-input:focus {
    border-color: var(--dpfm-blue);
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.12);
    outline: none;
}

.dpfm-table-wrapper {
    overflow-x: auto;
}

.dpfm-vessels-table tbody tr:hover {
    background: #f8fafc;
}

.dpfm-empty-message,
.dpfm-muted-message {
    border: 1px dashed var(--dpfm-border);
    border-radius: 12px;
    color: var(--dpfm-muted);
    margin: 0;
    padding: 1rem;
}

.dpfm-ai-page {
    max-width: var(--dpfm-page-max-width);
}

.dpfm-ai-header {
    display: block;
    min-width: 0;
}

.dpfm-ai-card-header,
.dpfm-ai-composer-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
}

.dpfm-ai-composer-actions {
    justify-content: flex-end;
}

.dpfm-ai-header-content {
    min-width: 0;
    width: 100%;
}

.dpfm-ai-header-title-row,
.dpfm-ai-header-subtitle-row,
.dpfm-ai-header-buttons,
.dpfm-ai-header-status {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
}

.dpfm-ai-header-title-row,
.dpfm-ai-header-subtitle-row {
    justify-content: space-between;
}

.dpfm-ai-header-title-row {
    gap: 1.5rem;
}

.dpfm-ai-header-subtitle-row {
    margin-top: 0.75rem;
}

.dpfm-ai-header-subtitle-row p {
    color: var(--dpfm-muted);
    margin: 0;
    min-width: 0;
}

.dpfm-ai-header-buttons,
.dpfm-ai-header-status {
    justify-content: center;
}

.dpfm-ai-header-buttons .dpfm-btn {
    max-width: 100%;
    white-space: normal;
}

.dpfm-ai-badge,
.dpfm-ai-proof {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
}

.dpfm-ai-badge-online,
.dpfm-ai-proof-grounded {
    background: #dcfce7;
    color: #166534;
}

.dpfm-ai-badge-limited,
.dpfm-ai-proof-partialevidence {
    background: #fef3c7;
    color: #92400e;
}

.dpfm-ai-badge-unavailable,
.dpfm-ai-proof-noevidence {
    background: #fee2e2;
    color: #991b1b;
}

.dpfm-ai-badge-readonly {
    background: #dbeafe;
    color: var(--dpfm-blue);
}

.dpfm-ai-banner {
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.dpfm-ai-banner-limited {
    background: #fffbeb;
    border-color: #fbbf24;
    color: #92400e;
}

.dpfm-ai-banner-unavailable {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.dpfm-ai-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    min-width: 0;
}

.dpfm-ai-context-card,
.dpfm-ai-conversation-card,
.dpfm-ai-state-card {
    display: grid;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
}

.dpfm-ai-context-card {
    position: sticky;
    top: calc(var(--dpfm-topbar-height) + 1rem);
}

.dpfm-ai-card-header {
    justify-content: space-between;
}

.dpfm-ai-card-header > div {
    min-width: 0;
}

.dpfm-ai-card-header .dpfm-btn,
.dpfm-ai-card-header .dpfm-link-button {
    flex: 0 0 auto;
}

.dpfm-ai-card-header h2,
.dpfm-ai-state-card h2 {
    color: var(--dpfm-blue);
    font-size: 1.15rem;
    margin: 0;
}

.dpfm-ai-card-header p,
.dpfm-ai-state-card p {
    color: var(--dpfm-muted);
    margin: 0.35rem 0 0;
}

.dpfm-ai-document-types {
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0.85rem;
}

.dpfm-ai-document-types legend {
    color: var(--dpfm-blue);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0 0.35rem;
}

.dpfm-ai-checkbox {
    align-items: center;
    color: var(--dpfm-text);
    display: flex;
    gap: 0.55rem;
    line-height: 1.3;
}

.dpfm-ai-checkbox input {
    accent-color: var(--dpfm-blue);
}

.dpfm-ai-current-only {
    font-weight: 700;
}

.dpfm-ai-welcome {
    border: 1px dashed var(--dpfm-border);
    border-radius: 12px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.dpfm-ai-welcome p {
    color: var(--dpfm-muted);
    margin: 0;
}

.dpfm-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.dpfm-ai-suggestions .dpfm-filter-button {
    height: auto;
    line-height: 1.35;
    max-width: 100%;
    min-height: var(--dpfm-button-height);
    overflow-wrap: anywhere;
    padding-block: 0.65rem;
    text-align: left;
    white-space: normal;
}

.dpfm-ai-thread {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.dpfm-ai-message {
    border: 1px solid var(--dpfm-border);
    border-radius: 14px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.dpfm-ai-message-user {
    background: #eef6ff;
}

.dpfm-ai-message-assistant {
    background: #ffffff;
}

.dpfm-ai-message-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.dpfm-ai-answer-markdown {
    color: var(--dpfm-text);
    display: grid;
    gap: 0.5rem;
}

.dpfm-ai-answer-markdown h2,
.dpfm-ai-answer-markdown h3,
.dpfm-ai-sources h3 {
    color: var(--dpfm-blue);
    font-size: 1rem;
    margin: 0;
}

.dpfm-ai-answer-markdown p,
.dpfm-ai-answer-markdown ul {
    margin: 0;
}

.dpfm-ai-answer-markdown ul {
    padding-left: 1.25rem;
}

.dpfm-ai-answer-markdown table {
    border-collapse: collapse;
    font-size: 0.9rem;
    width: 100%;
}

.dpfm-ai-answer-markdown td {
    border: 1px solid var(--dpfm-border);
    padding: 0.45rem;
}

.dpfm-ai-warnings {
    color: #92400e;
    margin: 0;
    padding-left: 1.25rem;
}

.dpfm-ai-sources {
    border-top: 1px solid var(--dpfm-border);
    display: grid;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.dpfm-ai-sources ol {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding-left: 1.25rem;
}

.dpfm-ai-sources li {
    border: 1px solid var(--dpfm-border);
    border-radius: 10px;
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
}

.dpfm-ai-sources span {
    color: var(--dpfm-muted);
    font-size: 0.86rem;
}

.dpfm-ai-sources p {
    margin: 0;
}

.dpfm-ai-composer {
    border-top: 1px solid var(--dpfm-border);
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding-top: 1rem;
}

.dpfm-ai-textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 7rem;
    resize: vertical;
    width: 100%;
}

.dpfm-ai-composer-actions span {
    color: var(--dpfm-muted);
    font-size: 0.85rem;
    margin-right: auto;
}

.dpfm-operations-page {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.dpfm-operations-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: flex-end;
}

.dpfm-operations-grid {
    display: grid;
    gap: 1.125rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
}

.dpfm-operations-status-card,
.dpfm-operations-actions-card {
    min-width: 0;
}

.dpfm-operations-status-list {
    display: grid;
    gap: 0.625rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.dpfm-operations-status-list div {
    background: var(--dpfm-surface-muted);
    border: 1px solid var(--dpfm-border);
    border-radius: 0.625rem;
    min-width: 0;
    padding: 0.75rem;
}

.dpfm-operations-status-list dt {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.dpfm-operations-status-list dd {
    color: var(--dpfm-text);
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.dpfm-operations-empty-state,
.dpfm-operations-confirmation,
.dpfm-operations-operation {
    background: var(--dpfm-surface-muted);
    border: 1px solid var(--dpfm-border);
    border-radius: 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.875rem;
}

.dpfm-operations-empty-state span {
    color: var(--dpfm-muted);
    font-weight: 700;
}

.dpfm-operations-actions,
.dpfm-operations-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.dpfm-operations-action {
    display: flex;
    flex: 1 1 9rem;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 9rem;
}

.dpfm-operations-action .dpfm-btn {
    width: 100%;
}

.dpfm-operations-action p {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 0;
}

.dpfm-operations-confirmation {
    background: #fff7f7;
    border-color: var(--dpfm-red);
    margin-top: 0.875rem;
}

.dpfm-operations-operation {
    margin-top: 0.875rem;
}

.dpfm-operations-operation h3 {
    color: var(--dpfm-navy);
    font-size: 1rem;
    margin: 0;
}

.dpfm-operations-diagnostics {
    border-top: 1px solid var(--dpfm-border);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.75rem;
}

.dpfm-operations-diagnostics h4 {
    color: var(--dpfm-navy);
    font-size: 0.92rem;
    margin: 0;
}

.dpfm-operations-diagnostics ul {
    color: var(--dpfm-text);
    font-size: 0.86rem;
    line-height: 1.45;
    margin: 0;
    padding-left: 1.1rem;
}

.dpfm-operations-diagnostics li {
    overflow-wrap: anywhere;
}

@media (max-width: 920px) {
    .dpfm-ai-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-ai-context-card {
        position: static;
    }

    .dpfm-operations-grid,
    .dpfm-operations-status-list {
        grid-template-columns: 1fr;
    }
}

.dpfm-detail-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dpfm-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: flex-end;
}

.dpfm-button-secondary,
.dpfm-btn-secondary,
.dpfm-btn-outline {
    background: var(--dpfm-white);
    border-color: var(--dpfm-blue);
    color: var(--dpfm-blue);
}

.dpfm-button-secondary:hover,
.dpfm-btn-secondary:hover,
.dpfm-btn-outline:hover {
    background: #eef3f8;
    border-color: var(--dpfm-button-hover-blue);
    color: var(--dpfm-blue);
}

.dpfm-button-secondary:active,
.dpfm-btn-secondary:active,
.dpfm-btn-outline:active {
    background: #dce8f3;
    border-color: var(--dpfm-button-active-blue);
    color: var(--dpfm-button-active-blue);
}

.dpfm-table-action {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.dpfm-table-status {
    vertical-align: middle;
    white-space: nowrap;
}

.dpfm-organizations-settings-table {
    table-layout: fixed;
}

.dpfm-organizations-domain-stack {
    display: grid;
    gap: 1.5rem;
}

.dpfm-organizations-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.dpfm-organizations-section-card {
    align-self: start;
}

.dpfm-organizations-subsection-header {
    margin-top: 1.5rem;
}

.dpfm-relationship-heading-content {
    display: grid;
    gap: 0.55rem;
}

.dpfm-organizations-settings-table col.dpfm-table-status,
.dpfm-organizations-settings-table .dpfm-table-status {
    text-align: center;
    width: 140px;
}

.dpfm-organizations-settings-table col.dpfm-table-action,
.dpfm-organizations-settings-table .dpfm-table-action {
    text-align: right;
    width: 160px;
}

.dpfm-table-status .dpfm-status-pill,
.dpfm-table-action .dpfm-link-button {
    vertical-align: middle;
}

.dpfm-link-button {
    align-items: center;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-blue);
    border-radius: var(--dpfm-button-radius);
    box-sizing: border-box;
    color: var(--dpfm-blue);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--dpfm-button-font-size);
    font-weight: 700;
    justify-content: center;
    line-height: 1.15;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-compact-min-width);
    padding: 0 0.85rem;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.08s ease;
    vertical-align: middle;
    white-space: nowrap;
}

.dpfm-link-button:hover {
    background: #eef3f8;
    border-color: var(--dpfm-button-hover-blue);
    color: var(--dpfm-button-hover-blue);
    box-shadow: 0 3px 10px rgba(0, 58, 112, 0.10);
}

.dpfm-link-button:active {
    background: #dce8f3;
    border-color: var(--dpfm-button-active-blue);
    color: var(--dpfm-button-active-blue);
    transform: translateY(1px);
}

.dpfm-btn-select,
.dpfm-assignment-select-button {
    border-radius: var(--dpfm-button-radius);
    min-width: var(--dpfm-button-compact-min-width);
    padding: 0 0.8rem;
}

.dpfm-btn-select-selected,
.dpfm-btn-selected,
.dpfm-assignment-select-button-selected,
.dpfm-assignment-select-button-selected:hover {
    background: rgba(0, 58, 112, 0.92);
    border-color: rgba(0, 58, 112, 0.92);
    color: var(--dpfm-white);
}

.dpfm-assignment-select-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dpfm-assignment-select-row-selected {
    background: rgba(0, 58, 112, 0.08);
    box-shadow: inset 3px 0 0 rgba(0, 58, 112, 0.78);
}

.dpfm-details-card h2 {
    color: var(--dpfm-blue);
    margin: 0;
}

.dpfm-details-title {
    align-items: flex-start;
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 1rem;
}

.dpfm-detail-label {
    color: var(--dpfm-muted);
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.dpfm-status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    line-height: 1.15;
    min-height: 1.75rem;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
}

.dpfm-status-active {
    background: #e6f4ea;
    color: #1e7e34;
}

.dpfm-status-inactive {
    background: #f3f5f7;
    color: var(--dpfm-muted);
}

.dpfm-detail-section {
    border-bottom: 1px solid var(--dpfm-border);
    padding: 1.25rem 0;
}

.dpfm-detail-section h3 {
    color: var(--dpfm-blue);
    margin: 0 0 1rem;
}

.dpfm-details-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 0;
}

.dpfm-import-details-grid {
    margin-top: 1.25rem;
}

.dpfm-details-grid div {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    padding: 1rem;
}

.dpfm-details-grid dt {
    color: var(--dpfm-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.dpfm-details-grid dd {
    color: var(--dpfm-text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    min-height: 1.4rem;
}

.dpfm-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

@media (max-width: 720px) {
    .dpfm-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dpfm-detail-header,
    .dpfm-details-title {
        display: block;
    }

    .dpfm-header-actions,
    .dpfm-detail-header .dpfm-button,
    .dpfm-status-pill {
        margin-top: 1rem;
    }

    .dpfm-header-actions {
        justify-content: flex-start;
    }

    .dpfm-content-actions {
        justify-content: flex-start;
    }

    .dpfm-vessels-search-grid {
        grid-template-columns: 1fr;
    }
}

.dpfm-import-card h2,
.dpfm-import-summary-card h2 {
    color: var(--dpfm-blue);
    margin: 0 0 1rem;
}

.dpfm-import-upload {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.dpfm-import-workflow-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dpfm-import-workflow-panel {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.dpfm-import-workflow-panel h3 {
    margin: 0;
}

.dpfm-alert-message {
    background: #fff4e5;
    border: 1px solid #f5c26b;
    border-radius: 12px;
    color: #7a4b00 !important;
    margin-top: 1rem !important;
    padding: 1rem;
}

.dpfm-chip-list,
.dpfm-error-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dpfm-chip-list li {
    background: #eef3f8;
    border: 1px solid var(--dpfm-border);
    border-radius: 999px;
    color: var(--dpfm-blue);
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.dpfm-auditor-chip-list {
    margin-top: 0.15rem;
}

.dpfm-auditor-chip-list li {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    max-width: 100%;
}

.dpfm-auditor-chip-remove {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1;
    padding: 0 0.1rem;
}

.dpfm-auditor-chip-remove:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dpfm-error-list {
    display: block;
    list-style: disc;
    padding-left: 1.5rem;
}

.dpfm-error-list li {
    color: var(--dpfm-red);
    margin-bottom: 0.5rem;
}

.dpfm-data-quality-card {
    margin-top: 0;
}

.dpfm-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dpfm-filter-button {
    align-items: center;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: var(--dpfm-button-radius);
    box-sizing: border-box;
    color: var(--dpfm-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: var(--dpfm-button-font-size);
    font-weight: 700;
    justify-content: center;
    line-height: 1.15;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-compact-min-width);
    padding: 0 0.85rem;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.08s ease;
    white-space: nowrap;
}

.dpfm-filter-button.active,
.dpfm-filter-button:hover {
    background: #eef3f8;
    border-color: var(--dpfm-blue);
    color: var(--dpfm-blue);
}

.dpfm-filter-button:active {
    background: #dce8f3;
    border-color: var(--dpfm-button-active-blue);
    color: var(--dpfm-button-active-blue);
    transform: translateY(1px);
}

.dpfm-person-toggle-group,
.dpfm-fleet-toggle-group,
.dpfm-job-function-toggle-group,
.dpfm-team-toggle-group,
.dpfm-vessel-toggle-group {
    align-items: center;
    gap: var(--dpfm-button-gap);
}

button.dpfm-person-toggle,
button.dpfm-fleet-toggle,
button.dpfm-job-function-toggle,
button.dpfm-team-toggle,
button.dpfm-vessel-toggle {
    align-items: center;
    border-radius: var(--dpfm-button-radius);
    box-sizing: border-box;
    display: inline-flex;
    font-family: inherit;
    font-size: var(--dpfm-button-font-size);
    justify-content: center;
    line-height: 1.15;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-compact-min-width);
    padding: 0 0.85rem;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.08s ease;
    white-space: nowrap;
}

button.dpfm-person-toggle:focus-visible,
button.dpfm-fleet-toggle:focus-visible,
button.dpfm-job-function-toggle:focus-visible,
button.dpfm-team-toggle:focus-visible,
button.dpfm-vessel-toggle:focus-visible {
    outline: 3px solid var(--dpfm-button-focus-ring);
    outline-offset: 2px;
}

.dpfm-alert-count {
    background: #eef3f8;
    border: 1px solid var(--dpfm-border);
    border-radius: 999px;
    color: var(--dpfm-blue);
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.dpfm-data-quality-table tbody tr:hover {
    background: #f8fafc;
}

.dpfm-severity-pill {
    border-radius: 999px;
    display: inline-block;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}

.dpfm-severity-high {
    background: #fde8e8;
    color: #b42318;
}

.dpfm-severity-medium {
    background: #fff4e5;
    color: #7a4b00;
}

.dpfm-severity-low {
    background: #e6f4ea;
    color: #1e7e34;
}

.dpfm-severity-default {
    background: #eef3f8;
    color: var(--dpfm-blue);
}

.dpfm-status-open {
    background: #fff4e5;
    color: #7a4b00;
}

.dpfm-status-closed {
    background: #e6f4ea;
    color: #1e7e34;
}

.dpfm-dashboard-page {
    display: grid;
    gap: 1.5rem;
}

.dpfm-dashboard-hero {
    align-items: center;
    background: linear-gradient(135deg, var(--dpfm-blue), #005294);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 58, 112, 0.18);
    color: var(--dpfm-white);
    display: flex;
    justify-content: space-between;
    padding: 2.25rem;
}

.dpfm-dashboard-hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.6rem);
    line-height: 1;
    margin: 0;
}

.dpfm-page-shell h1:focus,
.dpfm-page-shell h1:focus-visible,
.dpfm-page-shell h1[tabindex="-1"]:focus,
.dpfm-page-shell h1[tabindex="-1"]:focus-visible {
    box-shadow: none;
    outline: none;
}

.dpfm-dashboard-hero p:last-child {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 1rem 0 0;
    max-width: 720px;
}

.dpfm-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dpfm-dashboard-card {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-left: 5px solid var(--dpfm-blue);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 58, 112, 0.08);
    color: inherit;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 0.45rem;
    min-height: 150px;
    padding: 1.25rem;
    text-align: left;
}

.dpfm-dashboard-card:hover,
.dpfm-dashboard-card:focus {
    box-shadow: 0 14px 30px rgba(0, 58, 112, 0.14);
    outline: none;
}

.dpfm-dashboard-card-warning {
    border-left-color: #f5a623;
}

.dpfm-dashboard-card-alert {
    border-left-color: var(--dpfm-red);
}

.dpfm-dashboard-card-label {
    color: var(--dpfm-blue);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dpfm-dashboard-card strong {
    color: var(--dpfm-blue);
    font-size: 2.6rem;
    line-height: 1;
}

.dpfm-dashboard-card span:last-child {
    color: var(--dpfm-muted);
    font-weight: 600;
    line-height: 1.35;
}

.dpfm-dashboard-loading {
    margin-top: 0;
}

.dpfm-dashboard-preview-page {
    display: grid;
    gap: 1.25rem;
    max-width: var(--dpfm-page-max-width);
}

.dpfm-dashboard-analytics {
    gap: 0.85rem;
    max-width: var(--dpfm-page-max-width);
}

.dpfm-dashboard-preview-hero {
    background:
        linear-gradient(135deg, rgba(0, 58, 112, 0.94), rgba(15, 23, 42, 0.96)),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.28), transparent 34%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
    color: var(--dpfm-white);
    padding: 2rem;
}

.dpfm-dashboard-preview-hero-actions,
.dpfm-dashboard-builder-hero {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dpfm-dashboard-preview-hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    margin: 0;
}

.dpfm-dashboard-preview-hero p:last-child {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0.85rem 0 0;
}

.dpfm-dashboard-preview-kpi-grid,
.dpfm-dashboard-preview-chart-grid {
    display: grid;
    gap: 1rem;
}

.dpfm-dashboard-preview-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dpfm-dashboard-preview-kpi-card,
.dpfm-dashboard-preview-chart-card {
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    color: var(--dpfm-dark-text);
    min-width: 0;
}

.dpfm-dashboard-preview-kpi-card {
    border-left: 5px solid #38bdf8;
    display: grid;
    gap: 0.4rem;
    min-height: 142px;
    padding: 1.1rem;
}

.dpfm-dashboard-preview-kpi-warning {
    border-left-color: #f59e0b;
}

.dpfm-dashboard-preview-kpi-danger {
    border-left-color: #ef4444;
}

.dpfm-dashboard-preview-kpi-success {
    border-left-color: #22c55e;
}

.dpfm-dashboard-preview-kpi-label {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dpfm-dashboard-preview-kpi-card strong {
    color: #e0f2fe;
    font-size: 2.45rem;
    line-height: 1;
}

.dpfm-dashboard-preview-kpi-card small {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.35;
}

.dpfm-dashboard-preview-chart-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.dpfm-dashboard-preview-chart-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-dashboard-preview-chart-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dpfm-dashboard-preview-chart-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dpfm-dashboard-preview-chart-card {
    display: grid;
    gap: 0.75rem;
    grid-template-rows: auto minmax(260px, 1fr);
    padding: 1.1rem;
}

.dpfm-dashboard-preview-chart-card header {
    display: grid;
    gap: 0.3rem;
}

.dpfm-dashboard-preview-chart-card h2 {
    color: #f8fafc;
    font-size: 1.05rem;
    line-height: 1.25;
    margin: 0;
}

.dpfm-dashboard-preview-chart-card header span {
    color: #94a3b8;
    font-size: 0.9rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-hero {
    border-radius: 12px;
    padding: 1.35rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-hero h1 {
    font-size: clamp(1.65rem, 2.5vw, 2.45rem);
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-hero p:last-child {
    font-size: 0.95rem;
    margin-top: 0.55rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-grid,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-grid {
    gap: 0.75rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card {
    border-radius: 10px;
    gap: 0.28rem;
    min-height: 108px;
    padding: 0.78rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-label {
    font-size: 0.7rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card strong {
    font-size: 1.85rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card small {
    font-size: 0.78rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card {
    border-radius: 10px;
    gap: 0.52rem;
    grid-template-rows: auto minmax(215px, auto);
    padding: 0.72rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card h2 {
    font-size: 0.92rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card header span {
    font-size: 0.76rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-row,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-row,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-value {
    border-radius: 6px;
    min-height: 1.6rem;
    padding: 0.25rem 0.38rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-label,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-label,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip span:nth-child(2),
.dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-value,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip span:nth-child(3),
.dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-value {
    font-size: 0.72rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-row strong,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip strong,
.dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-values strong {
    font-size: 0.74rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-section-header {
    margin-top: 0;
    padding-top: 0.9rem;
}

.dpfm-dashboard-analytics .dpfm-dashboard-preview-section-header h2 {
    font-size: 1.08rem;
}

.dpfm-dashboard-preview-no-data {
    align-items: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: #bae6fd;
    display: flex;
    font-size: 0.86rem;
    font-weight: 800;
    justify-content: center;
    min-height: 7rem;
    margin: 0;
    padding: 1rem;
}

.dpfm-dashboard-preview-section-header {
    align-items: end;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    display: grid;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding-top: 1.25rem;
}

.dpfm-dashboard-preview-section-header .dpfm-eyebrow {
    margin-bottom: 0.35rem;
}

.dpfm-dashboard-preview-section-header h2 {
    color: #f8fafc;
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0;
}

.dpfm-dashboard-preview-chart-wide {
    grid-column: span 2;
}

.dpfm-dashboard-preview-edit-link {
    align-items: center;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(203, 213, 225, 0.34);
    border-radius: 8px;
    color: #e0f2fe;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 800;
    justify-content: center;
    min-height: 2.5rem;
    min-width: 5.25rem;
    padding: 0 0.9rem;
    text-decoration: none;
}

.dpfm-dashboard-preview-edit-link:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    color: #f8fafc;
}

.dpfm-dashboard-preview-empty,
.dpfm-dashboard-builder-panel,
.dpfm-dashboard-builder-status {
    background: linear-gradient(180deg, rgba(23, 32, 51, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    color: var(--dpfm-dark-text);
}

.dpfm-dashboard-preview-empty {
    display: grid;
    gap: 0.85rem;
    padding: 1.25rem;
}

.dpfm-dashboard-preview-empty h2 {
    color: #f8fafc;
    font-size: 1.15rem;
    margin: 0;
}

.dpfm-dashboard-preview-chart-card .apexcharts-canvas,
.dpfm-dashboard-preview-chart-card .apexcharts-svg {
    max-width: 100%;
}

.dpfm-dashboard-preview-chart-breakdown,
.dpfm-dashboard-preview-stacked-breakdown {
    display: grid;
    gap: 0.45rem;
    margin-top: -0.15rem;
}

.dpfm-dashboard-preview-breakdown-row {
    align-items: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 2rem;
    padding: 0.38rem 0.55rem;
}

.dpfm-dashboard-preview-breakdown-label {
    align-items: center;
    color: #dbeafe;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 0.45rem;
    min-width: 0;
}

.dpfm-dashboard-preview-breakdown-swatch {
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.18);
    flex: 0 0 auto;
    height: 0.62rem;
    width: 0.62rem;
}

.dpfm-dashboard-preview-breakdown-value,
.dpfm-dashboard-preview-stacked-chip span:nth-child(3) {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
}

.dpfm-dashboard-preview-breakdown-row strong,
.dpfm-dashboard-preview-stacked-chip strong,
.dpfm-dashboard-preview-trend-values strong {
    color: #e0f2fe;
    font-size: 0.86rem;
    font-weight: 800;
}

.dpfm-dashboard-preview-stacked-row {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(7.5rem, 0.8fr) minmax(0, 1.4fr);
    padding: 0.48rem 0.55rem;
}

.dpfm-dashboard-preview-stacked-label {
    align-self: center;
    color: #dbeafe;
    font-size: 0.86rem;
    font-weight: 800;
}

.dpfm-dashboard-preview-stacked-values {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-dashboard-preview-stacked-chip {
    align-items: center;
    background: rgba(30, 41, 59, 0.76);
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-width: 0;
    padding: 0.32rem 0.45rem;
}

.dpfm-dashboard-preview-stacked-chip span:nth-child(2) {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 0;
}

.dpfm-dashboard-preview-trend-values {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(auto-fit, minmax(4.6rem, 1fr));
}

.dpfm-dashboard-preview-trend-value {
    align-items: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: #94a3b8;
    display: flex;
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0.32rem 0.5rem;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-label,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card small,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card header span {
    color: #475569;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-kpi-card strong,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-chart-card h2,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-section-header h2 {
    color: #0f172a;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-no-data,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-row,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-row,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-value {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.34);
    color: #334155;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip {
    background: #eef6ff;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-label,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-label,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip span:nth-child(2) {
    color: #1e293b;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-value,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip span:nth-child(3),
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-value {
    color: #475569;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-breakdown-row strong,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-stacked-chip strong,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-trend-values strong {
    color: #075985;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .dpfm-dashboard-preview-section-header {
    border-top-color: rgba(148, 163, 184, 0.34);
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .apexcharts-text,
html:not([data-theme="dark"]) .dpfm-dashboard-analytics .apexcharts-legend-text {
    color: #334155 !important;
    fill: #334155 !important;
}

html:not([data-theme="dark"]) .dpfm-dashboard-analytics .apexcharts-gridline {
    stroke: rgba(148, 163, 184, 0.36) !important;
}

.dpfm-dashboard-builder-page {
    display: grid;
    gap: 1.25rem;
    max-width: var(--dpfm-page-max-width);
}

.dpfm-dashboard-builder-actions,
.dpfm-dashboard-builder-card-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.dpfm-dashboard-builder-status {
    color: #dbeafe;
    font-weight: 800;
    padding: 0.85rem 1rem;
}

.dpfm-dashboard-builder-panel {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
}

.dpfm-dashboard-builder-panel > header,
.dpfm-dashboard-builder-chart-card > header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dpfm-dashboard-builder-panel h2,
.dpfm-dashboard-builder-chart-card h3 {
    color: #f8fafc;
    line-height: 1.2;
    margin: 0;
}

.dpfm-dashboard-builder-panel h2 {
    font-size: 1.25rem;
}

.dpfm-dashboard-builder-chart-card h3 {
    font-size: 1.05rem;
}

.dpfm-dashboard-builder-global-grid,
.dpfm-dashboard-builder-fields {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dpfm-dashboard-builder-global-grid label,
.dpfm-dashboard-builder-fields label {
    display: grid;
    gap: 0.35rem;
}

.dpfm-dashboard-builder-global-grid label > span,
.dpfm-dashboard-builder-fields label > span,
.dpfm-dashboard-builder-position {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dpfm-dashboard-builder-global-grid input,
.dpfm-dashboard-builder-global-grid select,
.dpfm-dashboard-builder-fields input,
.dpfm-dashboard-builder-fields select {
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    color: #e5eef7;
    min-height: 2.45rem;
    padding: 0 0.7rem;
    width: 100%;
}

.dpfm-dashboard-builder-toggle {
    align-items: center;
    color: #dbeafe;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 0.5rem;
}

.dpfm-dashboard-builder-toggle input {
    accent-color: #38bdf8;
    height: 1rem;
    width: 1rem;
}

.dpfm-dashboard-builder-chart-list {
    display: grid;
    gap: 1rem;
}

.dpfm-dashboard-builder-chart-card {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.dpfm-dashboard-builder-section {
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
}

.dpfm-dashboard-builder-section h4 {
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}

.dpfm-dashboard-builder-section-actions {
    background: transparent;
    border-color: transparent;
    padding: 0;
}

.dpfm-dashboard-builder-helper {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 8px;
    color: #bae6fd;
    font-size: 0.86rem;
    font-weight: 800;
    margin: 0;
    padding: 0.6rem 0.7rem;
}

.dpfm-dashboard-builder-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dpfm-dashboard-builder-selection-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
}

.dpfm-dashboard-builder-selection-header > span {
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 900;
}

.dpfm-dashboard-builder-item-selection {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dpfm-dashboard-builder-selection-item {
    align-items: center;
    background: rgba(30, 41, 59, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: #dbeafe;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.35rem 0.5rem;
}

.dpfm-dashboard-builder-selection-item input {
    accent-color: #38bdf8;
}

@media (max-width: 900px) {
    .dpfm-dashboard-preview-chart-grid-2,
    .dpfm-dashboard-preview-chart-grid-3,
    .dpfm-dashboard-preview-chart-grid-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .dpfm-dashboard-preview-chart-wide {
        grid-column: span 1;
    }

    .dpfm-dashboard-preview-stacked-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .dpfm-dashboard-preview-hero {
        padding: 1.4rem;
    }

    .dpfm-dashboard-preview-hero-actions,
    .dpfm-dashboard-builder-hero,
    .dpfm-dashboard-builder-panel > header,
    .dpfm-dashboard-builder-chart-card > header {
        align-items: stretch;
        flex-direction: column;
    }

    .dpfm-dashboard-builder-actions,
    .dpfm-dashboard-builder-card-actions {
        justify-content: flex-start;
    }

    .dpfm-dashboard-preview-chart-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dpfm-dashboard-preview-stacked-values {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dpfm-quick-access-card {
    display: grid;
    gap: 1.25rem;
    margin-top: 0;
}

.dpfm-quick-access-card h2 {
    color: var(--dpfm-blue);
    margin: 0 0 0.5rem;
}

.dpfm-quick-access-card p:last-child {
    color: var(--dpfm-muted);
    margin: 0;
}

.dpfm-quick-access-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dpfm-quick-access-link {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    color: var(--dpfm-text);
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dpfm-quick-access-link:hover {
    border-color: var(--dpfm-blue);
    box-shadow: 0 10px 24px rgba(0, 58, 112, 0.1);
    color: var(--dpfm-text);
    transform: translateY(-1px);
}

.dpfm-quick-access-link span {
    color: var(--dpfm-blue);
    font-weight: 800;
}

.dpfm-quick-access-link small {
    color: var(--dpfm-muted);
    line-height: 1.4;
}

@media (max-width: 720px) {
    .dpfm-dashboard-hero {
        padding: 1.5rem;
    }
}

.dpfm-reference-grid {
    display: grid;
    gap: 1.25rem;
}

.dpfm-reference-card {
    margin-top: 0;
}

.dpfm-reference-card-header {
    align-items: center;
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.dpfm-reference-card h2 {
    color: var(--dpfm-blue);
    margin: 0;
}

.dpfm-reference-count {
    background: #eef3f8;
    border: 1px solid var(--dpfm-border);
    border-radius: 999px;
    color: var(--dpfm-blue);
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
}

.dpfm-vessel-business-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: flex-end;
}

.dpfm-vessel-business-header {
    align-items: center;
}

.dpfm-vessel-business-header h2,
.dpfm-vessel-business-header p {
    margin: 0;
}

.dpfm-vessel-business-action {
    gap: 0.45rem;
    min-width: var(--dpfm-button-compact-min-width);
}

.dpfm-reference-table th:first-child,
.dpfm-reference-table td:first-child {
    width: 120px;
}

.dpfm-reference-table tbody tr:hover {
    background: #f8fafc;
}

.dpfm-dp-register-module-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.dpfm-dp-register-module-card {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    min-height: 160px;
    padding: 1.1rem;
}

.dpfm-dp-register-module-card h3 {
    color: var(--dpfm-blue);
    margin: 0 0 0.45rem;
}

.dpfm-dp-register-module-card p {
    color: var(--dpfm-muted);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 720px) {
    .dpfm-reference-card-header {
        display: block;
    }

    .dpfm-reference-count {
        display: inline-block;
        margin-top: 1rem;
    }

    .dpfm-vessel-business-actions {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

.dpfm-vessel-profile {
    display: grid;
    gap: 1.25rem;
}

.dpfm-vessel-detail-page {
    max-width: var(--dpfm-page-max-width);
}

.dpfm-vessel-detail-domain-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-vessel-detail-count-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dpfm-vessel-detail-count-card {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
}

.dpfm-vessel-detail-count-card span {
    color: var(--dpfm-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dpfm-vessel-detail-count-card strong {
    color: var(--dpfm-blue);
    font-size: 1.45rem;
    line-height: 1;
}

.dpfm-vessel-summary {
    align-items: flex-start;
    border-left: 6px solid var(--dpfm-red);
    box-shadow: 0 12px 30px rgba(0, 58, 112, 0.08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 0;
}

.dpfm-vessel-summary h2 {
    color: var(--dpfm-blue);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.1;
    margin: 0;
}

.dpfm-vessel-summary p {
    margin-top: 0.75rem;
}

.dpfm-vessel-status-list {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dpfm-details-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-detail-section-card {
    display: grid;
    gap: 0.75rem;
    margin-top: 0;
}

.dpfm-vessel-detail-list {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 0;
}

.dpfm-vessel-detail-field {
    border-bottom: 1px solid var(--dpfm-border);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(9rem, 0.42fr) 1fr;
    min-height: 2.65rem;
    padding: 0.7rem 0;
}

.dpfm-vessel-detail-field dt {
    color: var(--dpfm-muted);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.35;
    padding-right: 0.85rem;
}

.dpfm-vessel-detail-field dd {
    color: var(--dpfm-text);
    font-weight: 400;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
}

.dpfm-vessel-detail-field:nth-child(even) {
    border-left: 1px solid var(--dpfm-border);
    padding-left: 0.85rem;
}

.dpfm-section-heading {
    align-items: center;
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
}

.dpfm-section-heading h2,
.dpfm-section-heading h3 {
    color: var(--dpfm-blue);
    margin: 0;
}

.dpfm-section-heading.dpfm-organizations-domain-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}

.dpfm-section-heading.dpfm-organizations-domain-heading h2 {
    color: var(--dpfm-blue);
    margin: 0;
}

.dpfm-section-heading.dpfm-organizations-domain-heading-actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

.dpfm-section-number {
    background: var(--dpfm-blue);
    border-radius: 999px;
    color: var(--dpfm-white);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.55rem;
}

.dpfm-quality-section {
    border-left: 5px solid var(--dpfm-blue);
}

.dpfm-quality-section p {
    color: var(--dpfm-muted);
    margin: 0;
}

@media (max-width: 920px) {
    .dpfm-details-layout,
    .dpfm-vessel-detail-domain-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dpfm-vessel-summary {
        display: block;
    }

    .dpfm-vessel-detail-list {
        grid-template-columns: 1fr;
    }

    .dpfm-vessel-detail-field {
        gap: 0.3rem;
        grid-template-columns: 1fr;
    }

    .dpfm-vessel-detail-field:nth-child(even) {
        border-left: 0;
        padding-left: 0;
    }

    .dpfm-vessel-status-list {
        align-items: flex-start;
        margin-top: 1rem;
    }
}

.dpfm-vessels-page {
    display: grid;
    gap: 1.5rem;
}

.dpfm-vessels-header {
    align-items: stretch;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
}

.dpfm-count-card {
    align-self: center;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-left: 5px solid var(--dpfm-red);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 58, 112, 0.08);
    display: grid;
    min-width: 210px;
    padding: 1rem 1.25rem;
}

.dpfm-count-value {
    color: var(--dpfm-blue);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.dpfm-count-label {
    color: var(--dpfm-text);
    font-weight: 700;
    margin-top: 0.35rem;
}

.dpfm-count-total,
.dpfm-search-help {
    color: var(--dpfm-muted);
    font-size: 0.9rem;
}

.dpfm-count-total {
    margin-top: 0.25rem;
}

.dpfm-vessels-toolbar {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    padding: 1rem;
}

.dpfm-search-help {
    margin: 0.25rem 0 0;
}

.dpfm-vessel-search-input {
    background: var(--dpfm-white);
    min-width: min(100%, 380px);
}

.dpfm-vessels-table {
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 10px 28px rgba(0, 58, 112, 0.06);
}

.dpfm-vessels-table th {
    background: var(--dpfm-blue);
    border-bottom: 0;
    color: var(--dpfm-white);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.dpfm-vessels-table td {
    border-bottom: 1px solid #e7ecf2;
    vertical-align: middle;
}

.dpfm-vessels-table tbody tr:last-child td {
    border-bottom: 0;
}

.dpfm-vessels-table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.dpfm-vessel-management-summary {
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.dpfm-vessel-primary-details,
.dpfm-vessel-management-details {
    margin: 1rem 0 0;
}

.dpfm-vessel-context-band dl {
    margin: 0;
}

.dpfm-vessel-management-title {
    border-bottom: 1px solid var(--dpfm-border);
    margin-bottom: 1rem;
    padding: 1rem 0 1.5rem;
}

.dpfm-vessel-management-title h2 {
    color: var(--dpfm-text);
    font-size: 1.35rem;
    margin: 0;
}

.dpfm-vessel-primary-details div,
.dpfm-vessel-management-details div,
.dpfm-vessel-context-zone div {
    align-items: baseline;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(145px, 0.85fr) minmax(0, 1.15fr);
    padding: 0.22rem 0;
}

.dpfm-vessel-primary-details dt,
.dpfm-vessel-management-details dt,
.dpfm-vessel-context-zone dt {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dpfm-vessel-primary-details dd,
.dpfm-vessel-management-details dd,
.dpfm-vessel-context-zone dd {
    color: var(--dpfm-text);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.dpfm-vessel-context-band {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-vessel-context-zone + .dpfm-vessel-context-zone {
    border-left: 1px solid var(--dpfm-border);
    padding-left: 1rem;
}

.dpfm-vessel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dpfm-vessel-tab {
    background: #eef3f8;
    border: 1px solid var(--dpfm-border);
    border-radius: 6px;
    color: var(--dpfm-blue);
    cursor: pointer;
    flex: 1 1 128px;
    font: inherit;
    font-weight: 800;
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
    text-align: center;
}

.dpfm-vessel-tab:hover,
.dpfm-vessel-tab-active {
    background: var(--dpfm-blue);
    border-color: var(--dpfm-blue);
    color: var(--dpfm-white);
}

.dpfm-vessel-tab-card {
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    min-height: 5rem;
    padding: 1rem;
}

.dpfm-vessel-tab-card-header {
    align-items: center;
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.dpfm-vessel-tab-card-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dpfm-vessel-tab-card-header h3 {
    color: var(--dpfm-blue);
    font-size: 1.05rem;
    margin: 0;
}

.dpfm-vessel-equipment-quick-table th,
.dpfm-vessel-equipment-quick-table td {
    white-space: nowrap;
}

.dpfm-table-id {
    color: var(--dpfm-blue);
    font-weight: 800;
    white-space: nowrap;
}

.dpfm-vessel-name {
    color: var(--dpfm-text);
    font-weight: 700;
    min-width: 170px;
}

.dpfm-dp-class-badge {
    background: #eef3f8;
    border: 1px solid rgba(0, 58, 112, 0.22);
    border-radius: 999px;
    color: var(--dpfm-blue);
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.dpfm-dp-class-badge-neutral {
    background: #f3f5f7;
    border-color: var(--dpfm-border);
    color: var(--dpfm-muted);
}

.dpfm-vessel-open-button {
    background: var(--dpfm-white);
    color: var(--dpfm-blue);
}

.dpfm-vessel-open-button:hover {
    border-color: var(--dpfm-red);
    color: var(--dpfm-red);
}

@media (max-width: 820px) {
    .dpfm-page-header,
    .dpfm-vessels-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dpfm-count-card {
        margin-top: 1rem;
    }

    .dpfm-vessels-toolbar {
        align-items: stretch;
    }

    .dpfm-ai-header-title-row,
    .dpfm-ai-header-subtitle-row,
    .dpfm-ai-header-buttons,
    .dpfm-ai-header-status {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
        width: 100%;
    }

    .dpfm-ai-header-buttons .dpfm-btn,
    .dpfm-ai-card-header .dpfm-btn,
    .dpfm-ai-card-header .dpfm-link-button,
    .dpfm-ai-composer-actions .dpfm-btn {
        width: 100%;
    }

    .dpfm-ai-card-header,
    .dpfm-ai-composer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dpfm-ai-composer-actions span {
        margin-right: 0;
    }

    .dpfm-vessel-search-input {
        width: 100%;
    }

    .dpfm-vessel-context-band {
        grid-template-columns: 1fr;
    }

    .dpfm-vessel-context-zone + .dpfm-vessel-context-zone {
        border-left: 0;
        border-top: 1px solid var(--dpfm-border);
        padding-left: 0;
        padding-top: 1rem;
    }

    .dpfm-vessel-primary-details div,
    .dpfm-vessel-management-details div,
    .dpfm-vessel-context-zone div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .dpfm-vessel-tab-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dpfm-vessel-tab-card-summary {
        align-items: flex-start;
    }
}

.dpfm-fleets-page,
.dpfm-personnel-page,
.dpfm-fleet-assignments-page,
.dpfm-equipment-page,
.dpfm-assignments-dashboard-page {
    display: grid;
    gap: 1.5rem;
}

.dpfm-fleets-header,
.dpfm-personnel-header,
.dpfm-fleet-assignments-header,
.dpfm-equipment-header,
.dpfm-assignments-dashboard-header {
    margin-bottom: 0;
}

.dpfm-fleets-card,
.dpfm-personnel-card,
.dpfm-fleet-assignments-card,
.dpfm-equipment-card,
.dpfm-assignments-dashboard-card {
    margin-top: 0;
}

.dpfm-dashboard-card-success {
    border-left-color: #1e7e34;
}

.dpfm-fleets-toolbar,
.dpfm-personnel-toolbar,
.dpfm-fleet-assignments-toolbar,
.dpfm-equipment-toolbar {
    align-items: flex-end;
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    padding: 1rem;
}

.dpfm-fleet-controls,
.dpfm-personnel-controls,
.dpfm-fleet-assignment-controls,
.dpfm-equipment-controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.dpfm-fleet-search-input,
.dpfm-personnel-search-input,
.dpfm-fleet-assignment-search-input,
.dpfm-equipment-search-input {
    background: var(--dpfm-white);
    min-width: min(100%, 340px);
}

.dpfm-filter-select-label {
    color: var(--dpfm-blue);
    display: grid;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.35rem;
}

.dpfm-filter-select {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 10px;
    color: var(--dpfm-text);
    font: inherit;
    min-width: 210px;
    padding: 0.72rem 0.9rem;
}

.dpfm-filter-select:focus {
    border-color: var(--dpfm-blue);
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.12);
    outline: none;
}

.dpfm-fmea-form-card {
    padding: 1.35rem 1.35rem 1.55rem;
}

.dpfm-fmea-form-card form {
    display: grid;
    gap: 1.2rem;
    margin-top: 1.15rem;
    max-width: 1120px;
}

.dpfm-fmea-form-layout {
    display: grid;
    gap: 1.15rem;
    min-width: 0;
}

.dpfm-fmea-form-card .dpfm-content-actions {
    border-top: 1px solid var(--dpfm-border);
    margin-top: 0.45rem;
    padding-bottom: 0.1rem;
    padding-top: 1.25rem;
}

.dpfm-form-actions-with-danger {
    align-items: center;
    justify-content: space-between;
}

.dpfm-form-primary-actions,
.dpfm-form-danger-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
}

.dpfm-document-delete-confirmation {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.35),
        0 0 0 100vmax rgba(15, 23, 42, 0.68);
    color: var(--dpfm-text);
    display: grid;
    gap: 1rem;
    left: 50%;
    max-height: calc(100vh - 2rem);
    max-width: 32rem;
    overflow: auto;
    padding: 1.25rem;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(calc(100vw - 2rem), 32rem);
    z-index: 1000;
}

.dpfm-document-delete-confirmation > p,
.dpfm-document-delete-confirmation > .dpfm-alert-message {
    background: #fff7df;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #7a4a00;
    font-weight: 700;
    margin: 0;
    padding: 1rem;
}

.dpfm-document-delete-confirmation > strong {
    color: var(--dpfm-text);
    font-size: 1.2rem;
}

.dpfm-document-delete-confirmation h2 {
    color: var(--dpfm-text);
}

.dpfm-document-delete-confirmation .dpfm-content-actions,
.dpfm-document-delete-confirmation .dpfm-detail-actions,
.dpfm-document-delete-confirmation .dpfm-form-actions,
.dpfm-document-delete-confirmation .dpfm-form-primary-actions,
.dpfm-document-delete-confirmation .dpfm-edit-card-actions {
    justify-content: flex-end;
    margin: 0;
}

.dpfm-cmf-vessel-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: space-between;
    margin: 0.9rem 0 0.65rem;
}

.dpfm-cmf-vessel-toolbar .dpfm-cmf-vessel-summary {
    margin: 0;
}

.dpfm-cmf-vessel-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
}

.dpfm-cmf-reset-button,
.dpfm-cmf-action-button {
    min-height: 2rem;
    min-width: var(--dpfm-button-compact-min-width);
    padding: 0 0.75rem;
}

.dpfm-cmf-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.dpfm-fmea-form-group {
    border-top: 1px solid var(--dpfm-border);
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    padding-top: 1rem;
}

.dpfm-fmea-form-group:first-child {
    border-top: 0;
    padding-top: 0;
}

.dpfm-fmea-form-group h3,
.dpfm-fmea-form-group h4 {
    color: var(--dpfm-blue);
    font-size: 0.98rem;
    line-height: 1.25;
    margin: 0;
}

.dpfm-fmea-field-grid {
    column-gap: 32px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    row-gap: 18px;
}

.dpfm-organization-location-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dp-trial-report-grid-two {
    align-items: start;
    column-gap: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 18px;
}

.dp-trial-report-grid-three {
    align-items: start;
    column-gap: 32px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
    row-gap: 18px;
}

.dp-trial-report-grid-two > *,
.dp-trial-report-grid-three > * {
    min-width: 0;
}

.dp-trial-report-grid-two .dpfm-form-field,
.dp-trial-report-grid-three .dpfm-form-field {
    align-content: start;
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.dp-trial-report-grid-two .dpfm-form-field label,
.dp-trial-report-grid-three .dpfm-form-field label {
    color: var(--dpfm-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.dp-trial-report-grid-two input,
.dp-trial-report-grid-two select,
.dp-trial-report-grid-two textarea,
.dp-trial-report-grid-three input,
.dp-trial-report-grid-three select,
.dp-trial-report-grid-three textarea {
    box-sizing: border-box;
    width: 100%;
}

.dp-trial-report-grid-two .dpfm-form-field .dpfm-search-input,
.dp-trial-report-grid-three .dpfm-form-field .dpfm-search-input {
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 2.75rem;
    min-width: 0;
    padding: 0.72rem 0.9rem;
    width: 100%;
}

.dp-trial-report-grid-two .dpfm-form-field .validation-message,
.dp-trial-report-grid-three .dpfm-form-field .validation-message {
    color: var(--dpfm-red);
    font-size: 0.86rem;
}

.dpfm-fmea-field {
    align-content: start;
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.dpfm-fmea-field label {
    color: var(--dpfm-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.dpfm-fmea-field .dpfm-search-input {
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 2.75rem;
    min-width: 0;
    padding: 0.72rem 0.9rem;
    width: 100%;
}

.dpfm-fmea-field textarea.dpfm-search-input {
    min-height: 5.75rem;
    resize: vertical;
}

.dpfm-fmea-field .dpfm-checkbox-field {
    align-items: center;
    color: var(--dpfm-text);
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 0.55rem;
    letter-spacing: 0;
    min-height: 2.75rem;
    text-transform: none;
}

.dpfm-fmea-field .dpfm-checkbox-field input {
    accent-color: var(--dpfm-blue);
    height: 1.05rem;
    width: 1.05rem;
}

.dpfm-status-toggle {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    min-height: 2.75rem;
}

.dpfm-status-toggle-button {
    min-width: 5.75rem;
}

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

.dpfm-fmea-field .validation-message {
    color: var(--dpfm-red);
    font-size: 0.86rem;
}

.dpfm-fleets-table tbody tr:hover,
.dpfm-personnel-table tbody tr:hover,
.dpfm-fleet-assignments-table tbody tr:hover,
.dpfm-equipment-table tbody tr:hover,
.dpfm-assignments-dashboard-table tbody tr:hover {
    background: #f8fafc;
}

@media (max-width: 1080px) {
    .dpfm-fmea-field-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dp-trial-report-grid-two,
    .dp-trial-report-grid-three {
        grid-template-columns: 1fr;
    }
}

.dpfm-fleet-name,
.dpfm-personnel-name,
.dpfm-equipment-name {
    color: var(--dpfm-text);
    font-weight: 700;
    min-width: 180px;
}

@media (max-width: 820px) {
    .dpfm-fleets-toolbar,
    .dpfm-personnel-toolbar,
    .dpfm-fleet-assignments-toolbar,
    .dpfm-equipment-toolbar {
        align-items: stretch;
    }

    .dpfm-fleet-controls,
    .dpfm-personnel-controls,
    .dpfm-fleet-assignment-controls,
    .dpfm-equipment-controls,
    .dpfm-fleet-search-input,
    .dpfm-personnel-search-input,
    .dpfm-fleet-assignment-search-input,
    .dpfm-equipment-search-input,
    .dpfm-filter-select-label,
    .dpfm-filter-select {
        width: 100%;
    }

    .dpfm-filter-grid-two,
    .dpfm-filter-grid-one,
    .dpfm-filter-grid-actions {
        grid-template-columns: 1fr;
    }

    .dpfm-fmea-form-card {
        padding: 1rem;
    }

    .dpfm-fmea-field-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-fmea-field {
        gap: 0.35rem;
    }
}

.dpfm-findings-page {
    display: grid;
    gap: 1.25rem;
}

.dpfm-findings-card {
    margin-top: 0;
}

.dpfm-findings-card h2 {
    color: var(--dpfm-blue);
    margin: 0 0 1rem;
}

.dpfm-findings-filters {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 1rem;
}

.dpfm-filter-row-secondary {
    align-items: end;
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.dpfm-filter-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-filter-grid-one {
    grid-template-columns: minmax(0, 1fr);
}

.dpfm-filter-grid-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(1rem, 1fr) auto;
}

.dpfm-filter-grid-one-action .dpfm-filter-clear-action {
    grid-column: 4;
}

.dpfm-filter-clear-action {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.dpfm-filter-row-secondary .dpfm-filter-select {
    min-width: 0;
    width: 100%;
}

.dpfm-filter-row-secondary .dpfm-search-input {
    min-width: 0;
    width: 100%;
}

.dpfm-dp-trials-filter-grid {
    grid-template-columns:
        minmax(14rem, 1.35fr)
        minmax(13rem, 1.35fr)
        minmax(10rem, 0.9fr)
        minmax(10rem, 0.9fr)
        minmax(12rem, 1fr);
}

.dpfm-dp-trials-search-filter {
    grid-column: 1 / -1;
}

.dpfm-dp-trials-vessel-filter {
    min-width: 14rem;
}

.dpfm-dp-trials-search-filter .dpfm-search-input {
    width: 100%;
}

.dpfm-vessel-name-table th:first-child,
.dpfm-vessel-name-table td:first-child {
    min-width: 13.5rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.dpfm-dp-trials-planning-card {
    margin-top: 1.25rem;
}

.dpfm-dp-trials-planning-card h2 {
    margin: 0;
}

.dpfm-dp-trials-planning-filters {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(18rem, auto) repeat(3, minmax(12rem, 1fr));
    margin-bottom: 1rem;
}

.dpfm-dp-trials-planning-filters-compact {
    grid-template-columns: minmax(18rem, max-content);
    justify-content: start;
}

.dpfm-dp-trials-planning-window {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dpfm-dp-trials-planning-window .dpfm-filter-button {
    min-height: 2.65rem;
    white-space: nowrap;
}

.dpfm-dp-trials-table,
.dpfm-dp-trials-planning-table {
    table-layout: fixed;
}

.dpfm-dp-trials-planning-table {
    min-width: 1120px;
}

.dpfm-dp-trials-vessel-column {
    width: 24%;
}

@media (max-width: 820px) {
    .dpfm-filter-grid-actions {
        grid-template-columns: 1fr;
    }

    .dpfm-filter-grid-one-action .dpfm-filter-clear-action {
        grid-column: auto;
    }

    .dpfm-dp-trials-filter-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-dp-trials-planning-filters {
        grid-template-columns: 1fr;
    }

    .dpfm-filter-clear-action {
        justify-content: stretch;
    }

    .dpfm-filter-clear-action .dpfm-button {
        width: 100%;
    }
}

@media (max-width: 1100px) and (min-width: 821px) {
    .dpfm-dp-trials-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dpfm-findings-table tbody tr:hover {
    background: #f8fafc;
}

.dpfm-dp-equipment-kpi-card {
    cursor: pointer;
}

.dpfm-dp-equipment-kpi-card-active {
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.18), 0 14px 30px rgba(0, 58, 112, 0.14);
}

.dpfm-dp-equipment-filter-status {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dpfm-button-gap);
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dpfm-dp-equipment-filter-status span {
    color: var(--dpfm-muted);
    font-weight: 700;
}

.dpfm-dp-equipment-search-filter {
    grid-column: 1 / -1;
}

.dpfm-dp-equipment-search-filter .dpfm-search-input {
    width: 100%;
}

.dpfm-dp-equipment-table {
    min-width: 1120px;
}

.dpfm-finding-long-text {
    color: var(--dpfm-text);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.dpfm-finding-section-table {
    margin-top: 1rem;
}

.dpfm-analytics-page {
    max-width: var(--dpfm-page-max-width);
}

.dpfm-analytics-kpi-grid,
.dpfm-analytics-grid,
.dpfm-analytics-suggestion-grid {
    display: grid;
    gap: 1rem;
}

.dpfm-analytics-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dpfm-analytics-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.dpfm-analytics-kpi-card,
.dpfm-analytics-suggestion-card {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-left: 5px solid var(--dpfm-blue);
    border-radius: 14px;
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 1rem;
}

.dpfm-analytics-kpi-card.attention {
    border-left-color: var(--dpfm-red);
}

.dpfm-analytics-kpi-card span,
.dpfm-analytics-suggestion-card strong {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dpfm-analytics-kpi-card strong {
    color: var(--dpfm-blue);
    font-size: 2rem;
    line-height: 1;
}

.dpfm-analytics-kpi-card small,
.dpfm-analytics-suggestion-card span {
    color: var(--dpfm-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.dpfm-analytics-chart-card {
    min-width: 0;
}

.dpfm-analytics-bars {
    display: grid;
    gap: 0.8rem;
}

.dpfm-analytics-bar-row {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 2fr) 3rem;
}

.dpfm-analytics-bar-row span {
    color: var(--dpfm-text);
    font-weight: 700;
    min-width: 0;
    overflow-wrap: anywhere;
}

.dpfm-analytics-bar-row strong {
    color: var(--dpfm-blue);
    text-align: right;
}

.dpfm-analytics-progress {
    appearance: none;
    background: #eaf2fa;
    border: 1px solid var(--dpfm-border);
    border-radius: 999px;
    height: 0.85rem;
    overflow: hidden;
    width: 100%;
}

.dpfm-analytics-progress::-webkit-progress-bar {
    background: #eaf2fa;
}

.dpfm-analytics-progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--dpfm-blue), #00a7b5);
    border-radius: 999px;
}

.dpfm-analytics-progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--dpfm-blue), #00a7b5);
    border-radius: 999px;
}

.dpfm-milestone-table {
    font-size: 0.92rem;
}

.dpfm-milestone-table th,
.dpfm-milestone-table td {
    vertical-align: top;
}

.dpfm-analytics-suggestion-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dpfm-analytics-suggestion-card {
    border-left-color: #00a7b5;
}

.dpfm-analytics-limitations {
    border-top: 1px solid var(--dpfm-border);
    display: grid;
    gap: 0.35rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.dpfm-analytics-limitations p {
    color: var(--dpfm-muted);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 720px) {
    .dpfm-analytics-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-analytics-bar-row {
        grid-template-columns: 1fr 3rem;
    }

    .dpfm-analytics-progress {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}


.dpfm-fleet-assignments-table th,
.dpfm-fleet-assignments-table td {
    white-space: nowrap;
}

.dpfm-tbn-row {
    background: #fffaf0;
}

.dpfm-tbn-badge {
    background: #fff4e5;
    border: 1px solid #f5c26b;
    border-radius: 999px;
    color: #7a4b00;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-left: 0.5rem;
    padding: 0.25rem 0.55rem;
    white-space: nowrap;
}

.dpfm-import-file-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.dpfm-import-file-panel {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 12px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

/* Public showcase */
.dpfm-public-site {
    background: var(--dpfm-white);
    color: var(--dpfm-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dpfm-public-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dpfm-public-brand {
    border-left: 4px solid var(--dpfm-red);
    color: var(--dpfm-blue);
    display: grid;
    flex: 0 0 auto;
    font-weight: 800;
    gap: 0.15rem;
    letter-spacing: 0.06em;
    padding-left: 0.75rem;
    text-decoration: none;
}

.dpfm-public-brand small {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.dpfm-public-nav,
.dpfm-public-footer nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dpfm-public-nav a,
.dpfm-public-footer a {
    border-radius: 8px;
    color: var(--dpfm-muted);
    font-weight: 700;
    padding: 0.55rem 0.7rem;
    text-decoration: none;
}

.dpfm-public-nav a:hover,
.dpfm-public-nav a.active,
.dpfm-public-footer a:hover,
.dpfm-public-footer a.active {
    background: #eaf2fa;
    color: var(--dpfm-blue);
}

.dpfm-public-nav .dpfm-public-open-app {
    background: var(--dpfm-blue);
    border: 1px solid var(--dpfm-blue);
    color: var(--dpfm-white);
    margin-left: 0.25rem;
}

.dpfm-public-nav .dpfm-public-open-app:hover {
    background: #005294;
    color: var(--dpfm-white);
}

.dpfm-public-main {
    flex: 1;
    padding: clamp(1rem, 2.8vw, 2.25rem) clamp(1rem, 3vw, 2.5rem);
}

.dpfm-public-home {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.dpfm-public-hero,
.dpfm-public-split {
    align-items: center;
    display: grid;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    grid-template-columns: minmax(300px, 0.9fr) minmax(380px, 1.1fr);
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.dpfm-public-hero {
    margin: 0;
    max-width: none;
    min-height: auto;
    padding: clamp(1rem, 3vh, 2.5rem) 0 clamp(0.75rem, 2vh, 1.5rem);
}

.dpfm-public-hero-copy,
.dpfm-public-content {
    max-width: 720px;
}

.dpfm-public-eyebrow {
    border-left: 4px solid var(--dpfm-red);
    color: var(--dpfm-blue);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    padding-left: 0.75rem;
    text-transform: uppercase;
}

.dpfm-public-hero h1,
.dpfm-public-content h1 {
    color: var(--dpfm-blue);
    font-size: clamp(2.25rem, 3.8vw, 4rem);
    line-height: 1.05;
    margin: 0;
}

.dpfm-public-hero-title:focus,
.dpfm-public-hero-title:focus-visible {
    box-shadow: none;
    outline: none;
}

.dpfm-public-content h1 {
    font-size: clamp(2.1rem, 3.5vw, 3.5rem);
}

.dpfm-public-hero-copy > p:last-of-type,
.dpfm-public-content > p {
    color: var(--dpfm-muted);
    font-size: clamp(1rem, 1vw, 1.1rem);
    line-height: 1.6;
    margin: clamp(0.75rem, 1.5vw, 1rem) 0 0;
    max-width: 540px;
}

.dpfm-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 1.2vw, 0.85rem);
    margin-top: clamp(1.1rem, 2vw, 1.5rem);
}

.dpfm-public-button {
    background: var(--dpfm-blue);
    border: 1px solid var(--dpfm-blue);
    border-radius: var(--dpfm-button-radius);
    color: var(--dpfm-white);
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    font-size: var(--dpfm-button-font-size);
    font-weight: 800;
    justify-content: center;
    min-height: var(--dpfm-button-height);
    min-width: var(--dpfm-button-min-width);
    padding: 0 var(--dpfm-button-padding-x);
    text-decoration: none;
}

.dpfm-public-button:hover {
    background: #005294;
    color: var(--dpfm-white);
}

.dpfm-public-button-secondary {
    background: var(--dpfm-red);
    border-color: var(--dpfm-red);
}

.dpfm-public-button-secondary:hover {
    background: #bf0510;
}

.dpfm-public-button-light {
    background: var(--dpfm-white);
    color: var(--dpfm-blue);
}

.dpfm-public-button-light:hover {
    background: #eaf2fa;
    color: var(--dpfm-blue);
}

.dpfm-public-hero-image,
.dpfm-public-page-image {
    align-items: center;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 20px 45px rgba(0, 58, 112, 0.12);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.dpfm-public-hero-image {
    aspect-ratio: 16 / 9;
    justify-self: end;
    max-height: min(46vh, 460px);
    max-width: 640px;
    padding: clamp(0.5rem, 1vw, 0.875rem);
    width: 100%;
}

.dpfm-public-page-image {
    aspect-ratio: 4 / 3;
}

.dpfm-public-card-image {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: var(--dpfm-white);
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    justify-content: center;
    min-height: clamp(96px, 8vw, 136px);
    overflow: hidden;
}

.dpfm-public-hero-image img,
.dpfm-public-page-image img,
.dpfm-public-card-image img {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center center;
    width: 100%;
}

.dpfm-public-hero-image img {
    height: auto;
    max-height: min(42vh, 420px);
}

.dpfm-public-card-image img {
    object-fit: cover;
}

.dpfm-public-image-placeholder {
    align-items: center;
    background: repeating-linear-gradient(
        135deg,
        #f8fafc,
        #f8fafc 14px,
        #eef3f8 14px,
        #eef3f8 28px
    );
    color: var(--dpfm-muted);
    display: flex;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 800;
    height: 100%;
    justify-content: center;
    letter-spacing: 0.04em;
    min-height: 0;
    padding: 1rem;
    text-align: center;
    width: 100%;
}

.dpfm-public-hero-image .dpfm-public-image-placeholder,
.dpfm-public-page-image .dpfm-public-image-placeholder,
.dpfm-public-card-image .dpfm-public-image-placeholder {
    min-height: 100%;
}

.dpfm-public-feature-grid {
    display: grid;
    gap: clamp(0.875rem, 1.4vw, 1.25rem);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: clamp(1.25rem, 3.5vh, 2.75rem) auto 0;
    max-width: 1200px;
    width: 100%;
}

.dpfm-public-feature-card {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    color: var(--dpfm-text);
    display: grid;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dpfm-public-feature-card:hover {
    border-color: var(--dpfm-blue);
    box-shadow: 0 12px 28px rgba(0, 58, 112, 0.12);
    color: var(--dpfm-text);
    transform: translateY(-2px);
}

.dpfm-public-feature-card span {
    color: var(--dpfm-blue);
    font-size: clamp(0.98rem, 1vw, 1.04rem);
    font-weight: 800;
    padding: clamp(0.8rem, 1.2vw, 1rem) clamp(0.85rem, 1.2vw, 1rem) 0.25rem;
}

.dpfm-public-feature-card p {
    color: var(--dpfm-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    padding: 0 clamp(0.85rem, 1.2vw, 1rem) clamp(0.85rem, 1.2vw, 1rem);
}

.dpfm-public-content {
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 3rem) 0;
}

.dpfm-public-content-inline {
    margin: 0;
}

.dpfm-public-list {
    color: var(--dpfm-muted);
    display: grid;
    gap: 0.6rem;
    line-height: 1.55;
    margin: 1.25rem 0 1.5rem;
    padding-left: 1.25rem;
}

.dpfm-public-definition-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.5rem 0 0;
}

.dpfm-public-definition-list div {
    background: #f8fafc;
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    padding: 1rem;
}

.dpfm-public-definition-list dt {
    color: var(--dpfm-blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.dpfm-public-definition-list dd {
    color: var(--dpfm-text);
    font-weight: 700;
    margin: 0;
}

.dpfm-public-footer {
    align-items: center;
    border-top: 1px solid var(--dpfm-border);
    color: var(--dpfm-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 4vw, 3rem);
}

.dpfm-public-footer span {
    font-weight: 700;
}

@media (max-width: 1100px) {
    .dpfm-public-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .dpfm-public-hero,
    .dpfm-public-split {
        grid-template-columns: 1fr;
    }

    .dpfm-public-hero {
        padding-top: clamp(0.75rem, 2vh, 1.5rem);
    }

    .dpfm-public-hero-copy > p:last-of-type,
    .dpfm-public-content > p {
        max-width: 680px;
    }

    .dpfm-public-hero-image {
        justify-self: center;
        max-width: 760px;
    }

    .dpfm-public-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dpfm-public-main {
        padding: 1rem;
    }

    .dpfm-public-hero {
        padding-bottom: 0.75rem;
    }

    .dpfm-public-hero h1,
    .dpfm-public-content h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .dpfm-public-hero-image {
        max-height: none;
    }

    .dpfm-public-nav a,
    .dpfm-public-footer a {
        padding: 0.5rem 0.6rem;
    }

    .dpfm-public-actions,
    .dpfm-public-button,
    .dpfm-public-nav .dpfm-public-open-app {
        width: 100%;
    }

    .dpfm-public-feature-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-public-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

html[data-theme="dark"] {
    --dpfm-blue: var(--dpfm-dark-blue);
    --dpfm-red: var(--dpfm-dark-red);
    --dpfm-background: var(--dpfm-dark-background);
    --dpfm-border: var(--dpfm-dark-border);
    --dpfm-text: var(--dpfm-dark-text);
    --dpfm-muted: var(--dpfm-dark-muted);
    --dpfm-button-hover-blue: #2563eb;
    --dpfm-button-active-blue: #1d4ed8;
    --dpfm-button-focus-ring: rgba(96, 165, 250, 0.32);
    --dpfm-button-danger-hover: #dc2626;
    --dpfm-button-danger-active: #b91c1c;
    color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background: var(--dpfm-dark-background);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .page,
html[data-theme="dark"] .dpfm-public-main {
    background: var(--dpfm-dark-background);
}

html[data-theme="dark"] a {
    color: #93c5fd;
}

html[data-theme="dark"] .dpfm-topbar,
html[data-theme="dark"] .dpfm-public-header {
    background: rgba(23, 32, 51, 0.98);
    border-bottom-color: var(--dpfm-dark-border);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.38);
}

html[data-theme="dark"] .dpfm-brand,
html[data-theme="dark"] .dpfm-public-brand,
html[data-theme="dark"] .dpfm-page-header h1,
html[data-theme="dark"] .dpfm-card h3,
html[data-theme="dark"] .dpfm-findings-card h2,
html[data-theme="dark"] .dpfm-details-card h2,
html[data-theme="dark"] .dpfm-detail-section h3,
html[data-theme="dark"] .dpfm-import-card h2,
html[data-theme="dark"] .dpfm-import-summary-card h2,
html[data-theme="dark"] .dpfm-dashboard-card-label,
html[data-theme="dark"] .dpfm-dashboard-card strong,
html[data-theme="dark"] .dpfm-quick-access-card h2,
html[data-theme="dark"] .dpfm-quick-access-link span,
html[data-theme="dark"] .dpfm-reference-card h2,
html[data-theme="dark"] .dpfm-vessel-summary h2,
html[data-theme="dark"] .dpfm-section-heading h2,
html[data-theme="dark"] .dpfm-section-heading h3,
html[data-theme="dark"] .dpfm-count-value,
html[data-theme="dark"] .dpfm-table-id,
html[data-theme="dark"] .dpfm-filter-select-label,
html[data-theme="dark"] .dpfm-public-eyebrow,
html[data-theme="dark"] .dpfm-public-hero h1,
html[data-theme="dark"] .dpfm-public-content h1,
html[data-theme="dark"] .dpfm-public-feature-card span,
html[data-theme="dark"] .dpfm-public-definition-list dt,
html[data-theme="dark"] .dpfm-login-brand span,
html[data-theme="dark"] .dpfm-login-title,
html[data-theme="dark"] .dpfm-login-form label,
html[data-theme="dark"] .dpfm-search-label {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-nav a,
html[data-theme="dark"] .dpfm-nav-button,
html[data-theme="dark"] .dpfm-logout-link,
html[data-theme="dark"] .dpfm-public-nav a,
html[data-theme="dark"] .dpfm-public-footer,
html[data-theme="dark"] .dpfm-public-footer a,
html[data-theme="dark"] .dpfm-nav-placeholder,
html[data-theme="dark"] .dpfm-muted-message,
html[data-theme="dark"] .dpfm-empty-message,
html[data-theme="dark"] .dpfm-detail-label,
html[data-theme="dark"] .dpfm-details-grid dt,
html[data-theme="dark"] .dpfm-count-total,
html[data-theme="dark"] .dpfm-search-help,
html[data-theme="dark"] .dpfm-dashboard-card span:last-child,
html[data-theme="dark"] .dpfm-quick-access-link small,
html[data-theme="dark"] .dpfm-quality-section p,
html[data-theme="dark"] .dpfm-public-brand small,
html[data-theme="dark"] .dpfm-public-hero-copy > p:last-of-type,
html[data-theme="dark"] .dpfm-public-content > p,
html[data-theme="dark"] .dpfm-public-list,
html[data-theme="dark"] .dpfm-public-feature-card p,
html[data-theme="dark"] .dpfm-login-brand small,
html[data-theme="dark"] .dpfm-page-header p:last-child {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-nav a.active,
html[data-theme="dark"] .dpfm-nav a:hover,
html[data-theme="dark"] .dpfm-nav-button:hover,
html[data-theme="dark"] .dpfm-nav-dropdown:hover > .dpfm-nav-button,
html[data-theme="dark"] .dpfm-public-nav a:hover,
html[data-theme="dark"] .dpfm-public-nav a.active,
html[data-theme="dark"] .dpfm-public-footer a:hover,
html[data-theme="dark"] .dpfm-public-footer a.active {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-nav-dropdown-menu {
    background: var(--dpfm-dark-surface);
    border-color: var(--dpfm-dark-border);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] .dpfm-card,
html[data-theme="dark"] .dpfm-dashboard-card,
html[data-theme="dark"] .dpfm-analytics-kpi-card,
html[data-theme="dark"] .dpfm-analytics-suggestion-card,
html[data-theme="dark"] .dpfm-quick-access-link,
html[data-theme="dark"] .dpfm-reference-count,
html[data-theme="dark"] .dpfm-count-card,
html[data-theme="dark"] .dpfm-vessels-toolbar,
html[data-theme="dark"] .dpfm-fleets-toolbar,
html[data-theme="dark"] .dpfm-personnel-toolbar,
html[data-theme="dark"] .dpfm-fleet-assignments-toolbar,
html[data-theme="dark"] .dpfm-equipment-toolbar,
html[data-theme="dark"] .dpfm-import-file-panel,
html[data-theme="dark"] .dpfm-import-workflow-panel,
html[data-theme="dark"] .dpfm-login-shell,
html[data-theme="dark"] .dpfm-login-panel,
html[data-theme="dark"] .dpfm-public-site,
html[data-theme="dark"] .dpfm-public-feature-card,
html[data-theme="dark"] .dpfm-public-definition-list div,
html[data-theme="dark"] .dpfm-public-hero-image,
html[data-theme="dark"] .dpfm-public-page-image,
html[data-theme="dark"] .dpfm-public-card-image {
    background: var(--dpfm-dark-surface);
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-dashboard-hero,
html[data-theme="dark"] .dpfm-dashboard-preview-hero,
html[data-theme="dark"] .dpfm-hero {
    background: linear-gradient(135deg, #172033, #0f4c81);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.44);
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-dashboard-hero p:last-child,
html[data-theme="dark"] .dpfm-dashboard-preview-hero p:last-child,
html[data-theme="dark"] .dpfm-hero p {
    color: #cbd5e1;
}

html[data-theme="dark"] .dpfm-analytics-kpi-card span,
html[data-theme="dark"] .dpfm-analytics-kpi-card small,
html[data-theme="dark"] .dpfm-analytics-suggestion-card strong,
html[data-theme="dark"] .dpfm-analytics-suggestion-card span,
html[data-theme="dark"] .dpfm-analytics-bar-row span,
html[data-theme="dark"] .dpfm-analytics-limitations p {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-analytics-kpi-card strong,
html[data-theme="dark"] .dpfm-analytics-bar-row strong {
    color: #93c5fd;
}

html[data-theme="dark"] .dpfm-analytics-progress,
html[data-theme="dark"] .dpfm-analytics-progress::-webkit-progress-bar {
    background: #0f172a;
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-analytics-limitations {
    border-top-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-table,
html[data-theme="dark"] .dpfm-vessels-table {
    background: var(--dpfm-dark-surface);
    border-color: var(--dpfm-dark-border);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.32);
}

html[data-theme="dark"] .dpfm-table th,
html[data-theme="dark"] .dpfm-vessels-table th {
    background: #0f4c81;
    border-bottom-color: var(--dpfm-dark-border);
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-table td,
html[data-theme="dark"] .dpfm-vessels-table td {
    border-bottom-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-vessels-table tbody tr:nth-child(even),
html[data-theme="dark"] .dpfm-vessels-table tbody tr:hover,
html[data-theme="dark"] .dpfm-findings-table tbody tr:hover,
html[data-theme="dark"] .dpfm-reference-table tbody tr:hover,
html[data-theme="dark"] .dpfm-data-quality-table tbody tr:hover,
html[data-theme="dark"] .dpfm-fleets-table tbody tr:hover,
html[data-theme="dark"] .dpfm-personnel-table tbody tr:hover,
html[data-theme="dark"] .dpfm-fleet-assignments-table tbody tr:hover,
html[data-theme="dark"] .dpfm-equipment-table tbody tr:hover,
html[data-theme="dark"] .dpfm-assignments-dashboard-table tbody tr:hover,
html[data-theme="dark"] .dpfm-assignment-select-row-selected {
    background: rgba(59, 130, 246, 0.1);
}

html[data-theme="dark"] .dpfm-dp-register-module-card {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-dp-register-module-card h3 {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-dp-register-module-card p {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-search-input,
html[data-theme="dark"] .dpfm-vessel-search-input,
html[data-theme="dark"] .dpfm-fleet-search-input,
html[data-theme="dark"] .dpfm-personnel-search-input,
html[data-theme="dark"] .dpfm-fleet-assignment-search-input,
html[data-theme="dark"] .dpfm-equipment-search-input,
html[data-theme="dark"] .dpfm-filter-select,
html[data-theme="dark"] .dpfm-login-form input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #0f172a;
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-search-input:focus,
html[data-theme="dark"] .dpfm-filter-select:focus,
html[data-theme="dark"] .dpfm-login-form input:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
    outline: none;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] .dpfm-details-grid div,
html[data-theme="dark"] .dpfm-vessel-detail-count-card,
html[data-theme="dark"] .dpfm-quick-access-link,
html[data-theme="dark"] .dpfm-public-definition-list div,
html[data-theme="dark"] .dpfm-public-image-placeholder {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-vessel-detail-field {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-vessel-detail-field:nth-child(even) {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-details-grid dd,
html[data-theme="dark"] .dpfm-finding-long-text,
html[data-theme="dark"] .dpfm-vessel-name,
html[data-theme="dark"] .dpfm-vessel-detail-count-card strong,
html[data-theme="dark"] .dpfm-vessel-detail-field dd,
html[data-theme="dark"] .dpfm-fleet-name,
html[data-theme="dark"] .dpfm-personnel-name,
html[data-theme="dark"] .dpfm-equipment-name,
html[data-theme="dark"] .dpfm-count-label,
html[data-theme="dark"] .dpfm-public-definition-list dd,
html[data-theme="dark"] .dpfm-public-feature-card,
html[data-theme="dark"] .dpfm-public-feature-card:hover {
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-button,
html[data-theme="dark"] .dpfm-btn,
html[data-theme="dark"] .dpfm-btn-primary,
html[data-theme="dark"] .dpfm-public-button {
    background: var(--dpfm-dark-blue-strong);
    border-color: #2f6fa3;
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-button:hover,
html[data-theme="dark"] .dpfm-btn:hover,
html[data-theme="dark"] .dpfm-btn-primary:hover,
html[data-theme="dark"] .dpfm-public-button:hover {
    background: #2563eb;
    border-color: #60a5fa;
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-button-secondary,
html[data-theme="dark"] .dpfm-btn-secondary,
html[data-theme="dark"] .dpfm-btn-outline,
html[data-theme="dark"] .dpfm-link-button,
html[data-theme="dark"] .dpfm-filter-button,
html[data-theme="dark"] .dpfm-vessel-open-button,
html[data-theme="dark"] .dpfm-logout-link,
html[data-theme="dark"] .dpfm-theme-toggle,
html[data-theme="dark"] .dpfm-public-button-light {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-user-signout-initials {
    background: rgba(59, 130, 246, 0.16);
    border-color: var(--dpfm-dark-border);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-button-secondary:hover,
html[data-theme="dark"] .dpfm-btn-secondary:hover,
html[data-theme="dark"] .dpfm-btn-outline:hover,
html[data-theme="dark"] .dpfm-link-button:hover,
html[data-theme="dark"] .dpfm-filter-button:hover,
html[data-theme="dark"] .dpfm-filter-button.active,
html[data-theme="dark"] .dpfm-vessel-open-button:hover,
html[data-theme="dark"] .dpfm-logout-link:hover,
html[data-theme="dark"] .dpfm-theme-toggle:hover,
html[data-theme="dark"] .dpfm-public-button-light:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: #60a5fa;
    color: #dbeafe;
}

html[data-theme="dark"] .dpfm-button-danger,
html[data-theme="dark"] .dpfm-btn-danger,
html[data-theme="dark"] .dpfm-public-button-secondary {
    background: #b91c1c;
    border-color: #ef4444;
    color: #fef2f2;
}

html[data-theme="dark"] .dpfm-button-danger:hover,
html[data-theme="dark"] .dpfm-btn-danger:hover,
html[data-theme="dark"] .dpfm-public-button-secondary:hover {
    background: #dc2626;
    border-color: #f87171;
}

html[data-theme="dark"] .dpfm-dqa-link,
html[data-theme="dark"] .dpfm-dqa-link:hover,
html[data-theme="dark"] .dpfm-dqa-link.active {
    background: linear-gradient(135deg, #145a92, #2563eb);
    border-color: rgba(96, 165, 250, 0.34);
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-theme-toggle {
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] .dpfm-dqa-alert,
html[data-theme="dark"] .dpfm-dashboard-card-alert {
    border-color: var(--dpfm-dark-red);
}

html[data-theme="dark"] .dpfm-ai-card-header h2,
html[data-theme="dark"] .dpfm-ai-state-card h2,
html[data-theme="dark"] .dpfm-ai-document-types legend,
html[data-theme="dark"] .dpfm-ai-answer-markdown h2,
html[data-theme="dark"] .dpfm-ai-answer-markdown h3,
html[data-theme="dark"] .dpfm-ai-sources h3 {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-ai-card-header p,
html[data-theme="dark"] .dpfm-ai-state-card p,
html[data-theme="dark"] .dpfm-ai-welcome p,
html[data-theme="dark"] .dpfm-ai-sources span,
html[data-theme="dark"] .dpfm-ai-composer-actions span {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-ai-document-types,
html[data-theme="dark"] .dpfm-ai-welcome,
html[data-theme="dark"] .dpfm-ai-message,
html[data-theme="dark"] .dpfm-ai-sources,
html[data-theme="dark"] .dpfm-ai-sources li,
html[data-theme="dark"] .dpfm-ai-answer-markdown td,
html[data-theme="dark"] .dpfm-operations-status-list div,
html[data-theme="dark"] .dpfm-operations-empty-state,
html[data-theme="dark"] .dpfm-operations-operation,
html[data-theme="dark"] .dpfm-operations-diagnostics {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-ai-checkbox,
html[data-theme="dark"] .dpfm-ai-answer-markdown {
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-ai-message-user {
    background: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] .dpfm-ai-message-assistant,
html[data-theme="dark"] .dpfm-ai-sources li {
    background: var(--dpfm-dark-surface-muted);
}

html[data-theme="dark"] .dpfm-operations-status-list div,
html[data-theme="dark"] .dpfm-operations-empty-state,
html[data-theme="dark"] .dpfm-operations-operation {
    background: var(--dpfm-dark-surface-muted);
}

html[data-theme="dark"] .dpfm-operations-status-list dt,
html[data-theme="dark"] .dpfm-operations-empty-state span {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-operations-status-list dd,
html[data-theme="dark"] .dpfm-operations-operation h3,
html[data-theme="dark"] .dpfm-operations-diagnostics h4,
html[data-theme="dark"] .dpfm-operations-diagnostics ul {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-operations-confirmation {
    background: rgba(153, 27, 27, 0.18);
    border-color: var(--dpfm-dark-red);
}

html[data-theme="dark"] .dpfm-ai-banner-limited {
    background: rgba(146, 64, 14, 0.22);
    border-color: rgba(251, 191, 36, 0.6);
    color: #fde68a;
}

html[data-theme="dark"] .dpfm-ai-banner-unavailable {
    background: rgba(153, 27, 27, 0.26);
    border-color: rgba(248, 113, 113, 0.62);
    color: #fecaca;
}

html[data-theme="dark"] .dpfm-ai-badge-online,
html[data-theme="dark"] .dpfm-ai-proof-grounded {
    background: rgba(22, 101, 52, 0.28);
    color: #bbf7d0;
}

html[data-theme="dark"] .dpfm-ai-badge-limited,
html[data-theme="dark"] .dpfm-ai-proof-partialevidence {
    background: rgba(146, 64, 14, 0.28);
    color: #fde68a;
}

html[data-theme="dark"] .dpfm-ai-badge-unavailable,
html[data-theme="dark"] .dpfm-ai-proof-noevidence {
    background: rgba(153, 27, 27, 0.3);
    color: #fecaca;
}

html[data-theme="dark"] .dpfm-ai-badge-readonly {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-status-active,
html[data-theme="dark"] .dpfm-status-closed,
html[data-theme="dark"] .dpfm-severity-low,
html[data-theme="dark"] .dpfm-dashboard-card-success {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

html[data-theme="dark"] .dpfm-status-inactive,
html[data-theme="dark"] .dpfm-severity-default,
html[data-theme="dark"] .dpfm-dp-class-badge-neutral {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

html[data-theme="dark"] .dpfm-severity-high,
html[data-theme="dark"] .dpfm-login-error {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(248, 113, 113, 0.48);
    color: #fecaca;
}

html[data-theme="dark"] .dpfm-severity-medium,
html[data-theme="dark"] .dpfm-status-open,
html[data-theme="dark"] .dpfm-alert-message,
html[data-theme="dark"] .dpfm-tbn-badge {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fde68a !important;
}

html[data-theme="dark"] .dpfm-alert-count,
html[data-theme="dark"] .dpfm-reference-count,
html[data-theme="dark"] .dpfm-chip-list li,
html[data-theme="dark"] .dpfm-dp-class-badge,
html[data-theme="dark"] .dpfm-vessel-tab {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.32);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-vessel-tab:hover,
html[data-theme="dark"] .dpfm-vessel-tab-active {
    background: #2563eb;
    border-color: #60a5fa;
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-detail-section,
html[data-theme="dark"] .dpfm-details-title,
html[data-theme="dark"] .dpfm-reference-card-header,
html[data-theme="dark"] .dpfm-vessel-management-title,
html[data-theme="dark"] .dpfm-vessel-context-zone + .dpfm-vessel-context-zone,
html[data-theme="dark"] .dpfm-vessel-tab-card,
html[data-theme="dark"] .dpfm-vessel-tab-card-header,
html[data-theme="dark"] .dpfm-section-heading,
html[data-theme="dark"] .dpfm-public-footer,
html[data-theme="dark"] .dpfm-public-card-image {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-vessel-tab-card {
    background: rgba(15, 23, 42, 0.34);
}

html[data-theme="dark"] .dpfm-vessel-tab-card-header h3,
html[data-theme="dark"] .dpfm-vessel-management-title h2,
html[data-theme="dark"] .dpfm-vessel-primary-details dd,
html[data-theme="dark"] .dpfm-vessel-management-details dd,
html[data-theme="dark"] .dpfm-vessel-context-zone dd {
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-vessel-primary-details dt,
html[data-theme="dark"] .dpfm-vessel-management-details dt,
html[data-theme="dark"] .dpfm-vessel-context-zone dt,
html[data-theme="dark"] .dpfm-vessel-detail-field dt {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-vessel-detail-count-card span {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-person-edit-card,
html[data-theme="dark"] .dpfm-person-details-card,
html[data-theme="dark"] .dpfm-fleet-edit-card,
html[data-theme="dark"] .dpfm-fleet-details-card,
html[data-theme="dark"] .dpfm-fleet-relations-card,
html[data-theme="dark"] .dpfm-job-function-edit-card,
html[data-theme="dark"] .dpfm-job-function-details-card,
html[data-theme="dark"] .dpfm-job-function-relations-card,
html[data-theme="dark"] .dpfm-vessel-edit-card,
html[data-theme="dark"] .dpfm-vessel-details-card {
    background: var(--dpfm-dark-surface);
    border-color: var(--dpfm-dark-border);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-person-field,
html[data-theme="dark"] .dpfm-person-relation-item,
html[data-theme="dark"] .dpfm-fleet-field,
html[data-theme="dark"] .dpfm-job-function-field,
html[data-theme="dark"] .dpfm-vessel-field,
html[data-theme="dark"] .dpfm-vessel-editor-grid,
html[data-theme="dark"] .dpfm-vessel-editor-grid > div,
html[data-theme="dark"] .dpfm-vessel-editor-grid dd,
html[data-theme="dark"] .dpfm-team-details-grid > div,
html[data-theme="dark"] .dpfm-team-status-row,
html[data-theme="dark"] .dpfm-person-row-content,
html[data-theme="dark"] .dpfm-fleet-row-content,
html[data-theme="dark"] .dpfm-job-function-row-content,
html[data-theme="dark"] .dpfm-vessel-row-content,
html[data-theme="dark"] .dpfm-team-row-content {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-person-detail-row,
html[data-theme="dark"] .dpfm-fleet-detail-row,
html[data-theme="dark"] .dpfm-job-function-detail-row,
html[data-theme="dark"] .dpfm-vessel-detail-row,
html[data-theme="dark"] .dpfm-person-delete-zone,
html[data-theme="dark"] .dpfm-fleet-delete-zone,
html[data-theme="dark"] .dpfm-job-function-delete-zone,
html[data-theme="dark"] .dpfm-detail-section {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-fmea-form-group {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-fmea-form-card .dpfm-content-actions {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-fmea-form-group h3 {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-person-field label,
html[data-theme="dark"] .dpfm-person-row-label,
html[data-theme="dark"] .dpfm-fleet-field label,
html[data-theme="dark"] .dpfm-fleet-row-label,
html[data-theme="dark"] .dpfm-job-function-field label,
html[data-theme="dark"] .dpfm-job-function-row-label,
html[data-theme="dark"] .dpfm-vessel-field label,
html[data-theme="dark"] .dpfm-fmea-field label,
html[data-theme="dark"] .dpfm-vessel-editor-grid dt,
html[data-theme="dark"] .dpfm-vessel-row-label,
html[data-theme="dark"] .dpfm-team-details-grid dt,
html[data-theme="dark"] .dpfm-team-row-label {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-person-relation-name,
html[data-theme="dark"] .dpfm-team-details-grid dd,
html[data-theme="dark"] .dpfm-team-row-content,
html[data-theme="dark"] .dpfm-vessel-editor-grid dd,
html[data-theme="dark"] .dpfm-person-delete-zone h4,
html[data-theme="dark"] .dpfm-fleet-delete-zone h4,
html[data-theme="dark"] .dpfm-job-function-delete-zone h4 {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-person-confirmation,
html[data-theme="dark"] .dpfm-fleet-confirmation,
html[data-theme="dark"] .dpfm-job-function-confirmation,
html[data-theme="dark"] .dpfm-vessel-confirmation,
html[data-theme="dark"] .dpfm-team-unassign-confirmation {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--dpfm-dark-red);
    border-radius: 8px;
    color: var(--dpfm-dark-text);
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
}

html[data-theme="dark"] .dpfm-document-delete-confirmation {
    background: var(--dpfm-dark-surface);
    border-color: var(--dpfm-dark-border);
    box-shadow:
        0 24px 70px rgba(2, 6, 23, 0.6),
        0 0 0 100vmax rgba(2, 6, 23, 0.72);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-document-delete-confirmation > p,
html[data-theme="dark"] .dpfm-document-delete-confirmation > .dpfm-alert-message {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.58);
    color: #fde68a;
}

html[data-theme="dark"] .dpfm-document-delete-confirmation > strong {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-document-delete-confirmation h2 {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-person-toggle,
html[data-theme="dark"] .dpfm-fleet-toggle,
html[data-theme="dark"] .dpfm-job-function-toggle,
html[data-theme="dark"] .dpfm-vessel-toggle,
html[data-theme="dark"] .dpfm-team-toggle {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
    color: #bfdbfe;
}

html[data-theme="dark"] .dpfm-person-toggle:hover,
html[data-theme="dark"] .dpfm-fleet-toggle:hover,
html[data-theme="dark"] .dpfm-job-function-toggle:hover,
html[data-theme="dark"] .dpfm-vessel-toggle:hover,
html[data-theme="dark"] .dpfm-team-toggle:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: #60a5fa;
    color: #dbeafe;
}

html[data-theme="dark"] .dpfm-person-toggle-selected,
html[data-theme="dark"] .dpfm-fleet-toggle-selected,
html[data-theme="dark"] .dpfm-job-function-toggle-selected,
html[data-theme="dark"] .dpfm-vessel-toggle-selected,
html[data-theme="dark"] .dpfm-team-toggle-selected {
    background: #1d4ed8;
    border-color: #60a5fa;
    color: #f8fafc;
}

html[data-theme="dark"] .dpfm-person-edit-card .dpfm-search-input,
html[data-theme="dark"] .dpfm-fleet-edit-card .dpfm-search-input,
html[data-theme="dark"] .dpfm-job-function-edit-card .dpfm-search-input,
html[data-theme="dark"] .dpfm-vessel-edit-card .dpfm-search-input,
html[data-theme="dark"] .dpfm-fmea-field .dpfm-search-input,
html[data-theme="dark"] .dpfm-vessel-editor-grid .dpfm-search-input,
html[data-theme="dark"] .dpfm-team-details-grid .dpfm-search-input,
html[data-theme="dark"] .dpfm-person-edit-card input,
html[data-theme="dark"] .dpfm-fleet-edit-card input,
html[data-theme="dark"] .dpfm-job-function-edit-card input,
html[data-theme="dark"] .dpfm-vessel-edit-card input,
html[data-theme="dark"] .dpfm-person-edit-card textarea,
html[data-theme="dark"] .dpfm-fleet-edit-card textarea,
html[data-theme="dark"] .dpfm-job-function-edit-card textarea,
html[data-theme="dark"] .dpfm-vessel-edit-card textarea,
html[data-theme="dark"] .dpfm-fmea-field textarea,
html[data-theme="dark"] .dpfm-vessel-editor-grid textarea,
html[data-theme="dark"] .dpfm-vessel-edit-card select,
html[data-theme="dark"] .dpfm-fmea-field select,
html[data-theme="dark"] .dpfm-vessel-editor-grid select {
    background: #0f172a;
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-table-wrapper {
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-job-function-relations-table td,
html[data-theme="dark"] .dpfm-fleet-relations-table td,
html[data-theme="dark"] .dpfm-vessel-editor-grid select.dpfm-search-input {
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-empty-message,
html[data-theme="dark"] .dpfm-muted-message {
    background: rgba(15, 23, 42, 0.42);
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-button:disabled,
html[data-theme="dark"] .dpfm-btn:disabled,
html[data-theme="dark"] .dpfm-btn-primary:disabled,
html[data-theme="dark"] .dpfm-btn-secondary:disabled,
html[data-theme="dark"] .dpfm-btn-outline:disabled,
html[data-theme="dark"] .dpfm-btn-danger:disabled,
html[data-theme="dark"] .dpfm-public-button:disabled,
html[data-theme="dark"] .dpfm-link-button:disabled,
html[data-theme="dark"] .dpfm-filter-button:disabled,
html[data-theme="dark"] .dpfm-person-toggle:disabled,
html[data-theme="dark"] .dpfm-fleet-toggle:disabled,
html[data-theme="dark"] .dpfm-job-function-toggle:disabled,
html[data-theme="dark"] .dpfm-team-toggle:disabled,
html[data-theme="dark"] .dpfm-vessel-toggle:disabled,
html[data-theme="dark"] .dpfm-button[aria-disabled="true"],
html[data-theme="dark"] .dpfm-btn[aria-disabled="true"],
html[data-theme="dark"] .dpfm-btn-primary[aria-disabled="true"],
html[data-theme="dark"] .dpfm-btn-secondary[aria-disabled="true"],
html[data-theme="dark"] .dpfm-btn-outline[aria-disabled="true"],
html[data-theme="dark"] .dpfm-btn-danger[aria-disabled="true"],
html[data-theme="dark"] .dpfm-public-button[aria-disabled="true"],
html[data-theme="dark"] .dpfm-link-button[aria-disabled="true"],
html[data-theme="dark"] .dpfm-filter-button[aria-disabled="true"] {
    background: rgba(51, 65, 85, 0.72);
    border-color: rgba(148, 163, 184, 0.34);
    color: #cbd5e1;
    opacity: 0.72;
}

html[data-theme="dark"] .dpfm-tbn-row {
    background: rgba(245, 158, 11, 0.08);
}

html[data-theme="dark"] .dpfm-public-image-placeholder {
    background: repeating-linear-gradient(
        135deg,
        #111827,
        #111827 14px,
        #1f2937 14px,
        #1f2937 28px
    );
    color: var(--dpfm-dark-muted);
}

.dpfm-cmf-kpi-grid,
.dpfm-cmf-stage-strip {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.dpfm-cmf-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.dpfm-cmf-stage-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dpfm-cmf-kpi-grid > div,
.dpfm-cmf-stage-strip > div,
.dpfm-cmf-solution {
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    background: var(--dpfm-surface-muted);
    padding: 0.85rem;
}

.dpfm-cmf-kpi-grid span,
.dpfm-cmf-stage-strip span,
.dpfm-cmf-stage-strip small {
    display: block;
    color: var(--dpfm-muted);
    font-size: 0.8rem;
}

.dpfm-cmf-kpi-grid strong,
.dpfm-cmf-stage-strip strong {
    color: var(--dpfm-text);
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.dpfm-cmf-form {
    display: grid;
    gap: 1rem;
}

.dpfm-cmf-form-card,
.dpfm-cmf-kpi-group {
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    background: var(--dpfm-surface);
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.dpfm-cmf-kpi-section {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.dpfm-cmf-kpi-group h2 {
    font-size: 1rem;
    margin: 0;
}

.dpfm-cmf-kpi-card,
.dpfm-cmf-stage-card,
.dpfm-cmf-counter-card {
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    background: var(--dpfm-surface-muted);
    padding: 0.85rem;
}

.dpfm-cmf-kpi-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dpfm-cmf-kpi-card p,
.dpfm-cmf-counter-card p {
    color: var(--dpfm-muted);
    font-size: 0.78rem;
    margin: 0.2rem 0 0;
}

.dpfm-cmf-counter-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dpfm-cmf-textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.dpfm-cmf-vessel-picker {
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    max-height: 13rem;
    overflow: auto;
    padding: 0.65rem;
}

.dpfm-cmf-vessel-row,
.dpfm-cmf-checkbox {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-height: 1.75rem;
}

.dpfm-cmf-vessel-row {
    border-bottom: 1px solid var(--dpfm-border);
    justify-content: space-between;
    padding: 0.4rem 0;
}

.dpfm-cmf-vessel-row:last-child {
    border-bottom: 0;
}

.dpfm-cmf-vessel-main {
    color: var(--dpfm-text);
    display: grid;
    flex: 1;
    font-size: 0.88rem;
    gap: 0.1rem;
}

.dpfm-cmf-vessel-main small {
    color: var(--dpfm-muted);
}

.dpfm-cmf-multiselect {
    display: grid;
    gap: 0.45rem;
    max-width: 46rem;
}

.dpfm-cmf-multiselect-trigger {
    align-items: center;
    background: var(--dpfm-surface);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    color: var(--dpfm-text);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 2.45rem;
    padding: 0.55rem 0.75rem;
    text-align: left;
    width: 100%;
}

.dpfm-cmf-multiselect-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.dpfm-cmf-multiselect-panel {
    background: var(--dpfm-surface);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-shadow: var(--dpfm-shadow);
    padding: 0.55rem;
}

.dpfm-cmf-multiselect-list {
    display: grid;
    max-height: 14rem;
    overflow: auto;
}

.dpfm-cmf-multiselect-row {
    align-items: center;
    border-bottom: 1px solid var(--dpfm-border);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0.4rem 0.15rem;
}

.dpfm-cmf-multiselect-row:last-child {
    border-bottom: 0;
}

.dpfm-cmf-vessel-summary {
    color: var(--dpfm-text);
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0.75rem 0;
}

.dpfm-cmf-selected-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.dpfm-cmf-selected-chip {
    align-items: center;
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.55rem 0.7rem;
}

.dpfm-cmf-vessel-names {
    color: var(--dpfm-muted);
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
}

.dpfm-cmf-checkbox span {
    color: var(--dpfm-text);
    font-size: 0.88rem;
}

.dpfm-cmf-solution {
    margin-top: 0.75rem;
}

.dpfm-cmf-more-details {
    margin-top: 0.75rem;
}

.dpfm-cmf-more-details > summary {
    color: var(--dpfm-blue);
    cursor: pointer;
    font-weight: 700;
    list-style-position: inside;
}

.dpfm-cmf-more-details[open] > summary {
    margin-bottom: 0.75rem;
}

.dpfm-status-badge {
    align-items: center;
    border: 1px solid var(--dpfm-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 1.45rem;
    padding: 0.25rem 0.55rem;
    white-space: nowrap;
}

.dpfm-status-badge-success,
.dpfm-status-badge-closed {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
    color: #15803d;
}

.dpfm-status-badge-warning,
.dpfm-status-badge-progress {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
    color: #92400e;
}

.dpfm-status-badge-critical {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
    color: #b91c1c;
}

.dpfm-status-badge-neutral,
.dpfm-status-badge-muted {
    background: rgba(100, 116, 139, 0.14);
    border-color: rgba(100, 116, 139, 0.28);
    color: #475569;
}

html[data-theme="dark"] .dpfm-cmf-form-card,
html[data-theme="dark"] .dpfm-cmf-kpi-group,
html[data-theme="dark"] .dpfm-cmf-kpi-grid > div,
html[data-theme="dark"] .dpfm-cmf-stage-strip > div,
html[data-theme="dark"] .dpfm-cmf-kpi-card,
html[data-theme="dark"] .dpfm-cmf-stage-card,
html[data-theme="dark"] .dpfm-cmf-counter-card,
html[data-theme="dark"] .dpfm-cmf-selected-chip,
html[data-theme="dark"] .dpfm-cmf-solution,
html[data-theme="dark"] .dpfm-cmf-multiselect-trigger,
html[data-theme="dark"] .dpfm-cmf-multiselect-panel,
html[data-theme="dark"] .dpfm-cmf-vessel-picker {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-cmf-kpi-grid span,
html[data-theme="dark"] .dpfm-cmf-stage-strip span,
html[data-theme="dark"] .dpfm-cmf-stage-strip small,
html[data-theme="dark"] .dpfm-cmf-kpi-card p,
html[data-theme="dark"] .dpfm-cmf-counter-card p,
html[data-theme="dark"] .dpfm-cmf-vessel-main small {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-cmf-kpi-grid strong,
html[data-theme="dark"] .dpfm-cmf-stage-strip strong,
html[data-theme="dark"] .dpfm-cmf-vessel-main,
html[data-theme="dark"] .dpfm-cmf-vessel-summary,
html[data-theme="dark"] .dpfm-cmf-multiselect-trigger,
html[data-theme="dark"] .dpfm-cmf-checkbox span {
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-cmf-more-details > summary {
    color: #93c5fd;
}

html[data-theme="dark"] .dpfm-status-badge-success,
html[data-theme="dark"] .dpfm-status-badge-closed {
    color: #86efac;
}

html[data-theme="dark"] .dpfm-status-badge-warning,
html[data-theme="dark"] .dpfm-status-badge-progress {
    color: #facc15;
}

html[data-theme="dark"] .dpfm-status-badge-critical {
    color: #fca5a5;
}

html[data-theme="dark"] .dpfm-status-badge-neutral,
html[data-theme="dark"] .dpfm-status-badge-muted {
    color: #cbd5e1;
}

.dpfm-two-column-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(20rem, 0.9fr) minmax(28rem, 1.4fr);
}

.dpfm-form-section {
    border-top: 1px solid var(--dpfm-border);
    margin-top: 1rem;
    padding-top: 1rem;
}

.dpfm-form-section h3 {
    margin: 0 0 0.75rem;
}

.dpfm-settings-form-grid,
.dpfm-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.dpfm-summary-card {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    min-height: 4rem;
    padding: 0.85rem 1rem;
}

.dpfm-summary-card span {
    color: var(--dpfm-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dpfm-summary-card strong {
    color: var(--dpfm-text);
    display: block;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.dpfm-collapsible-section {
    border-top: 1px solid var(--dpfm-border);
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.dpfm-collapsible-section summary {
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.dpfm-event-form-layout {
    display: grid;
    gap: 1.15rem;
}

.dpfm-event-form-card {
    padding: 1.2rem 1.35rem 1.35rem;
}

.dpfm-event-collapsible-card summary {
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    list-style-position: inside;
    margin-bottom: 0;
    padding-inline-start: 0.1rem;
}

.dpfm-event-form-body {
    border-top: 1px solid var(--dpfm-border);
    display: grid;
    gap: 1.15rem;
    margin-top: 1rem;
    padding-top: 1.2rem;
}

.dpfm-event-form-stack {
    display: grid;
    gap: 1.1rem;
}

.dpfm-event-quick-grid {
    display: grid;
    gap: 1.05rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dpfm-event-form-card .dpfm-settings-form-grid {
    gap: 1.05rem;
}

.dpfm-event-form-card .dpfm-filter-select-label {
    gap: 0.55rem;
}

.dpfm-event-form-actions {
    border-top: 1px solid var(--dpfm-border);
    justify-content: flex-end;
    margin-bottom: 0;
    margin-top: 0.35rem;
    padding-top: 1.25rem;
}

.dpfm-event-form-actions .dpfm-form-primary-actions,
.dpfm-event-form-actions .dpfm-form-danger-actions {
    gap: 0.8rem;
}

@media (max-width: 980px) {
    .dpfm-event-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dpfm-event-quick-grid {
        grid-template-columns: 1fr;
    }
}

.dpfm-topic-textarea {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--dpfm-text);
    max-width: 100%;
    min-height: 9rem;
    overflow-wrap: anywhere;
    padding: 0.9rem 1rem;
    resize: vertical;
    width: 100%;
}

html[data-theme="dark"] .dpfm-summary-card,
html[data-theme="dark"] .dpfm-topic-textarea {
    background: var(--dpfm-dark-surface-muted);
}

.dpfm-checkbox-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin-top: 0.75rem;
}

.dpfm-checkbox-grid label {
    align-items: center;
    border: 1px solid var(--dpfm-border);
    border-radius: 0.5rem;
    display: flex;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.7rem;
}

.dpfm-users-access-page {
    max-width: var(--dpfm-page-max-width);
}

.dpfm-users-access-temporary-link .dpfm-input {
    width: 100%;
}

.dpfm-users-access-layout {
    gap: 1.25rem;
    grid-template-columns: minmax(340px, 380px) minmax(0, 1fr);
}

.dpfm-users-access-accounts-card,
.dpfm-users-access-editor-card {
    margin-top: 0;
    min-width: 0;
}

.dpfm-users-access-account-list {
    display: grid;
    gap: 0.65rem;
}

.dpfm-users-access-account-row {
    align-items: stretch;
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 10px;
    color: var(--dpfm-text);
    cursor: pointer;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
    min-height: 4.75rem;
    padding: 0.85rem;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
    width: 100%;
}

.dpfm-users-access-account-row:hover {
    background: #f8fafc;
    border-color: var(--dpfm-blue);
    box-shadow: 0 8px 18px rgba(0, 58, 112, 0.08);
}

.dpfm-users-access-account-row:focus-visible {
    outline: 3px solid var(--dpfm-button-focus-ring);
    outline-offset: 2px;
}

.dpfm-users-access-account-row-selected {
    background: #eef3f8;
    border-color: var(--dpfm-blue);
    box-shadow: inset 4px 0 0 var(--dpfm-red);
}

.dpfm-users-access-account-main,
.dpfm-users-access-account-meta,
.dpfm-users-access-status-stack {
    min-width: 0;
}

.dpfm-users-access-account-main {
    display: grid;
    gap: 0.25rem;
}

.dpfm-users-access-account-main strong {
    color: var(--dpfm-blue);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.dpfm-users-access-account-main span,
.dpfm-users-access-account-function {
    color: var(--dpfm-muted);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dpfm-users-access-account-meta {
    align-items: start;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.dpfm-users-access-status-stack {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.dpfm-users-access-page .dpfm-form-section {
    margin-top: 1.4rem;
    padding-top: 1.25rem;
}

.dpfm-users-access-page .dpfm-form-section h3 {
    color: var(--dpfm-blue);
    font-size: 1.05rem;
    line-height: 1.25;
    margin-bottom: 0.9rem;
}

.dpfm-users-access-page .dpfm-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-users-access-page .dpfm-form-grid label {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.dpfm-users-access-page .dpfm-form-grid label > span {
    color: var(--dpfm-blue);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.25;
}

.dpfm-users-access-page .dpfm-input {
    background: var(--dpfm-white);
    border: 1px solid var(--dpfm-border);
    border-radius: 10px;
    box-sizing: border-box;
    color: var(--dpfm-text);
    font: inherit;
    line-height: 1.25;
    min-height: 2.65rem;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    width: 100%;
}

.dpfm-users-access-page select.dpfm-input {
    padding-right: 2rem;
}

.dpfm-users-access-page .dpfm-input:focus {
    border-color: var(--dpfm-blue);
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.12);
    outline: none;
}

.dpfm-users-access-page .dpfm-input:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.dpfm-users-access-propose-row {
    justify-content: flex-start;
    margin-top: 1rem;
}

.dpfm-users-access-pages-table {
    table-layout: fixed;
}

.dpfm-users-access-pages-table th,
.dpfm-users-access-pages-table td {
    padding: 0.75rem 0.9rem;
}

.dpfm-users-access-page-access-column {
    width: 14rem;
}

.dpfm-users-access-pages-table select.dpfm-input {
    max-width: 13rem;
}

.dpfm-users-access-page .dpfm-checkbox-grid {
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dpfm-users-access-page .dpfm-checkbox-grid label {
    background: #f8fafc;
    cursor: pointer;
    min-height: 2.75rem;
    padding: 0.7rem 0.8rem;
}

.dpfm-users-access-page .dpfm-checkbox-grid label:focus-within {
    border-color: var(--dpfm-blue);
    box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.12);
}

.dpfm-users-access-page .dpfm-checkbox-grid input {
    flex: 0 0 auto;
    height: 1.05rem;
    width: 1.05rem;
}

.dpfm-users-access-page .dpfm-checkbox-grid span {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dpfm-users-access-action-bar {
    border-top: 1px solid var(--dpfm-border);
    gap: var(--dpfm-button-gap);
    justify-content: flex-start;
    margin-top: 1.4rem;
    padding-top: 1.25rem;
}

.dpfm-users-access-action-bar .dpfm-button {
    min-width: 8.5rem;
}

@media (min-width: 1180px) {
    .dpfm-users-access-account-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1120px) {
    .dpfm-users-access-layout {
        grid-template-columns: 1fr;
    }

    .dpfm-users-access-account-list {
        grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    }
}

@media (max-width: 760px) {
    .dpfm-users-access-page .dpfm-form-grid,
    .dpfm-users-access-page .dpfm-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .dpfm-users-access-account-list {
        grid-template-columns: 1fr;
    }

    .dpfm-users-access-account-meta {
        grid-template-columns: 1fr;
    }

    .dpfm-users-access-status-stack {
        justify-content: flex-start;
    }

    .dpfm-users-access-page-access-column {
        width: 11rem;
    }

    .dpfm-users-access-pages-table select.dpfm-input {
        max-width: none;
    }

    .dpfm-users-access-action-bar .dpfm-button {
        flex: 1 1 12rem;
    }
}

.dpfm-alert {
    border: 1px solid var(--dpfm-border);
    border-radius: 0.5rem;
    font-weight: 700;
    margin: 1rem 0;
    padding: 0.85rem 1rem;
}

.dpfm-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.32);
}

.dpfm-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.32);
}

.dpfm-alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.28);
}

@media (max-width: 980px) {
    .dpfm-two-column-layout {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .dpfm-checkbox-grid label {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
}

html[data-theme="dark"] .dpfm-users-access-account-row {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-users-access-account-row:hover,
html[data-theme="dark"] .dpfm-users-access-account-row-selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: #60a5fa;
}

html[data-theme="dark"] .dpfm-users-access-account-main strong,
html[data-theme="dark"] .dpfm-users-access-page .dpfm-form-section h3,
html[data-theme="dark"] .dpfm-users-access-page .dpfm-form-grid label > span {
    color: var(--dpfm-dark-title);
}

html[data-theme="dark"] .dpfm-users-access-account-main span,
html[data-theme="dark"] .dpfm-users-access-account-function {
    color: var(--dpfm-dark-muted);
}

html[data-theme="dark"] .dpfm-users-access-page .dpfm-input {
    background: #0f172a;
    border-color: var(--dpfm-dark-border);
    color: var(--dpfm-dark-text);
}

html[data-theme="dark"] .dpfm-users-access-page .dpfm-checkbox-grid label {
    background: var(--dpfm-dark-surface-muted);
    border-color: var(--dpfm-dark-border);
}
