:root {
    --hero-ink: #1b1c1f;
    --hero-muted: #4f5662;
    --hero-accent: #3a5a40;
    --hero-accent-soft: rgba(58, 90, 64, 0.16);
    --hero-panel: rgba(255, 255, 255, 0.9);
}

.hero {
    max-width: 68.75rem;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
    min-height: calc(100vh - 10rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.hero-logo {
    width: min(52.5vw, 19.6875rem);
    max-width: 100%;
    height: auto;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.75rem;
    color: var(--hero-accent);
    margin-bottom: 1rem;
}

.hero-copy {
    font-size: 1.05rem;
    color: var(--hero-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hero-actions .btn {
    width: 11.25rem;
}

.hero-actions .btn-primary {
    background: #5f7d6d;
    border-color: #5f7d6d;
}

.hero-actions .btn-outline-primary {
    color: #5f7d6d;
    border-color: #5f7d6d;
}

.hero-actions .btn-primary:hover,
.hero-actions .btn-outline-primary:hover {
    background: #4f6a5c;
    border-color: #4f6a5c;
    color: #fff;
}

.hero-search {
    display: flex;
    width: 60vw;
    max-width: 45rem;
    gap: 0.75rem;
    justify-content: center;
}

.hero-search-input {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 0.875rem;
    border: 0.0625rem solid rgba(20, 21, 22, 0.2);
    font-family: "Trebuchet MS", "Gill Sans", "Verdana", sans-serif;
}

.hero-search-button {
    border-radius: 0.875rem;
}

.offcanvas-body ul,
.offcanvas-body ol {
    list-style: none;
    margin: 0 0 0.5rem;
    padding-left: 0;
}

.offcanvas-body ul:empty,
.offcanvas-body ol:empty {
    display: none;
}

.offcanvas-body .errorlist {
    color: #b02a37;
}

.offcanvas-body p {
    list-style: none;
}

.offcanvas-body p::marker {
    content: "";
}

.licenses-section {
    width: 100%;
    padding: 0 2.5vw;
}

.licenses-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.licenses-header h1 {
    margin: 0;
}

.licenses-title {
    font-size: 1.5rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.licenses-table {
    width: 100%;
    margin: 0;
    min-height: 24rem;
    background: #fff;
    border: 0.0625rem solid rgba(20, 21, 22, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(12, 18, 28, 0.08);
}

.licenses-table .table {
    width: 100%;
    table-layout: auto;
}

.licenses-table .dataTables_scrollBody {
    max-height: 60vh;
    overflow-y: auto;
}

.dt-scroll-relaxed .dataTables_scrollBody {
    height: auto !important;
    max-height: none;
    overflow: visible !important;
}

.dt-scroll-relaxed .dataTables_scroll,
.dt-scroll-relaxed .dataTables_scrollHead,
.dt-scroll-relaxed .dataTables_scrollFoot {
    overflow: visible !important;
}

.licenses-table .dropdown-menu {
    z-index: 2000;
}

.licenses-table .table-responsive {
    overflow: visible;
}

.licenses-table .table > :not(caption) > * > * {
    padding: 0.75rem 0.75rem;
}

.licenses-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: #4f5662;
    border-bottom: 0.0625rem solid rgba(20, 21, 22, 0.1);
}

.licenses-table tbody td {
    border-bottom: 0.0625rem solid rgba(20, 21, 22, 0.08);
}

.licenses-table tbody tr:last-child td {
    border-bottom: none;
}

.licenses-table .dataTables_wrapper {
    width: 100%;
}

.licenses-table table thead {
    display: table-header-group;
}

.licenses-table table tbody {
    display: table-row-group;
}

.task-id-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 0.05rem 0.35rem;
}

.task-id-pill.is-due-today {
    background-color: rgba(255, 140, 0, 0.5);
}

.task-id-pill.is-overdue {
    background-color: rgba(255, 0, 0, 0.6);
}

.task-id-pill.has-subtask-due {
    box-shadow: none;
}

.task-id-pill.subtask-only {
    border: none;
}

.subtasks-modal-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.subtasks-modal-dialog {
    max-width: calc(100vw - 2rem);
    width: calc(100vw - 2rem);
    margin: 1rem auto;
}

.subtask-id-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.subtask-id-pill.is-due-today {
    background-color: rgba(255, 140, 0, 0.5);
}

.subtask-id-pill.is-overdue {
    background-color: rgba(255, 0, 0, 0.6);
}

.workorder-form-table {
    min-width: 0;
}

.workorder-form-table thead {
    display: none;
}

.workorder-form-table tbody tr {
    display: block;
    border: 0.0625rem solid rgba(20, 21, 22, 0.08);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.workorder-form-table tbody td {
    display: block;
    padding: 0.35rem 0;
    border: none;
}

.workorder-form-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f5662;
    margin-bottom: 0.25rem;
}

.workorder-form-table tbody td[data-label=""]::before {
    display: none;
}

.workorder-row-actions-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workorder-row-actions-inline label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.workorder-row-actions-inline input[type="checkbox"] {
    margin: 0;
}

.workorder-delete-cell {
    text-align: right;
}

.workorder-delete-cell::before {
    display: inline-block;
    margin-right: 0.35rem;
}

.activity-photo {
    width: 100%;
    max-width: 12rem;
    height: auto;
    max-height: 9rem;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 0.0625rem solid rgba(20, 21, 22, 0.1);
    display: block;
}

.license-thumb {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 0.0625rem solid rgba(20, 21, 22, 0.15);
}

.license-thumb-button {
    padding: 0;
    border: none;
    background: transparent;
}

.license-preview-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 1.5rem rgba(12, 18, 28, 0.12);
}

.rt-editor-input-hidden {
    display: none;
}

.rt-editor {
    min-height: 10rem;
    padding: 0.75rem;
    border: 0.0625rem solid rgba(20, 21, 22, 0.12);
    border-radius: 0.5rem;
    background: #fff;
}

.rt-editor:focus {
    outline: 0.125rem solid rgba(13, 110, 253, 0.25);
}

.floating-page-menu-btn {
    position: fixed;
    left: 0;
    margin-left: 0;
    z-index: 1500;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0.0625rem solid var(--bs-primary);
    background: #fff;
    box-shadow: 0 0.4rem 1rem rgba(12, 18, 28, 0.12);
    border-radius: 50%;
    width: 4.5rem;
    height: 4.5rem;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.1;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: normal;
    cursor: move;
    touch-action: none;
}

.floating-page-menu-panel {
    position: fixed;
    left: 0;
    z-index: 1490;
    min-width: 12rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0.6rem 1.5rem rgba(12, 18, 28, 0.16);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.floating-page-menu-panel.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.floating-page-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.floating-page-menu-actions .btn {
    justify-content: flex-start;
}

.floating-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1480;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.floating-menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.action-dropdown .action-dropdown-toggle::after {
    display: none;
}

.action-dropdown-menu {
    position: absolute;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem;
    min-width: auto;
    flex-direction: row;
    right: calc(100% + 0.35rem);
    left: auto;
    top: 50%;
    transform: translateY(-50%) translateX(0.4rem);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
    display: none;
}

.action-dropdown-menu.show {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.action-dropdown-menu .dropdown-item {
    width: 2.1rem;
    height: 2.1rem;
    padding: 0.35rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.action-dropdown-menu .dropdown-item i {
    font-size: 0.95rem;
}

.action-dropdown-menu .dropdown-item::after {
    content: attr(aria-label);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, -0.35rem);
    background: #111827;
    color: #fff;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.65rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.action-dropdown-menu .dropdown-item:hover::after,
.action-dropdown-menu .dropdown-item:focus-visible::after {
    opacity: 1;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem 1.5rem;
}

.details-item {
    min-width: 0;
}

.details-span {
    grid-column: 1 / -1;
}

.details-label {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f5662;
}

.details-value {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: #141516;
}

.details-email {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.details-long .details-value,
.details-email-block .details-value {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.details-panel-individual .details-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: row dense;
}

.details-panel-individual .details-company {
    grid-column: 1;
    grid-row: 1;
}

.details-panel-individual .details-address {
    grid-column: 2;
    grid-row: 1;
}

.details-panel-individual .details-city {
    grid-column: 3;
    grid-row: 1;
}

.details-panel-individual .details-state {
    grid-column: 4;
    grid-row: 1;
}

.details-panel-individual .details-zip {
    grid-column: 5;
    grid-row: 1;
}

.details-panel-individual .details-email-block {
    grid-column: 4 / 6;
    grid-row: 2;
}

.details-panel-individual .details-created {
    grid-column: 1;
    grid-row: 2;
}

.details-panel-individual .details-notes {
    grid-column: 2 / 6;
    grid-row: 2;
}

.details-divider {
    height: 0.0625rem;
    background: rgba(15, 23, 42, 0.12);
    margin: 1rem 0;
}

.details-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.details-table {
    margin: 0;
}

.details-table th {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f5662;
}

.details-empty {
    margin: 0;
    color: #4f5662;
}

.details-panel {
    background: rgba(13, 110, 253, 0.06);
    border: 0.0625rem solid rgba(13, 110, 253, 0.18);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.contact-representatives {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 0.0625rem solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.contact-representative-card {
    border-radius: 0.75rem;
    border: 0.0625rem solid rgba(15, 23, 42, 0.1);
    padding: 1rem;
    background: #ffffff;
}

.contact-row-company {
    --bs-table-bg: #e3e3e3;
    --bs-table-color: #141516;
}

.contact-row-company .cell:not(.cell-actions) {
    color: #141516;
}

.contact-row-individual {
    --bs-table-bg: #e5f4e8;
    --bs-table-color: #1f2a1f;
}

.contact-row-individual .cell:not(.cell-actions) {
    color: #1f2a1f;
}

.insurance-details-row td {
    border-bottom: none;
}

.licenses-actions a {
    margin-right: 0.75rem;
}

.licenses-table .cell {
    display: flex;
    align-items: center;
}

.licenses-table .cell {
    justify-content: flex-start;
}

.licenses-table .cell-actions {
    display: inline-flex;
    justify-content: center;
    flex-wrap: nowrap;
    width: auto;
}

.licenses-table .cell-actions {
    gap: 0.5rem;
}

.licenses-table .cell-actions .btn {
    margin: 0;
}

.licenses-table .cell-actions form {
    display: inline-flex;
    margin: 0;
}

.licenses-table .inventory-actions,
.licenses-table .inventory-actions-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.licenses-table .inventory-actions input.form-control {
    width: 6rem;
}

.project-dashboard {
    width: 100%;
    min-height: calc(100dvh - 8rem);
}

.project-dashboard .licenses-table {
    width: 100%;
}

.project-dashboard-chart {
    height: auto;
}

.project-dashboard-chart-secondary {
    margin-top: 1rem;
}

.project-dashboard-map {
    height: 32dvh;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.project-dashboard-map #projectDashboardMap {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    z-index: 1;
}

.project-dashboard-map .leaflet-container {
    z-index: 1;
}

.project-dashboard-details {
    margin-top: 1rem;
}

.project-details-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.financial-dashboard-layout {
    display: flex;
    gap: 1rem;
}

.financial-dashboard-nav {
    width: 10%;
    min-width: 9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.financial-dashboard-link {
    text-align: left;
    border: 0.0625rem solid rgba(15, 23, 42, 0.12);
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.financial-dashboard-link.is-active {
    border-color: #0d6efd;
    color: #0d6efd;
}

.financial-dashboard-panels {
    flex: 1;
}

.financial-dashboard-card {
    display: none;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: calc(100dvh - 12rem);
}

.financial-dashboard-card.is-active {
    display: flex;
}

.financial-dashboard-card canvas {
    flex: 1;
    min-height: 0;
    height: 100% !important;
    width: 100% !important;
}

.financial-dashboard {
    min-height: calc(100dvh - 8rem);
}


.dt-toolbar-action {
    display: inline-flex;
    align-items: center;
}

.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.dt-toolbar .dt-buttons {
    order: 2;
}

.dt-toolbar .dataTables_filter,
.dt-toolbar .dt-search {
    order: 1;
    margin-left: 0;
}

.dt-toolbar .dt-buttons {
    display: inline-flex;
    gap: 0;
    margin-right: 0;
    margin-left: 0.5rem;
}

.dt-toolbar [data-dt-toolbar] {
    margin-left: 0;
}

.dt-toolbar .dt-buttons .btn {
    color: var(--bs-primary);
    border: 0.0625rem solid var(--bs-primary);
    background: transparent;
}

.dt-toolbar .dt-buttons .btn:hover,
.dt-toolbar .dt-buttons .btn:focus {
    color: #fff;
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.dataTables_paginate {
    display: inline-flex;
    gap: 0;
}

.dataTables_paginate .pagination {
    gap: 0;
}

.dataTables_paginate .paginate_button,
.dataTables_paginate .page-link {
    border-radius: 0;
}

.dataTables_paginate .page-link {
    color: var(--bs-primary);
    border: 0.0625rem solid var(--bs-primary);
    background: transparent;
    margin-left: -0.0625rem;
}

.dataTables_paginate .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.dataTables_paginate .page-item.disabled .page-link {
    color: #9aa0a6;
    border-color: rgba(20, 21, 22, 0.2);
    background: #f1f3f5;
}

.dataTables_paginate .paginate_button:first-child,
.dataTables_paginate .page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.dataTables_paginate .paginate_button:last-child,
.dataTables_paginate .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 62.4375rem;
    font-family: "Trebuchet MS", "Gill Sans", "Verdana", sans-serif;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.button.primary {
    background: #5f7d6d;
    color: #fff;
    border: 0.0625rem solid #5f7d6d;
}

.button.ghost {
    border: 0.0625rem solid #5f7d6d;
    color: #5f7d6d;
    background: transparent;
}

.button.primary:hover,
.button.ghost:hover {
    background: #4f6a5c;
    border-color: #4f6a5c;
    color: #fff;
}

.signin-header {
    position: relative;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    margin: 0;
}

.signin-logo-wrap {
    width: 100%;
    text-align: center;
}

.signin-logo {
    width: 2.8125rem;
    max-width: 25%;
    height: auto;
}

.signin-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
}

.signin-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 86%;
    margin: 0 auto;
    margin-top: 3rem;
}

.signin-actions .btn {
    flex: 0 0 40%;
}

.signin-body {
    background:#39404d
}

.signin-alert {
    position: fixed;
    left: 50%;
    top: calc(50% - 17.5rem - 2rem);
    transform: translateX(-50%);
    width: min(31.25rem, 90vw);
    z-index: 1060;
}

.signin-alert .alert {
    margin: 0;
}

.signin-body .form-label,
.signin-body .form-control {
    color: #f5f7ff;
}

.signin-body .form-control {
    background: #101624;
    border-color: rgba(245, 247, 255, 0.35);
    width: 100%;
}

.signin-body .form-control::placeholder {
    color: rgba(179, 179, 179, 0.7);
}

.signin-body .mb-3,
.signin-body .mb-4 {
    width: 86%;
    margin: 0 auto;
}

.signin-body .mb-3 {
    margin-top: 2rem;
}

.signin-body .btn-primary {
    background: #5f7d6d;
    border-color: #5f7d6d;
}

.signin-body .btn-outline-primary {
    color: #5f7d6d;
    border-color: #5f7d6d;
}

.signin-body .btn-primary:hover,
.signin-body .btn-outline-primary:hover {
    background: #4f6a5c;
    border-color: #4f6a5c;
    color: #fff;
}

@media (max-width: 47.5rem) {
    .hero {
        padding: 2.5rem 1.5rem 4rem;
    }

    .licenses-section {
        padding: 0 1rem;
    }

    .licenses-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .licenses-title {
        font-size: 1.25rem;
    }

    .licenses-table {
        padding: 0.65rem;
        min-height: auto;
    }

    .licenses-table .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .licenses-table table {
        min-width: 40rem;
    }

    .licenses-table .table > :not(caption) > * > * {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }

    .licenses-table thead th {
        font-size: 0.6rem;
    }

    .offcanvas {
        width: 100% !important;
        max-width: 100% !important;
    }

    .offcanvas-header {
        padding: 0.75rem 1rem;
    }

    .offcanvas-body {
        padding: 1rem;
    }

    .offcanvas-body .form-control,
    .offcanvas-body .form-select,
    .offcanvas-body textarea,
    .offcanvas-body input {
        font-size: 16px;
    }

    .offcanvas-body .btn {
        width: 100%;
    }

    .subtasks-modal-dialog {
        margin: 0.5rem auto;
    }
}
