@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800;900&display=swap");

:root {
    --bg: #f4f7f2;
    --panel: #ffffff;
    --ink: #1f2a24;
    --muted: #66736b;
    --primary: #167a4a;
    --primary-dark: #0f5e39;
    --accent: #f2b84b;
    --danger-bg: #fff1f1;
    --danger: #b42318;
    --border: #dbe5dd;
    --shadow: 0 24px 70px rgba(23, 47, 34, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding: 64px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 89, 55, 0.92), rgba(22, 122, 74, 0.84)),
        url('../images/food-pattern.svg');
    background-size: cover;
    color: #ffffff;
}

.brand-panel::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border: 42px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.brand-mark,
.topbar-mark {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-panel h1,
.dashboard-content h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: 0;
}

.brand-copy {
    max-width: 520px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.65;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: min(100%, 430px);
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.form-header {
    margin-bottom: 28px;
}

.form-header h2 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: 0;
}

.form-header p:not(.eyebrow),
.dashboard-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

label {
    display: block;
    margin: 18px 0 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fbfdfb;
    color: var(--ink);
    font-size: 15px;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 122, 74, 0.12);
}

button,
.topbar a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

button {
    width: 100%;
}

button:hover,
.topbar a:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 12px 14px;
    border: 1px solid #ffd1d1;
    border-radius: 6px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 14px;
    font-weight: 700;
}

.hint {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.swal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 30, 22, 0.48);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.swal-overlay.is-visible {
    opacity: 1;
}

.swal-overlay.is-closing {
    opacity: 0;
}

.swal-modal {
    width: min(100%, 390px);
    padding: 34px 30px 28px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(16, 40, 27, 0.26);
    text-align: center;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.18s ease;
}

.swal-overlay.is-visible .swal-modal {
    transform: translateY(0) scale(1);
}

.swal-icon {
    display: inline-flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    font-size: 42px;
    font-weight: 800;
}

.swal-success {
    border: 3px solid rgba(22, 122, 74, 0.18);
    background: rgba(22, 122, 74, 0.1);
    color: var(--primary);
}

.swal-error {
    border: 3px solid rgba(180, 35, 24, 0.16);
    background: var(--danger-bg);
    color: var(--danger);
}

.swal-modal h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 24px;
}

.swal-modal p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.swal-button {
    width: 100%;
    margin-top: 24px;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 280px minmax(0, 1fr);
    background: #eef4ee;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 22px 16px;
    border-right: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(22, 122, 74, 0.08), rgba(255, 255, 255, 0) 220px),
        #ffffff;
    box-shadow: 14px 0 38px rgba(31, 42, 36, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(22, 122, 74, 0.22) transparent;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 4px 8px 20px;
    border-bottom: 1px solid rgba(218, 226, 220, 0.9);
}

.brand-seal {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #29aa85);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.sidebar-brand strong,
.user-pill strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.sidebar-brand small,
.user-pill small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-nav p {
    margin: 18px 10px 8px;
    color: #87928b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.sidebar-nav a,
.nav-group summary {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border-radius: 8px;
    color: #39463f;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-nav a {
    justify-content: flex-start;
}

.nav-group {
    margin: 6px 0;
}

.nav-group summary {
    position: relative;
    cursor: pointer;
    list-style: none;
    background: rgba(246, 250, 247, 0.78);
    outline: 0;
}

.nav-group summary::marker {
    content: "";
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.nav-group summary span em {
    overflow: hidden;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group summary > svg:last-child {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #8b978f;
    transition: transform 180ms ease;
}

.nav-group[open] summary > svg:last-child {
    transform: rotate(180deg);
}

.nav-submenu {
    display: grid;
    gap: 4px;
    margin: 8px 0 10px 18px;
    padding: 0 0 0 10px;
    border-left: 1px solid rgba(22, 122, 74, 0.18);
}

.nav-submenu a {
    min-height: 38px;
    padding: 0 10px 0 8px;
    color: #59675f;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.nav-group summary:hover {
    background: rgba(22, 122, 74, 0.1);
    color: var(--primary);
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-nav a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav a.logout-link {
    margin-top: 18px;
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
}

.sidebar-nav svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
}

.sidebar-nav a.active svg,
.sidebar-nav a:hover svg,
.nav-group summary:hover svg {
    color: var(--primary);
}

.nav-submenu svg {
    width: 17px;
    height: 17px;
}

.header-actions svg,
.quick-actions svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
}

.dashboard-page {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.dashboard-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
    letter-spacing: 0;
}

.dashboard-header .eyebrow,
.panel .eyebrow {
    margin-bottom: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    width: 44px;
    min-height: 44px;
    margin: 0;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--ink);
    box-shadow: none;
}

.icon-button:hover {
    border-color: rgba(22, 122, 74, 0.3);
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
}

.sidebar-toggle {
    display: none;
    flex: 0 0 auto;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 50px;
    padding: 6px 12px 6px 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.user-pill > span {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(22, 122, 74, 0.12);
    color: var(--primary);
    font-weight: 800;
}

.dashboard-main {
    flex: 1;
    padding: 28px 32px;
}

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

.metric-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(25, 52, 36, 0.08);
}

.metric-card {
    display: grid;
    min-height: 172px;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 20px;
}

.metric-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(22, 122, 74, 0.12);
    color: var(--primary);
}

.metric-icon.amber {
    background: rgba(242, 184, 75, 0.16);
    color: #b17608;
}

.metric-icon.blue {
    background: rgba(83, 122, 239, 0.12);
    color: #3761dd;
}

.metric-icon.red {
    background: rgba(180, 35, 24, 0.1);
    color: var(--danger);
}

.metric-card p,
.panel p,
.activity-list p {
    margin: 0;
}

.metric-card p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: #111814;
    font-size: 30px;
    line-height: 1;
}

.trend {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 800;
}

.trend.up {
    color: var(--primary);
}

.trend.warn {
    color: #b17608;
}

.trend.down {
    color: var(--danger);
}

.spark-chart {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 58px;
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.bottom-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
}

.panel {
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: 21px;
}

.apex-chart {
    min-height: 338px;
    padding: 20px 18px 10px;
}

.donut-chart {
    min-height: 214px;
    padding: 18px 18px 0;
}

.status-list,
.activity-list,
.quick-actions {
    padding: 18px 24px 24px;
}

.status-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2ee;
}

.status-list div:last-child,
.activity-list div:last-child {
    border-bottom: 0;
}

.status-list span {
    color: var(--ink);
    font-weight: 700;
}

.status-list strong {
    color: var(--primary);
}

.status-list i {
    grid-column: 1 / -1;
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2ee;
}

.status-list i::before {
    content: "";
    display: block;
    width: var(--fill);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #29aa85);
}

.activity-list div {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #edf2ee;
}

.dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(22, 122, 74, 0.1);
}

.dot.amber {
    background: #f2b84b;
    box-shadow: 0 0 0 5px rgba(242, 184, 75, 0.14);
}

.dot.blue {
    background: #537aef;
    box-shadow: 0 0 0 5px rgba(83, 122, 239, 0.12);
}

.activity-list strong {
    display: block;
    color: var(--ink);
}

.activity-list small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

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

.quick-actions a {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdfb;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.quick-actions a:hover {
    border-color: rgba(22, 122, 74, 0.35);
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb svg {
    width: 15px;
    height: 15px;
}

.breadcrumb strong {
    color: var(--ink);
}

.form-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.form-message svg {
    width: 18px;
    height: 18px;
}

.form-message.success {
    border: 1px solid rgba(22, 122, 74, 0.22);
    background: rgba(22, 122, 74, 0.1);
    color: var(--primary);
}

.form-message.error {
    border: 1px solid rgba(180, 35, 24, 0.2);
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
}

.work-order-shell {
    display: grid;
    gap: 22px;
    max-width: 1080px;
}

.work-order-panel {
    overflow: visible;
}

.compact-metrics {
    margin-bottom: 24px;
}

.table-panel {
    overflow: hidden;
}

.edit-work-order-panel {
    margin-bottom: 24px;
    overflow: visible;
}

.panel-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 0 12px;
    border: 1px solid rgba(22, 122, 74, 0.24);
    border-radius: 8px;
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    width: auto;
}

.panel-action.muted {
    border-color: var(--border);
    background: #ffffff;
    color: var(--muted);
}

.panel-action svg {
    width: 17px;
    height: 17px;
}

.table-filter-control {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.table-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
}

.table-filter-control select {
    width: auto;
    min-height: 38px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    outline: 0;
}

.table-filter-control select:focus {
    border-color: rgba(22, 122, 74, 0.45);
    box-shadow: 0 0 0 4px rgba(22, 122, 74, 0.08);
}

.table-responsive {
    overflow-x: auto;
}

.dataTables_wrapper {
    padding: 18px 18px 8px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 14px;
}

.dataTables_wrapper .dataTables_length {
    float: left;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    outline: 0;
}

.dataTables_wrapper .dataTables_length select {
    width: auto;
    padding: 0 30px 0 10px;
}

.dataTables_wrapper .dataTables_filter input {
    width: min(320px, 52vw);
    padding: 0 12px;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: rgba(22, 122, 74, 0.45);
    box-shadow: 0 0 0 4px rgba(22, 122, 74, 0.08);
}

.dataTables_wrapper .dataTables_info {
    clear: both;
    float: left;
    padding: 16px 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.dataTables_wrapper .dataTables_paginate {
    float: right;
    display: flex;
    gap: 6px;
    padding: 10px 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink) !important;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: rgba(22, 122, 74, 0.28);
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    cursor: default;
    opacity: 0.46;
}

.dataTables_wrapper::after {
    content: "";
    display: block;
    clear: both;
}

.work-order-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

.work-order-table th,
.work-order-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.work-order-table th {
    background: #f7faf8;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.work-order-table td {
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.work-order-table td strong,
.work-order-table td small {
    display: block;
}

.work-order-table td small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.table-client-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.table-client-link strong {
    transition: color 0.18s ease;
}

.table-client-link:hover strong,
.table-client-link:focus-visible strong {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.work-order-table tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-badge.paid {
    background: rgba(22, 122, 74, 0.12);
    color: var(--primary);
}

.status-badge.partial {
    background: rgba(242, 184, 75, 0.18);
    color: #9c6504;
}

.status-badge.unpaid {
    background: rgba(180, 35, 24, 0.1);
    color: var(--danger);
}

.status-badge.create {
    background: rgba(22, 122, 74, 0.12);
    color: var(--primary);
}

.status-badge.update {
    background: rgba(242, 184, 75, 0.18);
    color: #9c6504;
}

.status-badge.delete {
    background: rgba(180, 35, 24, 0.1);
    color: var(--danger);
}

.audit-table {
    min-width: 1120px;
}

.client-table {
    min-width: 1040px;
}

.client-work-orders-table {
    min-width: 1080px;
}

.client-profile-band {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(25, 52, 36, 0.08);
}

.client-profile-band h2 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
}

.client-profile-band p:not(.eyebrow) {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.5;
}

.client-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
}

.client-profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.client-profile-meta svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.audit-table td:nth-child(6) {
    max-width: 360px;
    line-height: 1.45;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.table-action-button,
.form-link-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(22, 122, 74, 0.24);
    border-radius: 8px;
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: none;
}

.table-action-button {
    margin: 0;
    width: auto;
}

.table-action-button svg {
    width: 15px;
    height: 15px;
}

.table-action-button.select {
    border-color: rgba(37, 99, 235, 0.24);
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.table-action-button.pay {
    border-color: rgba(22, 122, 74, 0.24);
    background: rgba(22, 122, 74, 0.1);
    color: var(--primary);
}

.table-action-button.danger {
    border-color: rgba(180, 35, 24, 0.2);
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
}

.form-link-button {
    min-width: 120px;
    margin-top: 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 20, 0.48);
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-panel {
    width: min(1120px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(23, 47, 34, 0.22);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 21px;
}

.modal-close {
    margin: 0;
}

.modal-form {
    padding-top: 18px;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 58px 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state svg {
    width: 38px;
    height: 38px;
    color: var(--primary);
}

.empty-state strong {
    color: var(--ink);
    font-size: 18px;
}

.mockup-badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(242, 184, 75, 0.15);
    color: #b17608;
    font-size: 12px;
    font-weight: 800;
}

.client-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 24px 24px;
}

.client-type-card {
    position: relative;
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfdfb;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.client-type-card:hover,
.client-type-card.active {
    border-color: rgba(22, 122, 74, 0.35);
    box-shadow: 0 16px 34px rgba(25, 52, 36, 0.1);
    transform: translateY(-1px);
}

.client-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.client-type-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(22, 122, 74, 0.12);
    color: var(--primary);
}

.client-type-icon.blue {
    background: rgba(83, 122, 239, 0.12);
    color: #3761dd;
}

.client-type-card strong {
    color: var(--ink);
    font-size: 18px;
}

.client-type-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.work-order-form {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.form-section {
    display: grid;
    gap: 8px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

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

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

.work-order-form label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.work-order-form input,
.work-order-form select,
.work-order-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    outline: 0;
}

.work-order-form input,
.work-order-form select {
    min-height: 46px;
    padding: 0 13px;
}

.work-order-form textarea {
    resize: vertical;
    padding: 12px 13px;
}

.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus {
    border-color: rgba(22, 122, 74, 0.45);
    box-shadow: 0 0 0 4px rgba(22, 122, 74, 0.08);
}

.payment-summary-section,
.payment-history-section {
    display: grid;
    gap: 14px;
    padding-top: 8px;
}

.upfront-payment-fields {
    display: grid;
    gap: 14px;
    margin-top: 4px;
    padding: 18px;
    border: 1px solid var(--soft-border);
    border-radius: 8px;
    background: #f8fbf7;
}

.compact-panel-header {
    padding: 0;
    border-bottom: 0;
}

.compact-panel-header h2 {
    font-size: 18px;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.payment-summary-grid div {
    display: grid;
    gap: 6px;
    min-height: 92px;
    align-content: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7faf8;
}

.payment-summary-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.payment-summary-grid strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.compact-table-responsive {
    border: 1px solid var(--border);
    border-radius: 8px;
}

.compact-payment-table {
    min-width: 900px;
}

.searchable-select {
    position: relative;
}

.searchable-control {
    position: relative;
    display: flex;
    align-items: center;
}

.searchable-control > svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: #7d8b83;
    pointer-events: none;
}

.searchable-control input[type="text"] {
    padding-left: 42px;
    padding-right: 46px;
}

.searchable-control button {
    position: absolute;
    right: 7px;
    display: inline-flex;
    width: 32px;
    min-width: 0;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7d8b83;
    box-shadow: none;
}

.searchable-control button:hover {
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
    transform: none;
}

.searchable-control button svg {
    width: 16px;
    height: 16px;
}

.searchable-options {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(22, 122, 74, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 44px rgba(25, 52, 36, 0.14);
}

.searchable-select.is-open .searchable-options {
    display: grid;
    gap: 4px;
}

.searchable-options button {
    display: grid;
    width: 100%;
    min-height: 52px;
    min-width: 0;
    gap: 3px;
    justify-items: start;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    box-shadow: none;
}

.searchable-options button:hover {
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
    transform: none;
}

.searchable-options button strong {
    font-size: 14px;
}

.searchable-options button small,
.searchable-options p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.searchable-options button[hidden] {
    display: none;
}

.searchable-select.is-empty .searchable-options::after {
    content: "No matching clients found.";
    display: block;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 6px;
}

.form-actions button,
.form-actions .secondary-button,
.form-actions .form-link-button {
    width: auto;
    min-width: 190px;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0 22px;
    text-align: center;
}

.secondary-button {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--ink);
    box-shadow: none;
}

.secondary-button:hover {
    border-color: rgba(22, 122, 74, 0.3);
    background: rgba(22, 122, 74, 0.08);
    color: var(--primary);
}

.is-hidden {
    display: none;
}

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    background: #ffffff;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        width: min(360px, calc(100vw - 36px));
        height: 100vh;
        padding: 22px 16px;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        transform: translateX(-104%);
        transition: transform 220ms ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: block;
        width: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(17, 24, 20, 0.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .dashboard-header {
        align-items: center;
    }
}

@media (max-width: 860px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 38vh;
        padding: 42px 24px;
    }

    .brand-mark {
        width: 60px;
        height: 60px;
        margin-bottom: 22px;
        border-radius: 12px;
    }

    .brand-panel h1 {
        font-size: clamp(36px, 12vw, 56px);
    }

    .brand-copy {
        font-size: 16px;
    }

    .login-panel {
        padding: 24px;
    }

    .login-card {
        padding: 28px 22px;
    }

    .sidebar-brand {
        padding-bottom: 16px;
    }

    .sidebar-nav {
        display: block;
    }

    .sidebar-nav p {
        margin-top: 12px;
    }

    .dashboard-header {
        align-items: center;
        flex-direction: row;
        padding: 14px 18px;
    }

    .dashboard-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .dashboard-title-row {
        flex: 1 1 auto;
    }

    .dashboard-header h1 {
        overflow: hidden;
        font-size: 24px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-actions {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .dashboard-main {
        padding: 18px;
    }

    .metric-grid,
    .dashboard-grid,
    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .client-type-grid,
    .two-columns,
    .three-columns,
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button,
    .form-actions .secondary-button,
    .form-actions .form-link-button {
        width: 100%;
    }

    .apex-chart {
        overflow-x: auto;
        padding: 14px 8px 8px;
    }
}

@media (max-width: 520px) {
    .dashboard-title-row > div {
        display: none;
    }

    .user-pill {
        padding: 6px;
    }

    .user-pill > div {
        display: none;
    }
}

@media (min-width: 861px) and (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium UI refresh inspired by the Picklers Garage admin shell. */
:root {
    --bg: #f3f6f1;
    --panel: #ffffff;
    --ink: #17221c;
    --muted: #68776d;
    --primary: #176f46;
    --primary-dark: #0d4f31;
    --accent: #dca83f;
    --danger-bg: #fff2f1;
    --danger: #b42318;
    --border: #dde7df;
    --soft-border: rgba(23, 111, 70, 0.13);
    --soft-bg: #f8fbf7;
    --shadow: 0 16px 38px rgba(23, 41, 30, 0.08);
    --shadow-strong: 0 26px 70px rgba(23, 41, 30, 0.16);
}

html {
    background: var(--bg);
}

body {
    font-family: "Public Sans", Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 246, 241, 0.98) 300px),
        var(--bg);
    color: var(--ink);
    letter-spacing: 0;
}

a,
button,
input,
select,
textarea,
summary {
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover,
.panel-action:hover,
.table-action-button:hover,
.quick-actions a:hover,
.client-type-card:hover {
    transform: translateY(-1px);
}

.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    background: transparent;
}

.sidebar {
    padding: 18px 14px;
    background:
        linear-gradient(180deg, rgba(248, 255, 248, 0.98) 0%, #ffffff 48%, #f5faf5 100%);
    border-right: 1px solid var(--soft-border);
    box-shadow: 12px 0 34px rgba(31, 42, 36, 0.045);
}

.sidebar-brand {
    min-height: 82px;
    margin: 0 0 14px;
    padding: 10px 10px 18px;
    border-bottom: 1px solid var(--soft-border);
}

.brand-seal {
    width: 58px;
    height: 58px;
    border: 1px solid rgba(23, 111, 70, 0.16);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #29aa85);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(23, 41, 30, 0.08);
}

.sidebar-brand strong {
    color: #15271d;
    font-size: 15px;
    font-weight: 900;
}

.sidebar-brand small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-nav p {
    margin: 20px 12px 9px;
    color: #5d7d6c;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.sidebar-nav a,
.nav-group summary {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: #415047;
    font-size: 14px;
    font-weight: 800;
}

.nav-group summary {
    background: rgba(247, 251, 248, 0.82);
}

.nav-submenu {
    gap: 5px;
    margin: 8px 0 12px 20px;
    padding-left: 12px;
    border-left-color: rgba(23, 111, 70, 0.15);
}

.nav-submenu a {
    min-height: 38px;
    color: #637169;
    font-size: 13px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.nav-group summary:hover {
    background: rgba(23, 111, 70, 0.09);
    color: var(--primary);
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-nav a.logout-link {
    margin-top: 22px;
    border: 1px solid rgba(180, 35, 24, 0.12);
    background: rgba(180, 35, 24, 0.07);
}

.dashboard-page {
    background:
        radial-gradient(circle at top right, rgba(23, 111, 70, 0.08), transparent 320px),
        transparent;
}

.dashboard-header {
    min-height: 76px;
    padding: 16px 30px;
    border-bottom: 1px solid var(--soft-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(23, 41, 30, 0.045);
}

.dashboard-header h1 {
    color: #15271d;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.18;
}

.eyebrow,
.dashboard-header .eyebrow,
.panel .eyebrow {
    color: #3c7b5c;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.icon-button {
    width: 42px;
    min-height: 42px;
    border-color: var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: #415047;
}

.icon-button:hover {
    border-color: rgba(23, 111, 70, 0.26);
    background: rgba(23, 111, 70, 0.08);
    color: var(--primary);
}

.user-pill {
    min-height: 48px;
    border-color: var(--soft-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(23, 41, 30, 0.04);
}

.user-pill > span {
    border-radius: 8px;
    background: rgba(23, 111, 70, 0.11);
    color: var(--primary);
}

.dashboard-main {
    width: min(100%, 1580px);
    padding: 30px;
}

.metric-grid {
    gap: 20px;
}

.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card {
    border: 1px solid var(--soft-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 132px;
    padding: 18px;
}

.metric-icon,
.client-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(23, 111, 70, 0.11);
    color: var(--primary);
}

.metric-card p {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.metric-card strong {
    color: #121c16;
    font-size: clamp(19px, 1.65vw, 25px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
}

.trend {
    font-size: 11px;
    font-weight: 900;
}

.dashboard-grid {
    gap: 22px;
    margin-top: 24px;
}

.panel {
    overflow: hidden;
}

.panel-header {
    min-height: 76px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--soft-border);
    background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.panel h2,
.modal-header h2 {
    color: #15271d;
    font-size: 18px;
    font-weight: 900;
}

.panel-action,
.table-action-button,
.form-link-button {
    border-color: rgba(23, 111, 70, 0.2);
    border-radius: 8px;
    background: rgba(23, 111, 70, 0.08);
    color: var(--primary);
    font-weight: 900;
}

.panel-action {
    min-height: 40px;
    padding: 0 14px;
}

.panel-action.muted,
.secondary-button {
    border-color: var(--border);
    background: #ffffff;
    color: #415047;
}

.table-responsive,
.compact-table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 111, 70, 0.26) transparent;
}

.dataTables_wrapper {
    padding: 20px 20px 10px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.table-filter-control {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.table-filter-control select,
.work-order-form input,
.work-order-form select,
.work-order-form textarea,
input {
    border-color: var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
}

.dataTables_wrapper .dataTables_filter input {
    width: min(340px, 58vw);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px;
    font-weight: 900;
}

.work-order-table {
    border-collapse: separate;
    border-spacing: 0;
}

.work-order-table th,
.work-order-table td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(221, 231, 223, 0.86);
}

.work-order-table th {
    background: #f7faf8;
    color: #60736a;
    font-size: 11px;
    font-weight: 900;
}

.work-order-table td {
    color: #243129;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.work-order-table tbody tr:hover td {
    background: #fbfdfb;
}

.table-actions {
    flex-wrap: wrap;
    gap: 7px;
}

.table-action-button {
    min-height: 34px;
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.table-action-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.status-badge,
.mockup-badge {
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.status-badge.paid,
.status-badge.create {
    background: rgba(23, 111, 70, 0.11);
    color: var(--primary-dark);
}

.status-badge.partial,
.status-badge.update,
.mockup-badge {
    background: rgba(220, 168, 63, 0.17);
    color: #8a5a05;
}

.status-badge.unpaid,
.status-badge.delete {
    background: rgba(180, 35, 24, 0.09);
    color: var(--danger);
}

.client-profile-band {
    padding: 26px;
}

.client-profile-band h2 {
    color: #15271d;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 900;
}

.client-profile-meta span {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--soft-border);
    border-radius: 999px;
    background: #fbfdfb;
}

.work-order-form {
    gap: 20px;
    padding: 26px;
}

.form-grid {
    gap: 18px;
}

.work-order-form label {
    margin: 0 0 8px;
    color: #243129;
    font-size: 13px;
    font-weight: 900;
}

.work-order-form input,
.work-order-form select {
    min-height: 48px;
}

.work-order-form textarea {
    min-height: 104px;
    line-height: 1.5;
}

.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus,
input:focus {
    border-color: rgba(23, 111, 70, 0.42);
    box-shadow: 0 0 0 4px rgba(23, 111, 70, 0.08);
}

.form-actions {
    gap: 12px;
    padding-top: 10px;
}

.form-actions button,
.form-actions .secondary-button,
.form-actions .form-link-button {
    min-height: 52px;
    border-radius: 8px;
}

button,
.topbar a {
    border-radius: 8px;
    background: var(--primary);
    font-family: inherit;
    font-weight: 900;
}

button:hover,
.topbar a:hover {
    background: var(--primary-dark);
}

.modal-backdrop {
    background: rgba(18, 28, 22, 0.48);
    backdrop-filter: blur(3px);
}

.modal-panel {
    width: min(1160px, calc(100vw - 48px));
    box-shadow: var(--shadow-strong);
}

.modal-header {
    min-height: 76px;
    padding: 22px 26px;
    border-bottom-color: var(--soft-border);
    background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.payment-summary-grid {
    gap: 14px;
}

.payment-summary-grid div {
    border-color: var(--soft-border);
    border-radius: 8px;
    background: #f8fbf7;
}

.searchable-options {
    border-color: var(--soft-border);
    border-radius: 8px;
    box-shadow: 0 22px 54px rgba(23, 41, 30, 0.14);
}

.form-message {
    border-radius: 8px;
}

.empty-state {
    padding: 64px 24px;
}

.dashboard-footer {
    border-top-color: var(--soft-border);
    background: rgba(255, 255, 255, 0.94);
}

.login-page {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 246, 241, 0.96)),
        var(--bg);
}

.brand-panel {
    background:
        linear-gradient(135deg, rgba(13, 79, 49, 0.94), rgba(23, 111, 70, 0.88)),
        url("../images/food-pattern.svg");
}

.brand-mark,
.topbar-mark {
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(8, 43, 25, 0.22);
}

.login-card {
    padding: 42px;
}

.form-header h2 {
    color: #15271d;
    font-size: 32px;
    font-weight: 900;
}

.alert {
    border-radius: 8px;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: min(360px, calc(100vw - 34px));
        box-shadow: 22px 0 60px rgba(23, 41, 30, 0.18);
    }

    .dashboard-header {
        padding: 14px 22px;
    }
}

@media (max-width: 980px) {
    .payment-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-profile-band {
        flex-direction: column;
    }
}

@media (max-width: 860px) {
    .dashboard-main {
        padding: 18px;
    }

    .dashboard-header h1 {
        max-width: 58vw;
        font-size: 21px;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 18px;
    }

    .panel-header .panel-action,
    .panel-header button {
        align-self: stretch;
        width: 100%;
    }

    .metric-card,
    .work-order-form,
    .client-profile-band {
        padding: 18px;
    }

    .dataTables_wrapper {
        padding: 16px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
    }

    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
    }

    .dataTables_wrapper .dataTables_paginate {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .modal-backdrop {
        align-items: stretch;
        padding: 14px;
    }

    .modal-panel {
        width: 100%;
        max-height: calc(100vh - 28px);
    }

    .modal-header {
        padding: 18px;
    }

    .login-card {
        padding: 30px 24px;
    }
}

@media (max-width: 640px) {
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }

    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .table-action-button,
    .table-actions form,
    .table-actions form button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .dashboard-header {
        gap: 10px;
    }

    .dashboard-title-row > div {
        display: block;
    }

    .dashboard-header .eyebrow {
        display: none;
    }

    .dashboard-header h1 {
        max-width: 46vw;
        font-size: 18px;
    }

    .header-actions .icon-button {
        display: none;
    }
}

.table-actions .table-action-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.table-actions .table-action-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .table-actions {
        align-items: center;
        flex-direction: row;
    }

    .table-actions form,
    .table-actions form button,
    .table-actions .table-action-button {
        width: 36px;
        min-width: 36px;
    }
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--soft-border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 111, 70, 0.96), rgba(28, 139, 88, 0.88)),
        url("../images/food-pattern.svg");
    background-size: cover;
    color: #ffffff;
    box-shadow: 0 20px 54px rgba(23, 41, 30, 0.13);
}

.dashboard-hero .eyebrow {
    color: rgba(255, 255, 255, 0.74);
}

.dashboard-hero h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    line-height: 1.08;
}

.dashboard-hero p:not(.eyebrow) {
    max-width: 680px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 700;
}

.hero-score {
    display: grid;
    min-width: 220px;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hero-score span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-score strong {
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.hero-score i,
.balance-row i,
.pr-utilization-list i {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-score i::before,
.balance-row i::before,
.pr-utilization-list i::before {
    content: "";
    display: block;
    width: var(--fill);
    height: 100%;
    border-radius: inherit;
    background: #ffffff;
}

.dashboard-metric-grid .metric-card {
    min-height: 128px;
}

.premium-dashboard-grid {
    align-items: start;
}

.compact-status-list i.up::before {
    background: linear-gradient(90deg, var(--primary), #29aa85);
}

.compact-status-list i.warn::before {
    background: linear-gradient(90deg, #dca83f, #f2c35a);
}

.compact-status-list i.down::before {
    background: linear-gradient(90deg, var(--danger), #e2675d);
}

.dashboard-split-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 24px 24px;
}

.dashboard-split-stats div {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--soft-border);
    border-radius: 8px;
    background: #f8fbf7;
}

.dashboard-split-stats span,
.dashboard-split-stats small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-split-stats strong {
    color: var(--ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.compact-donut-chart {
    min-height: 190px;
    padding-bottom: 0;
}

.dashboard-balance-list,
.dashboard-mini-table,
.pr-utilization-list {
    display: grid;
    gap: 0;
    padding: 8px 24px 24px;
}

.balance-row,
.dashboard-mini-table a,
.pr-utilization-list div {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(221, 231, 223, 0.86);
}

.balance-row {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.36fr);
    align-items: center;
}

.balance-row:last-child,
.dashboard-mini-table a:last-child,
.pr-utilization-list div:last-child {
    border-bottom: 0;
}

.balance-row > div:first-child,
.dashboard-mini-table span,
.pr-utilization-list span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.balance-row strong,
.dashboard-mini-table strong,
.pr-utilization-list strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.balance-row small,
.dashboard-mini-table small,
.pr-utilization-list small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.balance-row > div:last-child {
    display: grid;
    gap: 8px;
    text-align: right;
}

.balance-row > div:last-child strong {
    color: var(--danger);
}

.balance-row i,
.pr-utilization-list i {
    background: #edf3ef;
}

.balance-row i::before,
.pr-utilization-list i::before {
    background: linear-gradient(90deg, var(--primary), #29aa85);
}

.dashboard-mini-table a {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.dashboard-mini-table a:hover {
    color: var(--primary);
}

.dashboard-mini-table em,
.pr-utilization-list em {
    color: var(--primary);
    font-style: normal;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-payment-list {
    padding-top: 8px;
}

.pr-utilization-list div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.pr-utilization-list i {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-score {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .dashboard-hero {
        padding: 20px;
    }

    .dashboard-hero h2 {
        font-size: 24px;
    }

    .dashboard-split-stats,
    .balance-row,
    .dashboard-mini-table a {
        grid-template-columns: 1fr;
    }

    .balance-row > div:last-child {
        text-align: left;
    }
}

/* Soft neutral theme inspired by the attached SnowUI reference. */
:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --ink: #111113;
    --muted: #7c7c86;
    --primary: #111113;
    --primary-dark: #000000;
    --accent: #8fbdf4;
    --danger-bg: #fff1f2;
    --danger: #c0262d;
    --border: #e8e8ec;
    --soft-border: rgba(17, 17, 19, 0.08);
    --soft-bg: #f5f5f6;
    --shadow: 0 14px 36px rgba(17, 17, 19, 0.055);
    --shadow-strong: 0 24px 64px rgba(17, 17, 19, 0.12);
}

body {
    background: #f7f7f8;
    color: var(--ink);
}

.app-shell,
.dashboard-page {
    background: #f7f7f8;
}

.sidebar {
    background: #ffffff;
    border-right-color: #eeeeef;
    box-shadow: none;
}

.brand-seal {
    border: 0;
    background: #111113;
    color: #ffffff;
    box-shadow: none;
}

.sidebar-brand,
.dashboard-header,
.dashboard-footer {
    border-color: #eeeeef;
    background: #ffffff;
    box-shadow: none;
}

.sidebar-brand strong,
.dashboard-header h1,
.panel h2,
.modal-header h2,
.client-profile-band h2,
.dashboard-hero h2,
.metric-card strong {
    color: #111113;
}

.sidebar-nav p,
.eyebrow,
.dashboard-header .eyebrow,
.panel .eyebrow {
    color: #8a8a93;
}

.sidebar-nav a,
.nav-group summary {
    background: transparent;
    color: #36363d;
}

.nav-group summary {
    background: #ffffff;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.nav-group summary:hover {
    background: #f3f3f4;
    color: #111113;
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 0 #111113;
}

.nav-submenu {
    border-left-color: #ededf0;
}

.nav-submenu a {
    color: #686872;
}

.sidebar-nav a.logout-link {
    border-color: #f0dada;
    background: #fff7f7;
    color: #c0262d;
}

.icon-button,
.user-pill,
.panel-action,
.table-action-button,
.form-link-button,
.secondary-button,
.quick-actions a {
    border-color: #e5e5ea;
    background: #ffffff;
    color: #111113;
}

.icon-button:hover,
.panel-action:hover,
.table-action-button:hover,
.form-link-button:hover,
.secondary-button:hover,
.quick-actions a:hover {
    border-color: #d9d9df;
    background: #f5f5f6;
    color: #111113;
}

.user-pill > span {
    background: #eef2f7;
    color: #111113;
}

.dashboard-hero {
    background: #f4f4f5;
    color: #111113;
    box-shadow: var(--shadow);
}

.dashboard-hero .eyebrow,
.dashboard-hero p:not(.eyebrow),
.hero-score span {
    color: #7c7c86;
}

.hero-score {
    border-color: #e4e4e8;
    background: #ffffff;
    box-shadow: none;
}

.hero-score strong {
    color: #111113;
}

.hero-score i {
    background: #e8e8ec;
}

.hero-score i::before {
    background: #111113;
}

.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card,
.payment-summary-grid div,
.dashboard-split-stats div,
.upfront-payment-fields {
    border-color: #e8e8ec;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.metric-grid .metric-card:nth-child(4n + 1) {
    background: #f0f0ff;
}

.metric-grid .metric-card:nth-child(4n + 2) {
    background: #edf5ff;
}

.metric-grid .metric-card:nth-child(4n + 3) {
    background: #f2f0ff;
}

.metric-grid .metric-card:nth-child(4n + 4) {
    background: #eaf4ff;
}

.metric-icon,
.metric-icon.amber,
.metric-icon.blue,
.metric-icon.red,
.client-type-icon,
.client-type-icon.blue {
    background: rgba(255, 255, 255, 0.72);
    color: #111113;
}

.panel-header,
.modal-header {
    border-color: #e8e8ec;
    background: #ffffff;
}

.work-order-table th {
    background: #f5f5f6;
    color: #70707a;
}

.work-order-table td,
.breadcrumb strong,
.status-list span,
.activity-list strong,
.dashboard-mini-table strong,
.pr-utilization-list strong,
.balance-row strong {
    color: #222226;
}

.work-order-table tbody tr:hover td,
.client-type-card,
.payment-summary-grid div,
.dashboard-split-stats div,
.searchable-options button:hover {
    background: #f7f7f8;
}

input,
select,
textarea,
.work-order-form input,
.work-order-form select,
.work-order-form textarea,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.table-filter-control select {
    border-color: #ddddE3;
    background: #ffffff;
    color: #111113;
}

input:focus,
select:focus,
textarea:focus,
.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.table-filter-control select:focus {
    border-color: #b7cdf5;
    box-shadow: 0 0 0 4px rgba(143, 189, 244, 0.22);
}

button,
.topbar a {
    background: #111113;
    color: #ffffff;
}

button:hover,
.topbar a:hover {
    background: #000000;
}

.panel-action,
.table-action-button {
    background: #f7f7f8;
}

.table-action-button.select {
    border-color: #cfdcf8;
    background: #f1f5ff;
    color: #2b58d8;
}

.table-action-button.pay,
.status-badge.paid,
.status-badge.create {
    border-color: #cfeadc;
    background: #eef8f2;
    color: #12683b;
}

.table-action-button.danger,
.status-badge.unpaid,
.status-badge.delete {
    border-color: #f2cdcf;
    background: #fff1f2;
    color: #c0262d;
}

.status-badge.partial,
.status-badge.update,
.mockup-badge {
    background: #fff7df;
    color: #8a6100;
}

.trend.up,
.status-list strong,
.dashboard-mini-table em,
.pr-utilization-list em {
    color: #111113;
}

.trend.warn {
    color: #8a6100;
}

.trend.down,
.balance-row > div:last-child strong {
    color: #c0262d;
}

.dot {
    background: #111113;
    box-shadow: 0 0 0 5px rgba(17, 17, 19, 0.08);
}

.dot.amber {
    background: #e1b84f;
    box-shadow: 0 0 0 5px rgba(225, 184, 79, 0.14);
}

.dot.blue {
    background: #8fbdf4;
    box-shadow: 0 0 0 5px rgba(143, 189, 244, 0.18);
}

.status-list i,
.balance-row i,
.pr-utilization-list i {
    background: #e8e8ec;
}

.status-list i::before,
.balance-row i::before,
.pr-utilization-list i::before,
.compact-status-list i.up::before {
    background: #111113;
}

.compact-status-list i.warn::before {
    background: #e1b84f;
}

.compact-status-list i.down::before {
    background: #c0262d;
}

.breadcrumb a {
    color: #111113;
}

.dashboard-hero,
.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card {
    border-radius: 12px;
}

.brand-panel {
    background:
        linear-gradient(135deg, rgba(17, 17, 19, 0.86), rgba(70, 82, 107, 0.78)),
        url("../images/food-pattern.svg");
}

/* Typography softening for a cleaner, lighter interface. */
body,
input,
select,
textarea,
button {
    font-weight: 400;
}

.sidebar-nav a,
.nav-group summary,
.breadcrumb,
.dataTables_wrapper,
.work-order-table td,
.work-order-form label,
.modal-panel label,
.login-card label,
.table-filter-control label,
.client-type-card,
.status-list,
.activity-list,
.dashboard-mini-table,
.pr-utilization-list,
.balance-row {
    font-weight: 500;
}

.sidebar-brand strong,
.user-pill strong,
.breadcrumb strong,
.panel-header h2,
.modal-header h2,
.form-header h2,
.client-profile-title h2,
.work-order-table td strong,
.activity-list strong,
.dashboard-mini-table strong,
.pr-utilization-list strong,
.balance-row strong,
.metric-card h3,
.metric-card small,
.status-list strong {
    font-weight: 600;
}

.page-title h1,
.login-card h2,
.brand-panel h1,
.metric-card strong,
.dashboard-hero h2,
.hero-score strong,
.dashboard-split-stats strong {
    font-weight: 700;
}

.eyebrow,
.work-order-table th,
.status-badge,
.table-action-button,
.panel-action,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.trend,
.mockup-badge {
    font-weight: 600;
}

/* Mint premium theme inspired by the latest reference image. */
:root {
    --bg: #c7f0d8;
    --panel: #ffffff;
    --panel-soft: #f6fff9;
    --ink: #141715;
    --muted: #68766f;
    --primary: #2ec477;
    --primary-dark: #16a760;
    --primary-soft: #d7f8e5;
    --accent: #73dca8;
    --border: #dff3e7;
    --shadow: 0 18px 42px rgba(31, 134, 83, 0.16);
    --shadow-soft: 0 10px 26px rgba(31, 134, 83, 0.12);
}

body,
.app-shell,
.main-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(199, 240, 216, 0.78)),
        #c7f0d8;
    color: var(--ink);
}

.sidebar {
    background: rgba(255, 255, 255, 0.88);
    border-right: 1px solid rgba(46, 196, 119, 0.18);
    box-shadow: 16px 0 42px rgba(31, 134, 83, 0.12);
}

.sidebar::before,
.sidebar::after {
    background: rgba(46, 196, 119, 0.16);
}

.sidebar-brand {
    border-bottom-color: rgba(46, 196, 119, 0.16);
}

.brand-seal {
    background: #151817;
    color: #ffffff;
    box-shadow: 0 16px 26px rgba(31, 134, 83, 0.18);
}

.sidebar-nav p,
.sidebar-brand small,
.user-pill small,
.breadcrumb span,
.work-order-table th,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: #6e7d75;
}

.sidebar-nav a,
.nav-group summary {
    color: #2d3631;
}

.sidebar-nav a:hover,
.nav-group summary:hover,
.sidebar-nav a.active,
.nav-submenu a.active {
    background: #eefbf4;
    color: #111513;
}

.sidebar-nav a.active,
.nav-submenu a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-submenu {
    border-left-color: rgba(46, 196, 119, 0.22);
}

.logout-link {
    background: #fff6f6;
    border-color: #f5d4d4;
    color: #c43d3d !important;
}

.topbar,
.page-header {
    background: rgba(255, 255, 255, 0.78);
    border-bottom-color: rgba(46, 196, 119, 0.16);
}

.user-pill,
.notification-button,
.mobile-menu-button {
    background: #ffffff;
    border-color: rgba(46, 196, 119, 0.18);
    box-shadow: var(--shadow-soft);
}

.avatar {
    background: #e4f9ed;
    color: #178c52;
}

.page-title .eyebrow,
.eyebrow,
.breadcrumb a,
.panel-action,
.table-client-link:hover strong,
.table-client-link:focus-visible strong {
    color: #178c52;
}

.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card,
.payment-summary-grid div,
.dashboard-split-stats div,
.upfront-payment-fields,
.dashboard-hero {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(46, 196, 119, 0.16);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.metric-grid .metric-card:nth-child(4n + 1),
.metric-grid .metric-card:nth-child(4n + 2),
.metric-grid .metric-card:nth-child(4n + 3),
.metric-grid .metric-card:nth-child(4n + 4) {
    background: rgba(255, 255, 255, 0.92);
}

.metric-card::after {
    background: linear-gradient(90deg, rgba(46, 196, 119, 0.52), rgba(205, 250, 225, 0));
}

.metric-icon,
.metric-icon.blue,
.metric-icon.amber,
.metric-icon.red,
.client-type-icon,
.client-type-icon.blue {
    background: #e9fbf1;
    color: #18a65f;
}

.metric-icon.amber {
    background: #fff7dc;
    color: #ad7b00;
}

.metric-icon.red {
    background: #fff0f0;
    color: #c43d3d;
}

.dashboard-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 255, 247, 0.94));
}

.hero-score {
    background: #f4fff8;
    border-color: rgba(46, 196, 119, 0.18);
}

.hero-score i,
.status-list i,
.balance-row i,
.pr-utilization-list i {
    background: #dff8ea;
}

.hero-score i::before,
.status-list i::before,
.balance-row i::before,
.pr-utilization-list i::before,
.compact-status-list i.up::before,
.dot {
    background: #2ec477;
}

.dot {
    box-shadow: 0 0 0 5px rgba(46, 196, 119, 0.16);
}

.dot.blue {
    background: #72c7ef;
    box-shadow: 0 0 0 5px rgba(114, 199, 239, 0.16);
}

.dot.amber {
    background: #f5c84f;
    box-shadow: 0 0 0 5px rgba(245, 200, 79, 0.18);
}

.work-order-table th {
    background: #f3fbf6;
}

.work-order-table td {
    color: #202722;
}

.work-order-table tbody tr:hover td,
.client-type-card,
.searchable-options button:hover,
.payment-summary-grid div,
.dashboard-split-stats div {
    background: #f5fff9;
}

input,
select,
textarea,
.work-order-form input,
.work-order-form select,
.work-order-form textarea,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.table-filter-control select,
.searchable-select-control {
    background: #ffffff;
    border-color: #cfeadc;
    color: #141715;
}

input:focus,
select:focus,
textarea:focus,
.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.table-filter-control select:focus,
.searchable-select-control:focus-within {
    border-color: #7ee0aa;
    box-shadow: 0 0 0 4px rgba(46, 196, 119, 0.16);
}

button,
.topbar a,
.login-card button {
    background: #2ec477;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(46, 196, 119, 0.22);
}

button:hover,
.topbar a:hover,
.login-card button:hover {
    background: #16a760;
}

.panel-action,
.table-action-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #ffffff;
    border-color: rgba(46, 196, 119, 0.22);
    color: #178c52;
    box-shadow: 0 8px 18px rgba(31, 134, 83, 0.1);
}

.table-action-button.select {
    border-color: #bdebd0;
    background: #effbf4;
    color: #15814d;
}

.table-action-button.pay,
.status-badge.paid,
.status-badge.create {
    border-color: #bdebd0;
    background: #eafbf2;
    color: #12824a;
}

.table-action-button.danger,
.status-badge.unpaid,
.status-badge.delete {
    border-color: #f4cccc;
    background: #fff1f1;
    color: #c43d3d;
}

.status-badge.partial,
.status-badge.update,
.mockup-badge {
    border-color: #f2df9a;
    background: #fff8df;
    color: #8b6500;
}

.trend.up,
.status-list strong,
.dashboard-mini-table em,
.pr-utilization-list em {
    color: #178c52;
}

.trend.warn,
.compact-status-list i.warn::before {
    color: #8b6500;
}

.compact-status-list i.warn::before {
    background: #f5c84f;
}

.trend.down,
.balance-row > div:last-child strong,
.compact-status-list i.down::before {
    color: #c43d3d;
}

.compact-status-list i.down::before {
    background: #c43d3d;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #e5faee !important;
    border-color: #9ee8bd !important;
    color: #12824a !important;
}

.swal-modal {
    border-color: rgba(46, 196, 119, 0.18);
    box-shadow: 0 24px 52px rgba(31, 134, 83, 0.22);
}

.swal-icon.swal-success {
    background: #e7fbef;
    color: #18a65f;
}

.brand-panel {
    background:
        linear-gradient(135deg, rgba(32, 184, 104, 0.86), rgba(199, 240, 216, 0.72)),
        url("../images/food-pattern.svg");
}

/* Smaller metric values so money totals fit cleanly inside cards. */
.metric-card strong {
    font-size: clamp(20px, 1.8vw, 26px);
    line-height: 1.08;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.metric-card p {
    font-size: 12px;
}

.metric-card span {
    font-size: 11px;
}

.dashboard-split-stats strong,
.payment-summary-grid strong {
    font-size: clamp(18px, 1.7vw, 24px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
    .metric-card strong {
        font-size: clamp(18px, 1.65vw, 23px);
    }
}

/* Final value scale override for every card across the system. */
.metric-card > div {
    min-width: 0;
}

.metric-card strong,
.metric-card h3,
.dashboard-split-stats strong,
.payment-summary-grid strong,
.client-profile-band strong,
.client-type-card strong,
.status-list strong,
.activity-list strong,
.balance-row strong,
.dashboard-mini-table strong,
.pr-utilization-list strong,
.compact-status-list strong {
    font-size: clamp(17px, 1.25vw, 22px) !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
}

.metric-card strong {
    display: block;
}

.metric-card p,
.metric-card small,
.metric-card span,
.dashboard-split-stats small,
.payment-summary-grid small,
.client-profile-band span,
.client-type-card small {
    font-size: 11px !important;
    line-height: 1.35 !important;
}

@media (max-width: 1280px) {
    .metric-card strong,
    .metric-card h3,
    .dashboard-split-stats strong,
    .payment-summary-grid strong,
    .client-profile-band strong,
    .client-type-card strong,
    .status-list strong,
    .activity-list strong,
    .balance-row strong,
    .dashboard-mini-table strong,
    .pr-utilization-list strong,
    .compact-status-list strong {
        font-size: clamp(16px, 1.1vw, 20px) !important;
    }
}

/* Soft UI / Neumorphism theme layer. */
:root {
    --bg: #e8ecff;
    --panel: #ffffff;
    --panel-soft: #f8f7ff;
    --ink: #1F2937;
    --muted: #6B7280;
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-soft: #E0E7FF;
    --accent: #8B5CF6;
    --border: #E5E7EB;
    --danger: #EF4444;
    --shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
    --shadow-soft: 6px 6px 14px rgba(209, 217, 230, 0.78), -6px -6px 14px rgba(255, 255, 255, 0.92);
    --shadow-inset: inset 5px 5px 10px rgba(209, 217, 230, 0.72), inset -5px -5px 10px rgba(255, 255, 255, 0.92);
}

html,
body {
    background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 48%, #F5F3FF 100%) fixed;
    color: var(--ink);
}

body,
.app-shell,
.main-content,
.content-area {
    background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 48%, #F5F3FF 100%) fixed;
}

.main-content {
    gap: 22px;
}

.content-area {
    padding: 26px 30px 34px;
}

.sidebar {
    background: rgba(241, 245, 249, 0.92);
    border-right: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 10px 0 24px rgba(148, 163, 184, 0.16), -8px 0 16px rgba(255, 255, 255, 0.7);
}

.sidebar-brand {
    border-bottom-color: rgba(229, 231, 235, 0.9);
}

.brand-seal {
    background: linear-gradient(145deg, #EEF2FF, #FFFFFF);
    color: #4F46E5;
    box-shadow: var(--shadow-soft);
}

.sidebar-brand strong,
.page-title h1,
.panel h2,
.modal-header h2,
.form-header h2 {
    color: var(--ink);
}

.sidebar-brand small,
.user-pill small,
.sidebar-nav p,
.breadcrumb,
.breadcrumb span,
.work-order-table th,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.table-filter-control,
.metric-card p,
.panel p {
    color: var(--muted);
}

.sidebar-nav a,
.nav-group summary,
.breadcrumb strong {
    color: var(--ink);
}

.sidebar-nav a,
.nav-group summary,
.quick-actions a,
.panel-action,
.table-action-button,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.notification-button,
.mobile-menu-button,
.user-pill,
.icon-button {
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.sidebar-nav a:hover,
.nav-group summary:hover,
.sidebar-nav a.active,
.nav-submenu a.active {
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    color: #4F46E5;
    box-shadow: inset 4px 4px 8px rgba(209, 217, 230, 0.75), inset -4px -4px 8px rgba(255, 255, 255, 0.95);
}

.sidebar-nav a.active,
.nav-submenu a.active {
    box-shadow: inset 4px 4px 8px rgba(209, 217, 230, 0.75), inset -4px -4px 8px rgba(255, 255, 255, 0.95), inset 3px 0 0 #6366F1;
}

.nav-submenu {
    border-left-color: rgba(99, 102, 241, 0.18);
}

.logout-link {
    background: #fff7fb;
    border-color: #FECACA;
    color: #DC2626 !important;
    box-shadow: var(--shadow-soft);
}

.topbar,
.page-header {
    background: rgba(245, 243, 255, 0.82);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
    backdrop-filter: blur(18px);
}

.notification-button,
.mobile-menu-button,
.user-pill,
.avatar {
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    border-color: rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-soft);
}

.avatar {
    color: #4F46E5;
}

.breadcrumb a,
.page-title .eyebrow,
.eyebrow,
.trend.up,
.status-list strong,
.dashboard-mini-table em,
.pr-utilization-list em {
    color: #4F46E5;
}

.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card,
.payment-summary-grid div,
.dashboard-split-stats div,
.upfront-payment-fields,
.dashboard-hero,
.client-type-card,
.searchable-options button {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.metric-card,
.panel,
.client-profile-band,
.payment-summary-grid div,
.dashboard-split-stats div,
.client-type-card,
.quick-actions a,
.table-action-button,
.panel-action {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.metric-card:hover,
.panel-action:hover,
.table-action-button:hover,
.client-type-card:hover,
.quick-actions a:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    transform: translateY(-2px);
    box-shadow: 10px 10px 20px rgba(209, 217, 230, 0.9), -10px -10px 20px rgba(255, 255, 255, 0.95);
}

.metric-grid .metric-card:nth-child(4n + 1),
.metric-grid .metric-card:nth-child(4n + 2),
.metric-grid .metric-card:nth-child(4n + 3),
.metric-grid .metric-card:nth-child(4n + 4) {
    background: rgba(255, 255, 255, 0.86);
}

.metric-card::after {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.36), rgba(139, 92, 246, 0));
}

.metric-icon,
.metric-icon.blue,
.metric-icon.amber,
.metric-icon.red,
.client-type-icon,
.client-type-icon.blue {
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    color: #6366F1;
    box-shadow: var(--shadow-soft);
}

.metric-icon.amber,
.status-badge.partial,
.status-badge.update,
.mockup-badge {
    color: #7C3AED;
}

.metric-icon.red {
    color: #EF4444;
}

.dashboard-hero {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(238, 242, 255, 0.86));
}

.hero-score,
.status-list i,
.balance-row i,
.pr-utilization-list i {
    background: #EEF2FF;
    box-shadow: var(--shadow-inset);
}

.hero-score i::before,
.status-list i::before,
.balance-row i::before,
.pr-utilization-list i::before,
.compact-status-list i.up::before,
.dot {
    background: #6366F1;
}

.dot {
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.14);
}

.dot.blue {
    background: #8B5CF6;
    box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.16);
}

.dot.amber,
.compact-status-list i.warn::before {
    background: #A78BFA;
    box-shadow: 0 0 0 5px rgba(167, 139, 250, 0.18);
}

.work-order-table th {
    background: rgba(238, 242, 255, 0.72);
    color: #6B7280;
}

.work-order-table td {
    color: #1F2937;
}

.work-order-table tbody tr:hover td,
.searchable-options button:hover {
    background: rgba(238, 242, 255, 0.48);
}

input,
select,
textarea,
.work-order-form input,
.work-order-form select,
.work-order-form textarea,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.table-filter-control select,
.searchable-select-control {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(229, 231, 235, 0.95);
    color: #1F2937;
    border-radius: 14px;
    box-shadow: var(--shadow-inset);
}

input:focus,
select:focus,
textarea:focus,
.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.table-filter-control select:focus,
.searchable-select-control:focus-within {
    border-color: rgba(99, 102, 241, 0.58);
    box-shadow: inset 4px 4px 8px rgba(209, 217, 230, 0.72), inset -4px -4px 8px rgba(255, 255, 255, 0.92), 0 0 0 4px rgba(99, 102, 241, 0.13);
}

button,
.topbar a,
.login-card button,
.panel-action,
.table-action-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    border-color: rgba(229, 231, 235, 0.92);
    color: #4F46E5;
    box-shadow: var(--shadow-soft);
}

button:hover,
.topbar a:hover,
.login-card button:hover {
    background: linear-gradient(145deg, #EEF2FF, #FFFFFF);
    color: #4338CA;
    transform: translateY(-2px);
}

.login-card button,
button[type="submit"]:not(.table-action-button) {
    background: linear-gradient(145deg, #818CF8, #6366F1);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.32);
}

.table-action-button.select,
.table-action-button.pay,
.status-badge.paid,
.status-badge.create {
    border-color: rgba(99, 102, 241, 0.18);
    background: #EEF2FF;
    color: #4F46E5;
}

.status-badge.partial,
.status-badge.update,
.mockup-badge {
    border-color: rgba(139, 92, 246, 0.18);
    background: #F5F3FF;
}

.table-action-button.danger,
.status-badge.unpaid,
.status-badge.delete {
    border-color: #FECACA;
    background: #FFF1F2;
    color: #DC2626;
}

.trend.warn {
    color: #7C3AED;
}

.trend.down,
.balance-row > div:last-child strong,
.compact-status-list i.down::before {
    color: #DC2626;
}

.compact-status-list i.down::before {
    background: #EF4444;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #E0E7FF !important;
    border-color: rgba(99, 102, 241, 0.28) !important;
    color: #4F46E5 !important;
    box-shadow: var(--shadow-inset) !important;
}

.swal-modal {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.swal-icon.swal-success {
    background: #E0E7FF;
    color: #4F46E5;
}

.brand-panel {
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.78), rgba(139, 92, 246, 0.56)),
        url("../images/food-pattern.svg");
}

@media (max-width: 900px) {
    .content-area {
        padding: 18px 14px 24px;
    }

    .metric-card,
    .panel,
    .client-profile-band,
    .modal-panel,
    .login-card {
        border-radius: 18px;
    }

    .panel-header,
    .modal-header {
        gap: 12px;
    }
}

/* Final status and Swal polish. */
.swal-overlay {
    background: rgba(31, 41, 55, 0.24);
    backdrop-filter: none;
}

.swal-modal {
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: 0 16px 34px rgba(31, 41, 55, 0.16);
}

.swal-icon {
    box-shadow: none;
}

.swal-icon.swal-success,
.swal-success {
    background: #DCFCE7;
    color: #15803D;
}

.swal-icon.swal-error,
.swal-error {
    background: #FEE2E2;
    color: #B91C1C;
}

.status-badge.paid {
    border-color: #BBF7D0 !important;
    background: #DCFCE7 !important;
    color: #15803D !important;
}

.status-badge.partial {
    border-color: #FDE68A !important;
    background: #FEF3C7 !important;
    color: #92400E !important;
}

.status-badge.unpaid {
    border-color: #FECACA !important;
    background: #FEE2E2 !important;
    color: #B91C1C !important;
}

.brand-panel > .eyebrow {
    color: #111827 !important;
}

.compact-status-list i.up::before {
    background: #22C55E !important;
}

.compact-status-list i.warn::before {
    background: #FACC15 !important;
}

.compact-status-list i.down::before {
    background: #EF4444 !important;
}

.hero-score i {
    background: #EF4444 !important;
}

.hero-score i::before {
    background: #16A34A !important;
}

/* Final money semantics and action colors. */
.peso-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 1.25em;
    font-weight: 800;
    line-height: 1;
}

[data-stat="total_amount"],
[data-stat="total_budget"],
[data-work-order-stat="amount"],
#pay_total_amount,
#view_total_amount,
#view_payment_total_amount,
#private_view_payment_total_amount,
#view_pr_total_amount,
#wo_pr_total_amount,
.amount-value,
.amount-heading {
    color: #111827 !important;
}

[data-stat="total_paid"],
[data-work-order-stat="paid"],
#pay_total_paid,
#view_payment_total_paid,
#private_view_payment_total_paid,
.paid-value,
.paid-heading {
    color: #166534 !important;
}

[data-stat="running_balance"],
[data-stat="pr_running_balance"],
[data-stat="work_order_running_balance"],
[data-work-order-stat="balance"],
#pay_remaining_balance,
#view_payment_balance,
#private_view_payment_balance,
.balance-value,
.balance-heading {
    color: #DC2626 !important;
}

#workOrdersTable th:nth-child(4),
#workOrdersTable td:nth-child(4),
#clientWorkOrdersTable th:nth-child(4),
#clientWorkOrdersTable td:nth-child(4),
#prWorkOrdersTable th:nth-child(5),
#prWorkOrdersTable td:nth-child(5),
#runningBalancesTable th:nth-child(4),
#runningBalancesTable td:nth-child(4) {
    color: #111827 !important;
}

#workOrdersTable th:nth-child(5),
#workOrdersTable td:nth-child(5),
#clientWorkOrdersTable th:nth-child(5),
#clientWorkOrdersTable td:nth-child(5),
#prWorkOrdersTable th:nth-child(6),
#prWorkOrdersTable td:nth-child(6),
#runningBalancesTable th:nth-child(5),
#runningBalancesTable td:nth-child(5),
#paymentHistoryTable th:nth-child(7),
#paymentHistoryTable td:nth-child(7) {
    color: #166534 !important;
}

#workOrdersTable th:nth-child(6),
#workOrdersTable td:nth-child(6),
#clientWorkOrdersTable th:nth-child(6),
#clientWorkOrdersTable td:nth-child(6),
#prWorkOrdersTable th:nth-child(7),
#prWorkOrdersTable td:nth-child(7),
#runningBalancesTable th:nth-child(6),
#runningBalancesTable td:nth-child(6),
#privateClientsTable th:nth-child(6),
#privateClientsTable td:nth-child(6) {
    color: #DC2626 !important;
}

.table-action-button.pay {
    border-color: #BBF7D0 !important;
    background: #DCFCE7 !important;
    color: #166534 !important;
}

.table-action-button.select {
    border-color: #BAE6FD !important;
    background: #E0F2FE !important;
    color: #0369A1 !important;
}

.table-action-button:not(.pay):not(.select):not(.danger) {
    border-color: #C7D2FE !important;
    background: #EEF2FF !important;
    color: #4F46E5 !important;
}

.table-action-button.danger {
    border-color: #FECACA !important;
    background: #FEE2E2 !important;
    color: #B91C1C !important;
}

/* Remove modal glow across the system. */
.modal-backdrop {
    background: rgba(31, 41, 55, 0.32) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-panel {
    opacity: 1 !important;
    background: #ffffff !important;
    box-shadow: 0 18px 42px rgba(31, 41, 55, 0.18) !important;
}

.modal-header,
.modal-body,
.modal-form,
.modal-panel .work-order-form {
    background: #ffffff !important;
}

.modal-panel::before,
.modal-panel::after {
    display: none !important;
}

/* Uptown Pickle Yard inspired simple admin theme. */
:root {
    --bg: #f0f4f7;
    --panel: #ffffff;
    --panel-soft: #f8f9fa;
    --ink: #001b2f;
    --muted: #6c757d;
    --primary: #537AEF;
    --primary-dark: #4262bf;
    --primary-soft: #dde4fc;
    --accent: #8c57d1;
    --success: #29aa85;
    --warning: #eb9d59;
    --danger: #ec8290;
    --border: #dee2e6;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
    --shadow-inset: none;
}

html,
body,
.app-shell,
.main-content,
.content-area {
    background: #f0f4f7 !important;
    color: #4a5a6b;
}

body {
    font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.content-area {
    padding: 18px 22px 26px;
}

.sidebar {
    background: #ffffff !important;
    border-right: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04) !important;
}

.sidebar::before,
.sidebar::after {
    display: none !important;
}

.sidebar-brand {
    border-bottom-color: #dee2e6;
}

.brand-seal {
    background: #537AEF !important;
    color: #ffffff !important;
    border-radius: 8px;
    box-shadow: none !important;
}

.sidebar-brand strong,
.page-title h1,
.panel h2,
.modal-header h2,
.form-header h2,
.client-profile-title h2 {
    color: #001b2f !important;
    font-weight: 600;
}

.sidebar-brand small,
.sidebar-nav p,
.breadcrumb,
.breadcrumb span,
.work-order-table th,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.table-filter-control,
.metric-card p,
.panel p,
.user-pill small {
    color: #6c757d !important;
}

.sidebar-nav a,
.nav-group summary {
    min-height: 40px;
    border-radius: 8px;
    color: #4a5a6b !important;
    box-shadow: none !important;
}

.sidebar-nav a:hover,
.nav-group summary:hover,
.sidebar-nav a.active,
.nav-submenu a.active {
    background: #f0f4f7 !important;
    color: #537AEF !important;
    box-shadow: none !important;
}

.sidebar-nav a.active,
.nav-submenu a.active {
    border-left: 3px solid #537AEF;
}

.nav-submenu {
    border-left-color: #dee2e6;
}

.logout-link {
    background: #fff5f6 !important;
    border-color: #f7cdd3 !important;
    color: #d85f6f !important;
    box-shadow: none !important;
}

.dashboard-header,
.topbar,
.page-header {
    background: #ffffff !important;
    border-bottom: 1px solid #dee2e6 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.notification-button,
.mobile-menu-button,
.user-pill,
.avatar,
.icon-button {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    color: #4a5a6b !important;
    box-shadow: none !important;
}

.avatar,
.user-pill span {
    background: #f0f4f7 !important;
    color: #001b2f !important;
}

.breadcrumb a,
.page-title .eyebrow,
.eyebrow,
.trend.up,
.status-list strong,
.dashboard-mini-table em,
.pr-utilization-list em {
    color: #537AEF !important;
}

.metric-card,
.panel,
.client-profile-band,
.modal-panel,
.login-card,
.payment-summary-grid div,
.dashboard-split-stats div,
.upfront-payment-fields,
.dashboard-hero,
.client-type-card,
.searchable-options button {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

.metric-card:hover,
.panel-action:hover,
.table-action-button:hover,
.client-type-card:hover,
.quick-actions a:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
button:hover,
.topbar a:hover,
.login-card button:hover {
    transform: none !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

.metric-grid {
    gap: 16px;
}

.metric-card {
    min-height: 108px;
    padding: 16px;
}

.metric-card::after {
    display: none !important;
}

.metric-icon,
.metric-icon.blue,
.metric-icon.amber,
.metric-icon.red,
.client-type-icon,
.client-type-icon.blue {
    background: #dde4fc !important;
    color: #537AEF !important;
    border-radius: 8px;
    box-shadow: none !important;
}

.metric-icon.amber {
    background: #fbebde !important;
    color: #e68434 !important;
}

.metric-icon.red {
    background: #fbe6e9 !important;
    color: #ec8290 !important;
}

.metric-card strong,
.metric-card h3 {
    color: #001b2f;
    font-size: clamp(18px, 1.45vw, 24px) !important;
}

.panel-header,
.modal-header {
    min-height: 0;
    padding: 16px 18px;
    background: #ffffff !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.dataTables_wrapper {
    padding: 16px 18px;
}

.work-order-table {
    min-width: 960px;
}

.work-order-table th {
    background: #f0f4f7 !important;
    color: #6c757d !important;
    font-size: 12px;
}

.work-order-table th,
.work-order-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #dee2e6;
}

.work-order-table tbody tr:hover td {
    background: #f8f9fa !important;
}

input,
select,
textarea,
.work-order-form input,
.work-order-form select,
.work-order-form textarea,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.table-filter-control select,
.searchable-select-control {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    color: #4a5a6b !important;
    box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.table-filter-control select:focus,
.searchable-select-control:focus-within {
    border-color: #537AEF !important;
    box-shadow: 0 0 0 0.18rem rgba(83, 122, 239, 0.14) !important;
}

button,
.topbar a,
.login-card button,
.panel-action,
.table-action-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    color: #537AEF !important;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04) !important;
}

.login-card button,
button[type="submit"]:not(.table-action-button) {
    background: #537AEF !important;
    border-color: #537AEF !important;
    color: #ffffff !important;
}

.status-badge,
.mockup-badge {
    min-height: 24px;
    border-radius: 999px;
    font-size: 11px;
}

.status-badge.paid,
.status-badge.create,
.table-action-button.pay {
    border-color: #a9ddce !important;
    background: #d4eee7 !important;
    color: #104435 !important;
}

.status-badge.partial,
.status-badge.update {
    border-color: #f7d8bd !important;
    background: #fbebde !important;
    color: #5e3f24 !important;
}

.status-badge.unpaid,
.status-badge.delete,
.table-action-button.danger {
    border-color: #f7cdd3 !important;
    background: #fbe6e9 !important;
    color: #b84f5e !important;
}

.table-action-button.select {
    border-color: #c0e2f5 !important;
    background: #e0f1fa !important;
    color: #27495c !important;
}

.table-action-button:not(.pay):not(.select):not(.danger) {
    border-color: #bacaf9 !important;
    background: #dde4fc !important;
    color: #213160 !important;
}

[data-stat="total_amount"],
[data-stat="total_budget"],
[data-work-order-stat="amount"],
#pay_total_amount,
#view_total_amount,
#view_payment_total_amount,
#private_view_payment_total_amount,
#view_pr_total_amount,
#wo_pr_total_amount,
.amount-value,
.amount-heading {
    color: #001b2f !important;
}

[data-stat="total_paid"],
[data-work-order-stat="paid"],
#pay_total_paid,
#view_payment_total_paid,
#private_view_payment_total_paid,
.paid-value,
.paid-heading {
    color: #104435 !important;
}

[data-stat="running_balance"],
[data-stat="pr_running_balance"],
[data-stat="work_order_running_balance"],
[data-work-order-stat="balance"],
#pay_remaining_balance,
#view_payment_balance,
#private_view_payment_balance,
.balance-value,
.balance-heading {
    color: #b84f5e !important;
}

.hero-score i {
    background: #f7cdd3 !important;
}

.hero-score i::before,
.compact-status-list i.up::before {
    background: #29aa85 !important;
}

.compact-status-list i.warn::before {
    background: #eb9d59 !important;
}

.compact-status-list i.down::before {
    background: #ec8290 !important;
}

.modal-backdrop,
.swal-overlay {
    background: rgba(0, 27, 47, 0.35) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-panel,
.swal-modal {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.12) !important;
}

.brand-panel {
    background:
        linear-gradient(135deg, rgba(83, 122, 239, 0.86), rgba(140, 87, 209, 0.66)),
        url("../images/food-pattern.svg") !important;
}

@media (max-width: 900px) {
    .content-area {
        padding: 14px;
    }

    .metric-card,
    .panel,
    .client-profile-band,
    .modal-panel,
    .login-card {
        border-radius: 8px !important;
    }
}

/* Uptown Pickle Yard simple admin theme reset. */
:root {
    --bg: #f0f4f7;
    --bg-soft: #f8f9fb;
    --panel: #ffffff;
    --ink: #001b2f;
    --muted: #6c757d;
    --muted-2: #8b95a1;
    --primary: #537aef;
    --primary-dark: #4262bf;
    --secondary: #8c57d1;
    --success: #29aa85;
    --success-dark: #147a61;
    --warning: #eb9d59;
    --danger: #ec8290;
    --danger-dark: #b4233a;
    --border: #dee2e6;
    --border-soft: #edf1f5;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
    --radius: 8px;
}

html,
body,
.app-shell,
.main-content,
.content-area,
.page-body,
.dashboard-shell {
    background: var(--bg) !important;
    color: var(--ink) !important;
}

body {
    font-family: "Public Sans", "Inter", "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

.main-content,
.content-area,
.page-body,
.dashboard-content,
.module-content {
    background-image: none !important;
}

.sidebar,
.app-sidebar,
.side-nav,
.left-sidebar {
    background: var(--panel) !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: none !important;
}

.sidebar-brand,
.brand-box,
.topbar,
.page-header,
.app-header,
.header,
.navbar-custom {
    background: var(--panel) !important;
    border-color: var(--border) !important;
    box-shadow: none !important;
}

.brand-logo,
.brand-mark,
.logo-mark {
    background: var(--ink) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.sidebar a,
.sidebar button,
.nav-link,
.menu-link,
.menu-item > a,
.submenu a {
    color: var(--ink) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.sidebar a:hover,
.sidebar button:hover,
.nav-link:hover,
.menu-link:hover,
.submenu a:hover {
    background: rgba(83, 122, 239, 0.08) !important;
    color: var(--primary) !important;
}

.sidebar a.active,
.sidebar .active > a,
.menu-link.active,
.submenu a.active,
.nav-link.active,
.sidebar-item.active > .sidebar-link {
    background: rgba(83, 122, 239, 0.12) !important;
    color: var(--primary) !important;
    border-left: 3px solid var(--primary) !important;
}

.section-label,
.nav-section,
.sidebar-label,
.eyebrow,
.panel-eyebrow,
.card-eyebrow {
    color: var(--muted-2) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.page-title,
.page-header h1,
.panel-title,
.card-title,
h1,
h2,
h3,
h4 {
    color: var(--ink) !important;
    letter-spacing: 0 !important;
}

.metric-card,
.stat-card,
.dashboard-card,
.panel,
.card,
.content-card,
.table-card,
.profile-card,
.client-profile-band,
.summary-card,
.login-card,
.auth-card,
.modal-panel,
.swal-modal {
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
}

.metric-card::before,
.metric-card::after,
.stat-card::before,
.stat-card::after,
.panel::before,
.panel::after,
.card::before,
.card::after,
.modal-panel::before,
.modal-panel::after,
.login-card::before,
.login-card::after {
    display: none !important;
}

.metric-card:hover,
.stat-card:hover,
.dashboard-card:hover,
.panel:hover,
.card:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.metric-icon,
.stat-icon,
.card-icon,
.summary-icon,
.icon-box {
    background: var(--bg-soft) !important;
    color: var(--primary) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-soft) !important;
}

.metric-value,
.stat-value,
.dashboard-value,
.amount-value,
.amount-heading,
[data-stat="total_amount"],
[data-stat="pr_total_amount"],
#view_pr_total_amount,
#wo_pr_total_amount {
    color: var(--ink) !important;
    font-weight: 700 !important;
}

.paid-value,
.paid-heading,
[data-stat="total_paid"],
[data-work-order-stat="paid"],
#pay_total_paid,
#view_payment_total_paid,
#private_view_payment_total_paid {
    color: var(--success-dark) !important;
}

.balance-value,
.balance-heading,
[data-stat="running_balance"],
[data-stat="pr_running_balance"],
[data-stat="work_order_running_balance"],
[data-work-order-stat="balance"],
#pay_remaining_balance,
#view_payment_balance,
#private_view_payment_balance {
    color: var(--danger-dark) !important;
}

.metric-card:has([data-stat="running_balance"]) .metric-icon,
.metric-card:has([data-stat="work_order_running_balance"]) .metric-icon,
.metric-card:has([data-work-order-stat="balance"]) .metric-icon,
.stat-card.balance .stat-icon {
    color: var(--danger-dark) !important;
}

.metric-card:has([data-stat="running_balance"]) .metric-caption,
.metric-card:has([data-stat="work_order_running_balance"]) .metric-caption,
.metric-card:has([data-work-order-stat="balance"]) .metric-caption,
.balance-caption,
.unpaid-caption {
    color: var(--danger-dark) !important;
}

.table,
table {
    color: var(--ink) !important;
}

.table thead th,
table thead th,
.dataTable thead th {
    background: var(--bg-soft) !important;
    color: var(--muted) !important;
    border-bottom: 1px solid var(--border) !important;
    letter-spacing: 0.02em !important;
}

.table tbody td,
table tbody td,
.dataTable tbody td {
    border-color: var(--border-soft) !important;
    vertical-align: middle !important;
}

.table tbody tr:hover,
table tbody tr:hover,
.dataTable tbody tr:hover {
    background: rgba(83, 122, 239, 0.04) !important;
}

input,
select,
textarea,
.form-control,
.form-select,
.dataTables_filter input,
.dataTables_length select {
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--ink) !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
.dataTables_filter input:focus,
.dataTables_length select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(83, 122, 239, 0.14) !important;
}

.btn,
button,
.action-btn,
.panel-action,
.table-action,
.page-link {
    border-radius: 8px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}

.btn:hover,
button:hover,
.action-btn:hover,
.panel-action:hover,
.table-action:hover {
    transform: translateY(-1px);
}

.btn-primary,
.primary-btn,
.panel-action.primary,
.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.primary-btn:hover,
.panel-action.primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.action-pay,
.btn-pay,
[data-action="pay"] {
    background: rgba(41, 170, 133, 0.12) !important;
    border-color: rgba(41, 170, 133, 0.28) !important;
    color: var(--success-dark) !important;
}

.action-view,
.btn-view,
[data-action="view"] {
    background: rgba(98, 183, 229, 0.16) !important;
    border-color: rgba(98, 183, 229, 0.32) !important;
    color: #237ca8 !important;
}

.action-edit,
.btn-edit,
[data-action="edit"] {
    background: rgba(83, 122, 239, 0.12) !important;
    border-color: rgba(83, 122, 239, 0.28) !important;
    color: var(--primary) !important;
}

.action-delete,
.btn-delete,
[data-action="delete"] {
    background: rgba(236, 130, 144, 0.14) !important;
    border-color: rgba(236, 130, 144, 0.32) !important;
    color: var(--danger-dark) !important;
}

.badge,
.status-badge {
    border-radius: 999px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.status-paid,
.badge-paid,
.paid,
[data-status="paid"] {
    background: rgba(41, 170, 133, 0.14) !important;
    color: var(--success-dark) !important;
}

.status-partial,
.badge-partial,
.partial,
[data-status="partial"] {
    background: rgba(235, 157, 89, 0.18) !important;
    color: #9a5b13 !important;
}

.status-unpaid,
.badge-unpaid,
.unpaid,
[data-status="unpaid"] {
    background: rgba(236, 130, 144, 0.16) !important;
    color: var(--danger-dark) !important;
}

.swal-overlay,
.modal-backdrop {
    background: rgba(0, 27, 47, 0.34) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.swal-icon,
.swal-icon::before,
.swal-icon::after,
.swal-icon--success__hide-corners {
    box-shadow: none !important;
    background: transparent !important;
}

.brand-panel {
    background: linear-gradient(135deg, #537aef, #8c57d1) !important;
    box-shadow: none !important;
}

.brand-panel::before,
.brand-panel::after {
    display: none !important;
}

.brand-panel .eyebrow,
.brand-panel > .eyebrow {
    color: #000000 !important;
}

.brand-panel h1,
.brand-panel p {
    color: #ffffff !important;
}

@media (max-width: 900px) {
    .metric-card,
    .stat-card,
    .dashboard-card,
    .panel,
    .card,
    .content-card,
    .table-card,
    .profile-card {
        border-radius: 8px !important;
    }
}

/* Work order tables: keep balance headers neutral; only unpaid row balances are red. */
#workOrdersTable th.balance-heading,
#workOrdersTable th:nth-child(6),
#clientWorkOrdersTable th:nth-child(5),
#prWorkOrdersTable th:nth-child(7),
.work-order-table thead th.balance-heading {
    color: var(--muted) !important;
}

#workOrdersTable td.balance-value,
#workOrdersTable td:nth-child(6),
#clientWorkOrdersTable td:nth-child(5),
#prWorkOrdersTable td:nth-child(7),
.work-order-table td .balance-value {
    color: var(--ink) !important;
}

#workOrdersTable td.balance-value.has-balance,
#workOrdersTable td:nth-child(6):has(.has-balance),
#clientWorkOrdersTable td:nth-child(5):has(.has-balance),
#prWorkOrdersTable td:nth-child(7):has(.has-balance),
.work-order-table td .balance-value.has-balance {
    color: var(--danger-dark) !important;
}

/* Modal close button polish. */
.modal-panel,
.modal-panel:focus,
.modal-panel:focus-visible {
    outline: 0 !important;
}

.modal-header .modal-close,
.modal-header .icon-button.modal-close {
    display: inline-flex !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.modal-header .modal-close svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.25 !important;
}

.modal-header .modal-close:hover {
    border-color: rgba(236, 130, 144, 0.45) !important;
    background: rgba(236, 130, 144, 0.1) !important;
    color: var(--danger-dark) !important;
    transform: none !important;
}

.modal-header .modal-close:focus,
.modal-header .modal-close:focus-visible {
    outline: 0 !important;
    border-color: rgba(83, 122, 239, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(83, 122, 239, 0.12) !important;
}

/* Swal delete confirmation actions. */
.swal-icon.swal-warning,
.swal-warning {
    background: rgba(235, 157, 89, 0.16) !important;
    color: #9a5b13 !important;
}

.swal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.swal-actions button {
    min-width: 108px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.swal-cancel {
    border: 1px solid var(--border) !important;
    background: #ffffff !important;
    color: var(--muted) !important;
}

.swal-cancel:hover {
    background: var(--bg-soft) !important;
    color: var(--ink) !important;
}

.swal-confirm {
    border: 1px solid rgba(180, 35, 58, 0.18) !important;
    background: var(--danger-dark) !important;
    color: #ffffff !important;
}

.swal-confirm:hover {
    background: #991b1b !important;
}

/* Slightly darker clean theme pass. */
:root {
    --bg: #e4e8f0;
    --bg-soft: #eef1f6;
    --panel: #f9fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --muted-2: #7c8798;
    --primary: #4f6fed;
    --primary-dark: #3f5dcc;
    --secondary: #7c55c7;
    --success: #218c70;
    --success-dark: #116b52;
    --warning: #d4893d;
    --danger: #d85d70;
    --danger-dark: #a61e35;
    --border: #cfd6e2;
    --border-soft: #dfe5ee;
    --shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 5px 14px rgba(15, 23, 42, 0.08);
}

html,
body,
.app-shell,
.main-content,
.content-area,
.page-body,
.dashboard-shell,
.dashboard-content,
.module-content {
    background: #e4e8f0 !important;
    color: var(--ink) !important;
}

.content-area,
.page-body,
.dashboard-content,
.module-content {
    background-image:
        radial-gradient(circle at top left, rgba(79, 111, 237, 0.08), transparent 34%),
        linear-gradient(180deg, #edf1f7 0%, #e4e8f0 100%) !important;
}

.sidebar,
.app-sidebar,
.side-nav,
.left-sidebar {
    background: #eef1f6 !important;
    border-right-color: var(--border) !important;
}

.sidebar-brand,
.brand-box,
.topbar,
.page-header,
.app-header,
.header,
.navbar-custom {
    background: #f8fafc !important;
    border-color: var(--border) !important;
}

.metric-card,
.stat-card,
.dashboard-card,
.panel,
.card,
.content-card,
.table-card,
.profile-card,
.client-profile-band,
.summary-card,
.login-card,
.auth-card,
.modal-panel,
.swal-modal {
    background: #f9fafc !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow) !important;
}

.panel-header,
.modal-header,
.card-header,
.table-panel .panel-header {
    border-color: var(--border) !important;
}

.metric-icon,
.stat-icon,
.card-icon,
.summary-icon,
.icon-box,
.notification-button,
.mobile-menu-button,
.user-pill,
.avatar,
.icon-button {
    background: #eef2f8 !important;
    border-color: var(--border) !important;
    color: var(--primary) !important;
    box-shadow: var(--shadow-soft) !important;
}

.brand-logo,
.brand-mark,
.logo-mark {
    background: #111827 !important;
    color: #ffffff !important;
}

.sidebar a,
.sidebar button,
.nav-link,
.menu-link,
.menu-item > a,
.submenu a {
    color: #273548 !important;
}

.sidebar a:hover,
.sidebar button:hover,
.nav-link:hover,
.menu-link:hover,
.submenu a:hover {
    background: rgba(79, 111, 237, 0.10) !important;
    color: var(--primary) !important;
}

.sidebar a.active,
.sidebar .active > a,
.menu-link.active,
.submenu a.active,
.nav-link.active,
.sidebar-item.active > .sidebar-link {
    background: rgba(79, 111, 237, 0.14) !important;
    color: var(--primary-dark) !important;
    border-left-color: var(--primary) !important;
}

.page-title,
.page-header h1,
.panel-title,
.card-title,
.dashboard-header h1,
.modal-header h2,
h1,
h2,
h3,
h4 {
    color: var(--ink) !important;
}

.section-label,
.nav-section,
.sidebar-label,
.eyebrow,
.panel-eyebrow,
.card-eyebrow {
    color: var(--muted-2) !important;
}

.table thead th,
table thead th,
.dataTable thead th {
    background: #e9edf4 !important;
    color: #64748b !important;
    border-bottom-color: var(--border) !important;
}

.table tbody td,
table tbody td,
.dataTable tbody td {
    border-color: var(--border-soft) !important;
}

.table tbody tr:hover,
table tbody tr:hover,
.dataTable tbody tr:hover {
    background: rgba(79, 111, 237, 0.055) !important;
}

input,
select,
textarea,
.form-control,
.form-select,
.dataTables_filter input,
.dataTables_length select {
    background: #f8fafc !important;
    border-color: var(--border) !important;
    color: var(--ink) !important;
}

input[readonly],
input:disabled,
select:disabled,
textarea:disabled {
    background: #eef2f8 !important;
    color: #526071 !important;
}

.btn-primary,
.primary-btn,
.panel-action.primary,
.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.panel-action,
.table-action-button,
.page-link,
.swal-cancel,
.modal-header .modal-close,
.modal-header .icon-button.modal-close {
    background: #f8fafc !important;
    border-color: var(--border) !important;
}

.modal-backdrop,
.swal-overlay {
    background: rgba(15, 23, 42, 0.42) !important;
}

.brand-panel {
    background: linear-gradient(135deg, #4f6fed, #7c55c7) !important;
}

/* Final card color rule: black labels/icons/captions, semantic money values only. */
.metric-card .metric-icon,
.metric-card .stat-icon,
.metric-card .card-icon,
.metric-card .summary-icon,
.metric-card .icon-box,
.stat-card .metric-icon,
.stat-card .stat-icon,
.stat-card .card-icon,
.stat-card .summary-icon,
.stat-card .icon-box,
.dashboard-card .metric-icon,
.dashboard-card .stat-icon,
.dashboard-card .card-icon,
.dashboard-card .summary-icon,
.dashboard-card .icon-box {
    color: var(--ink) !important;
}

.metric-card .metric-icon svg,
.metric-card .stat-icon svg,
.metric-card .card-icon svg,
.metric-card .summary-icon svg,
.metric-card .icon-box svg,
.stat-card .metric-icon svg,
.stat-card .stat-icon svg,
.stat-card .card-icon svg,
.stat-card .summary-icon svg,
.stat-card .icon-box svg,
.dashboard-card .metric-icon svg,
.dashboard-card .stat-icon svg,
.dashboard-card .card-icon svg,
.dashboard-card .summary-icon svg,
.dashboard-card .icon-box svg {
    color: var(--ink) !important;
    stroke: currentColor !important;
}

.metric-card p,
.metric-card span,
.metric-card small,
.metric-card .trend,
.metric-card .metric-caption,
.stat-card p,
.stat-card span,
.stat-card small,
.stat-card .trend,
.stat-card .metric-caption,
.dashboard-card p,
.dashboard-card span,
.dashboard-card small,
.dashboard-card .trend,
.dashboard-card .metric-caption,
.summary-card p,
.summary-card span,
.summary-card small,
.summary-card .trend,
.summary-card .metric-caption {
    color: var(--ink) !important;
}

.metric-card strong,
.metric-card h3,
.stat-card strong,
.stat-card h3,
.dashboard-card strong,
.dashboard-card h3,
.summary-card strong,
.summary-card h3,
[data-stat="total_amount"],
[data-stat="total_budget"],
[data-stat="work_order_total"],
[data-stat="total_clients"],
[data-stat="purchase_requests"],
[data-stat="work_orders"],
[data-work-order-stat="orders"],
[data-work-order-stat="amount"] {
    color: var(--ink) !important;
}

.metric-card [data-stat="total_paid"],
.metric-card [data-work-order-stat="paid"],
.metric-card:has([data-stat="total_paid"]) strong,
.metric-card:has([data-work-order-stat="paid"]) strong,
.dashboard-card:has([data-stat="total_paid"]) strong,
[data-stat="total_paid"],
[data-work-order-stat="paid"] {
    color: var(--success-dark) !important;
}

.metric-card [data-stat="running_balance"],
.metric-card [data-stat="pr_running_balance"],
.metric-card [data-stat="work_order_running_balance"],
.metric-card [data-work-order-stat="balance"],
.metric-card:has([data-stat="running_balance"]) strong,
.metric-card:has([data-stat="pr_running_balance"]) strong,
.metric-card:has([data-stat="work_order_running_balance"]) strong,
.metric-card:has([data-work-order-stat="balance"]) strong,
[data-stat="running_balance"],
[data-stat="pr_running_balance"],
[data-stat="work_order_running_balance"],
[data-work-order-stat="balance"] {
    color: var(--danger-dark) !important;
}

.metric-card .text-success,
.metric-card strong.text-success {
    color: var(--success-dark) !important;
}

.metric-card .text-warning,
.metric-card strong.text-warning,
.work-order-table .text-warning,
table .text-warning {
    color: var(--warning) !important;
}

.metric-card [data-stat="total_budget"],
.metric-card [data-stat="remaining_pr_budget"]:not(.text-warning) {
    color: var(--ink) !important;
}

.metric-card .peso-mark,
.stat-card .peso-mark,
.dashboard-card .peso-mark,
.summary-card .peso-mark {
    width: 1.15em !important;
    height: 1.15em !important;
    color: var(--ink) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.72em !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    line-height: 0.95 !important;
    text-align: center !important;
    transform: scaleX(1.08) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.metric-card .metric-icon:has(.peso-mark),
.metric-card .stat-icon:has(.peso-mark),
.metric-card .card-icon:has(.peso-mark),
.metric-card .summary-icon:has(.peso-mark),
.stat-card .metric-icon:has(.peso-mark),
.dashboard-card .metric-icon:has(.peso-mark),
.summary-card .metric-icon:has(.peso-mark) {
    background: #ffffff !important;
    border-color: var(--border) !important;
    color: var(--ink) !important;
}

.metric-card .metric-icon,
.metric-card .stat-icon,
.metric-card .card-icon,
.metric-card .summary-icon,
.metric-card .icon-box,
.stat-card .metric-icon,
.stat-card .stat-icon,
.stat-card .card-icon,
.stat-card .summary-icon,
.stat-card .icon-box,
.dashboard-card .metric-icon,
.dashboard-card .stat-icon,
.dashboard-card .card-icon,
.dashboard-card .summary-icon,
.dashboard-card .icon-box,
.summary-card .metric-icon,
.summary-card .stat-icon,
.summary-card .card-icon,
.summary-card .summary-icon,
.summary-card .icon-box {
    background: #ffffff !important;
    border-color: var(--border) !important;
    color: var(--ink) !important;
}

/* Final table color rule: uniform headers, normal total values. */
.table thead th,
table thead th,
.dataTable thead th,
.work-order-table thead th,
#workOrdersTable thead th,
#clientWorkOrdersTable thead th,
#prWorkOrdersTable thead th,
#runningBalancesTable thead th,
#paymentHistoryTable thead th,
#privateClientsTable thead th,
#governmentClientsTable thead th,
#purchaseRequestsTable thead th {
    color: var(--muted) !important;
}

#workOrdersTable thead tr th:nth-child(4),
#workOrdersTable thead tr th:nth-child(5),
#workOrdersTable thead tr th:nth-child(6),
#clientWorkOrdersTable thead tr th:nth-child(4),
#clientWorkOrdersTable thead tr th:nth-child(5),
#prWorkOrdersTable thead tr th:nth-child(5),
#prWorkOrdersTable thead tr th:nth-child(6),
#prWorkOrdersTable thead tr th:nth-child(7),
#runningBalancesTable thead tr th:nth-child(4),
#runningBalancesTable thead tr th:nth-child(5),
#runningBalancesTable thead tr th:nth-child(6),
#paymentHistoryTable thead tr th:nth-child(6),
#paymentHistoryTable thead tr th:nth-child(7),
#privateClientsTable thead tr th:nth-child(6),
#governmentClientsTable thead tr th,
#purchaseRequestsTable thead tr th,
.work-order-table thead th.amount-heading,
.work-order-table thead th.paid-heading,
.work-order-table thead th.balance-heading {
    color: var(--muted) !important;
}

.work-order-table td.amount-value,
.work-order-table td:nth-child(4),
#workOrdersTable td:nth-child(4),
#clientWorkOrdersTable td:nth-child(3),
#prWorkOrdersTable td:nth-child(5),
#runningBalancesTable td:nth-child(4),
#paymentHistoryTable td:nth-child(6),
td.amount-value,
td .amount-value {
    color: var(--ink) !important;
}

#governmentClientsTable td:nth-child(6),
#governmentClientsTable td .balance-value {
    color: var(--ink) !important;
}

#governmentClientsTable td:nth-child(6):has(.has-balance),
#governmentClientsTable td .balance-value.has-balance {
    color: var(--danger-dark) !important;
}

/* Running balances: zero paid values should stay neutral; only actual payments are green. */
#runningBalancesTable td:nth-child(5) {
    color: var(--ink) !important;
}

#runningBalancesTable td:nth-child(5).paid-value {
    color: var(--success-dark) !important;
}

/* Final breadcrumb rule: inactive grey, current page black. */
.breadcrumb,
nav.breadcrumb {
    color: var(--muted) !important;
}

.breadcrumb a,
nav.breadcrumb a,
.breadcrumb span,
nav.breadcrumb span {
    color: var(--muted) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.breadcrumb a:hover,
nav.breadcrumb a:hover {
    color: #334155 !important;
}

.breadcrumb svg,
nav.breadcrumb svg,
.breadcrumb i,
nav.breadcrumb i {
    color: var(--muted) !important;
    stroke: currentColor !important;
}

.breadcrumb strong,
nav.breadcrumb strong,
.breadcrumb .active,
nav.breadcrumb .active,
.breadcrumb [aria-current="page"],
nav.breadcrumb [aria-current="page"] {
    color: var(--ink) !important;
    font-weight: 800 !important;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.table-action-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

/* Sidebar brand seal stays dark like the CLMB reference mark. */
.sidebar .brand-seal,
.sidebar-brand .brand-seal {
    background: #111827 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    box-shadow: none !important;
}

/* User accounts modal: compact, properly spaced account form. */
#userModal {
    padding: 28px !important;
}

#userModal .modal-panel {
    width: min(760px, calc(100vw - 48px)) !important;
    max-height: calc(100vh - 56px) !important;
    overflow: hidden !important;
}

#userModal .modal-header {
    padding: 24px 28px 22px !important;
}

#userModal .modal-header h2 {
    font-size: 22px !important;
    line-height: 1.15 !important;
}

#userModal .modal-form {
    display: grid !important;
    gap: 22px !important;
    padding: 28px !important;
}

#userModal .form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 18px !important;
}

#userModal label {
    display: grid !important;
    gap: 8px !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

#userModal label:last-child {
    grid-column: 1 / -1 !important;
}

#userModal label > span {
    display: block !important;
    color: var(--ink) !important;
}

#userModal input,
#userModal select {
    width: 100% !important;
    min-height: 50px !important;
    padding: 0 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: var(--ink) !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

#userModal select {
    appearance: none !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%) !important;
    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 14px) 21px !important;
    background-size: 6px 6px, 6px 6px !important;
    background-repeat: no-repeat !important;
    padding-right: 42px !important;
}

#userModal input:focus,
#userModal select:focus {
    border-color: rgba(79, 111, 237, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(79, 111, 237, 0.12) !important;
}

#userModal small {
    margin: 0 !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
}

#userModal .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    padding-top: 4px !important;
}

#userModal .form-actions .panel-action {
    min-width: 150px !important;
    min-height: 48px !important;
    margin: 0 !important;
    border-radius: 10px !important;
}

@media (max-width: 720px) {
    #userModal {
        padding: 14px !important;
    }

    #userModal .modal-panel {
        width: min(100%, calc(100vw - 28px)) !important;
        max-height: calc(100vh - 28px) !important;
        overflow-y: auto !important;
    }

    #userModal .modal-header,
    #userModal .modal-form {
        padding: 20px !important;
    }

    #userModal .form-grid {
        grid-template-columns: 1fr !important;
    }

    #userModal .form-actions {
        flex-direction: column-reverse !important;
    }

#userModal .form-actions .panel-action {
    width: 100% !important;
}
}

.compact-modal-panel {
    width: min(760px, calc(100vw - 48px)) !important;
    max-height: calc(100vh - 56px) !important;
}

.ticket-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.ticket-request-text {
    display: block;
    max-width: 640px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.ticket-detail-body {
    display: grid;
    gap: 20px;
    padding: 24px;
}

.ticket-detail-body dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.ticket-detail-body dl div {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
}

.ticket-detail-body dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ticket-detail-body dd {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.ticket-detail-text {
    min-height: 120px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .ticket-summary-grid,
    .ticket-detail-body dl {
        grid-template-columns: 1fr !important;
    }
}

.main-menu-link {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    border: 1px solid rgba(79, 111, 237, 0.28);
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.main-menu-link:hover,
.main-menu-link:focus {
    border-color: rgba(79, 111, 237, 0.52);
    background: rgba(79, 111, 237, 0.08);
    color: #111827;
}

.sidebar a.logout-link {
    border-color: #f7cdd3 !important;
    background: #ffffff !important;
}

.sidebar a.logout-link span,
.sidebar a.logout-link svg {
    color: #dc2626 !important;
}

.table-action-button.text-warning:not(.pay):not(.select):not(.danger) {
    border-color: #fde68a !important;
    background: #fef3c7 !important;
    color: #111827 !important;
}
