/* Fatura Paneli V3 — airy light interface, colorful accents and top navigation */
:root {
  --app-ink: #1c2e49;
  --app-ink-soft: #3e5371;
  --app-muted: #6c7d97;
  --app-muted-light: #91a0b5;
  --app-line: #e4eaf2;
  --app-line-soft: #eef2f7;
  --app-canvas: #f7f9fc;
  --app-paper: #ffffff;
  --app-blue: #5575e7;
  --app-blue-dark: #3d5fcf;
  --app-teal: #20a990;
  --app-violet: #876fd0;
  --app-amber: #d39a3e;
  --app-rose: #d97783;
  --app-shadow: 0 6px 22px rgba(34, 55, 89, .055);
  --app-shadow-hover: 0 14px 32px rgba(34, 55, 89, .10);
  --app-radius: 18px;
}
html { min-width: 320px; background: var(--app-canvas); scroll-behavior: smooth; }
body.app-body { min-height: 100vh; margin: 0; color: var(--app-ink); background: var(--app-canvas); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body.app-body *, body.app-body *::before, body.app-body *::after { box-sizing: border-box; }
body.app-body button, body.app-body input, body.app-body select, body.app-body textarea { font: inherit; }
body.app-body a { text-decoration: none; }
body.app-body :focus-visible { outline: 3px solid rgba(85,117,231,.3); outline-offset: 2px; }
.app-shell { min-height: 100vh; background: var(--app-canvas); }
.main-shell { min-width: 0; min-height: 100vh; margin-left: 0 !important; background: var(--app-canvas); }
.app-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid #e6ebf2; background: rgba(255,255,255,.96); box-shadow: 0 4px 18px rgba(32,52,84,.035); backdrop-filter: blur(16px); }
.topbar { position: relative; z-index: auto; top: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: auto; min-height: 73px; padding: 0 clamp(20px,4vw,58px); }
.topbar-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 190px; color: #233652; }
.brand-mark { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: #fff; font-size: 15px; font-weight: 850; letter-spacing: -.09em; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; background: linear-gradient(145deg,#6c88ef 0%,#5879e6 49%,#38bca4 100%); box-shadow: 0 7px 16px rgba(81,117,225,.2); }
.brand-mark span { color: #c9fff0; }
.topbar-brand-copy { display: flex; flex-direction: column; gap: 4px; line-height: 1.2; }
.topbar-brand-copy strong { color: #233652; font-size: 13px; font-weight: 800; letter-spacing: -.025em; white-space: nowrap; }
.topbar-brand-copy small { color: #8391a6; font-size: 9px; letter-spacing: .035em; }
.topbar-brand-copy b { margin-left: 5px; color: #258f82; font-size: 8px; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.topbar-workspace { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: #62748e; font-size: 9px; font-weight: 800; letter-spacing: .08em; border: 1px solid #e7edf4; border-radius: 9px; background: #fbfcfe; }
.topbar-workspace i { width: 6px; height: 6px; border-radius: 50%; background: #37b997; box-shadow: 0 0 0 3px #e5f7f1; }
.topbar-quick-create { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 13px; color: #fff; font-size: 10px; font-weight: 740; white-space: nowrap; border: 1px solid #5473dc; border-radius: 10px; background: linear-gradient(135deg,#6a86ee,#4f6bd9); box-shadow: 0 5px 13px rgba(79,107,217,.16); transition: .16s ease; }
.topbar-quick-create:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(79,107,217,.23); }
.topbar-account { display: flex; align-items: center; gap: 7px; margin-left: 1px; padding-left: 13px; border-left: 1px solid #e9eef4; }
.topbar-account-link { display: flex; align-items: center; gap: 9px; padding: 4px 7px 4px 4px; border-radius: 12px; transition: background .16s ease; }
.topbar-account-link:hover { background: #f6f8fc; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; color: #536cc5; font-size: 12px; font-weight: 800; border: 1px solid #dfe7ff; border-radius: 13px; background: linear-gradient(145deg,#f0f3ff,#e5f8f2); }
.topbar-account-copy { display: grid; gap: 3px; line-height: 1.2; }
.topbar-account-copy strong { max-width: 150px; overflow: hidden; color: #334864; font-size: 10px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-copy small { color: #8897ad; font-size: 9px; }
.logout-form { display: flex; margin: 0; }
.logout-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: #8292a8; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; transition: .16s ease; }
.logout-button:hover { color: #bd5564; border-color: #f1dce0; background: #fff6f7; }
.icon-button, .mobile-menu-button { display: none; }

/* Top-level navigation */
.top-navigation { display: flex; align-items: center; gap: 8px; width: min(100%,1500px); min-height: 53px; margin: 0 auto; padding: 0 clamp(20px,4vw,58px); border-top: 1px solid #f1f3f7; }
.top-nav-home, .top-nav-group > summary { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 12px; color: #566a86; font-size: 10px; font-weight: 720; white-space: nowrap; border: 1px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; list-style: none; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease; }
.top-nav-home:hover, .top-nav-group > summary:hover { color: #344f9d; border-color: #edf0f6; background: #fafbfe; }
.top-nav-home.is-active, .top-nav-group.is-active > summary, .top-nav-group[open] > summary { color: var(--nav-color,#4765c4); border-color: var(--nav-border,#e0e7fb); background: var(--nav-soft,#f1f4ff); }
.top-nav-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: var(--nav-color,#5575e7); border-radius: 9px; background: var(--nav-soft,#eff3ff); }
.tone-blue { --nav-color: #526fe0; --nav-soft: #edf1ff; --nav-border: #dfe6ff; }
.tone-teal { --nav-color: #188d7b; --nav-soft: #e8f7f3; --nav-border: #d6eee7; }
.tone-violet { --nav-color: #765dbc; --nav-soft: #f1edff; --nav-border: #e6defa; }
.tone-amber { --nav-color: #a87623; --nav-soft: #fff5e4; --nav-border: #f4e7c7; }
.tone-rose { --nav-color: #ad5365; --nav-soft: #fff0f3; --nav-border: #f4dfe4; }
.top-nav-group { position: relative; display: flex; align-items: center; }
.top-nav-group > summary::-webkit-details-marker { display: none; }
.top-nav-chevron { margin-left: 1px; color: #96a3b5; font-size: 14px; line-height: 1; transition: transform .16s ease; }
.top-nav-group[open] .top-nav-chevron { transform: rotate(180deg); }
.top-nav-dropdown { position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; display: none; width: max-content; min-width: 250px; max-width: min(340px,calc(100vw - 24px)); padding: 8px; border: 1px solid #e3e9f2; border-radius: 15px; background: rgba(255,255,255,.99); box-shadow: 0 16px 34px rgba(35,53,84,.13); }
.top-nav-group[open] .top-nav-dropdown { display: grid; gap: 3px; }
.top-nav-link { display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 0 10px; color: #4f6381; font-size: 10px; font-weight: 640; border-radius: 10px; transition: color .14s ease, background .14s ease; }
.top-nav-link:hover { color: #334f9a; background: #f7f9fd; }
.top-nav-link.is-active { color: #334f9a; font-weight: 760; background: #f0f4ff; }
.top-nav-link-icon { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; color: var(--nav-color); border-radius: 9px; background: var(--nav-soft); }
.top-nav-active-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #48b99c; }
.mobile-menu-button { display: none; }

/* Main canvas and type */
.page-area { width: min(100%,1500px); min-height: calc(100vh - 126px); margin: 0 auto; padding: 36px clamp(20px,4vw,58px) 26px; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 25px; padding: 16px 2px 0; color: #8291a7; font-size: 10px; border-top: 1px solid #e5eaf1; }
.page-footer b { margin-left: 5px; color: #5b70c1; font-size: 9px; letter-spacing: .08em; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 0 0 25px; }
.page-heading h1 { margin: 7px 0 8px; color: #1e314d; font-size: clamp(29px,2.35vw,38px); font-weight: 790; line-height: 1.12; letter-spacing: -.055em; }
.page-heading p { max-width: 780px; margin: 0; color: #6e7f98; font-size: 13px; line-height: 1.6; }
.eyebrow { color: #62769a; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 16px; color: #fff; font-size: 11px; font-weight: 730; white-space: nowrap; border: 1px solid transparent; border-radius: 11px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; border-color: #5471db; background: linear-gradient(135deg,#6b86eb,#526dd7); box-shadow: 0 6px 14px rgba(82,109,215,.18); }
.button-primary:hover { color: #fff; background: linear-gradient(135deg,#5d7be4,#4862ce); box-shadow: 0 9px 20px rgba(82,109,215,.23); }
.button-secondary { color: #465b79; border-color: #dce4ef; background: #fff; box-shadow: 0 2px 7px rgba(37,57,91,.035); }
.button-secondary:hover { color: #3d5dc7; border-color: #c7d4f5; background: #f9faff; }
.button-danger-ghost { color: #a84c5b; border-color: #efd6da; background: #fff8f8; }
.button-danger-ghost:hover { color: #943b4c; border-color: #e8bec5; background: #fff1f3; }
.button-small { min-height: 35px; padding: 0 12px; font-size: 10px; border-radius: 9px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid #e4eaf2; border-radius: var(--app-radius); background: var(--app-paper); box-shadow: var(--app-shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 17px; }
.panel-heading h2 { margin: 6px 0 5px; color: #263b58; font-size: 18px; font-weight: 760; letter-spacing: -.035em; }
.panel-heading p { margin: 0; color: #75859d; font-size: 11px; line-height: 1.55; }
.alert { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 12px 15px; font-size: 12px; line-height: 1.5; border: 1px solid transparent; border-radius: 12px; box-shadow: 0 4px 12px rgba(40,58,89,.035); }
.alert-success { color: #176e56; border-color: #c9eadc; background: #f1fbf6; }
.alert-error { color: #a04453; border-color: #efd3d8; background: #fff7f8; }
.alert-info { color: #3d5ab1; border-color: #d9e2ff; background: #f5f7ff; }
.alert-warning { color: #8c6829; border-color: #f0e2c1; background: #fffbf3; }
.v3-flash { margin-bottom: 18px; }
.v3-flash > span { display: inline-flex; align-items: center; gap: 9px; }
.alert-dismiss { margin-left: auto; color: currentColor; font-size: 20px; border: 0; background: transparent; cursor: pointer; }

/* Dashboard */
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 0 0 20px; }
.metric-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 21px 22px 18px; border: 1px solid #e4eaf2; border-radius: 17px; background: #fff; box-shadow: 0 5px 17px rgba(34,53,84,.045); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-card::before { position: absolute; top: 17px; bottom: 17px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: #6580e8; content: ""; }
.metric-card:nth-child(1)::before { background: #647fe8; }
.metric-card:nth-child(2)::before { background: #e3a344; }
.metric-card:nth-child(3)::before { background: #9279d7; }
.metric-card:nth-child(4)::before { background: #3ab99a; }
.metric-card:hover { transform: translateY(-3px); border-color: #d0dcef; box-shadow: var(--app-shadow-hover); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-label { color: #5f718c; font-size: 11px; font-weight: 690; }
.metric-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; }
.metric-blue { color: #526fd8; background: #eef2ff; }
.metric-amber { color: #b6812d; background: #fff5e2; }
.metric-violet { color: #775fbd; background: #f3efff; }
.metric-green { color: #16866a; background: #e5f7f0; }
.metric-value { margin-top: 16px; color: #1d314e; font-size: 35px; font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; color: #7b8ba3; font-size: 10px; }
.metric-change { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-arrow { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: #5572d5; border-radius: 8px; background: #f0f3ff; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.82fr); align-items: start; gap: 18px; margin-bottom: 19px; }
.recent-panel, .quick-approval-panel { min-height: 100%; }
.recent-heading { padding-bottom: 17px; }
.quick-approval-panel > .panel-heading > .icon { color: #5672d3; }
.quick-list { display: grid; padding: 0 20px 15px; }
.quick-list-item { display: flex; align-items: center; gap: 11px; padding: 13px 4px; color: #405875; border-bottom: 1px solid #eef2f6; transition: color .14s ease, transform .14s ease; }
.quick-list-item:last-child { border-bottom: 0; }
.quick-list-item:hover { color: #3858c2; transform: translateX(3px); }
.quick-list-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; color: #4f6bc8; border: 1px solid #e4eaff; border-radius: 12px; background: #f0f4ff; }
.quick-list-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.quick-list-copy strong { overflow: hidden; color: #344a67; font-size: 11px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.quick-list-copy small { color: #71819a; font-size: 10px; }
.quick-list-arrow { color: #93a1b4; font-size: 17px; transition: transform .14s ease; }
.quick-list-item:hover .quick-list-arrow { color: #4566cb; transform: translateX(2px); }
.v3-empty, .empty-inline { padding: 25px 18px; color: #71819a; font-size: 12px; text-align: center; }
.v3-note { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; margin: 0 0 16px; color: #566b88; font-size: 11px; line-height: 1.65; border: 1px solid #dfe7f5; border-radius: 14px; background: linear-gradient(105deg,#f4f7ff,#fbfcff); }
.v3-note > span:first-child { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: #506bc5; border-radius: 8px; background: #e8edff; }
.v3-note strong { color: #354f92; }
.v3-note-warning { border-color: #f0e2c2; background: #fffbf3; color: #7c642f; }

/* Tables and list controls */
.table-wrap, .v3-table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d3dce8 transparent; }
.data-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; text-align: left; }
.data-table thead { background: #f8fafd; }
.data-table th { height: 45px; padding: 0 15px; color: #62748e; font-size: 9px; font-weight: 820; letter-spacing: .1em; white-space: nowrap; border-top: 1px solid #eef2f6; border-bottom: 1px solid #e7edf4; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table td { height: 62px; padding: 10px 15px; color: #435873; font-size: 11px; vertical-align: middle; border-bottom: 1px solid #eef2f6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcff; }
.table-primary-link { display: block; color: #435fc1; font-size: 11px; font-weight: 760; }
.table-primary-link:hover { color: #304eaf; text-decoration: underline; text-underline-offset: 3px; }
.table-strong { display: block; color: #334965; font-size: 11px; font-weight: 720; }
.table-subtext, .v3-small { display: block; margin-top: 4px; color: #71819a; font-size: 10px; }
.table-desc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount-cell { color: #243957 !important; font-weight: 760; white-space: nowrap; }
.status-badge, .v3-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 10px; font-weight: 740; white-space: nowrap; border-radius: 999px; }
.status-badge i, .v3-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-warning { color: #946117; background: #fff5e2; }
.status-blue { color: #405bb6; background: #eef2ff; }
.status-teal { color: #167b6b; background: #e7f7f2; }
.status-success { color: #197251; background: #e6f7ef; }
.status-danger { color: #a34150; background: #fff0f2; }
.status-violet { color: #6f53b4; background: #f2eeff; }
.v3-status { padding: 6px 10px; color: #536681; background: #f0f3f7; }
.v3-status.ok { color: #197251; background: #e6f7ef; }
.v3-status.wait { color: #946117; background: #fff5e2; }
.v3-status.bad { color: #a34150; background: #fff0f2; }
.v3-status.blue { color: #405bb6; background: #eef2ff; }
.row-action { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: #667891; font-size: 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; transition: .16s ease; }
.row-action:hover { color: #3d5dc6; border-color: #cdd8f5; background: #f4f7ff; }
.list-panel { overflow: hidden; }
.tab-row { display: flex; align-items: center; gap: 19px; overflow-x: auto; padding: 0 22px; border-bottom: 1px solid #e9eef4; scrollbar-width: none; }
.tab-row::-webkit-scrollbar { display: none; }
.tab-link { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 53px; color: #70809a; font-size: 10px; font-weight: 650; white-space: nowrap; }
.tab-link:hover { color: #405fc1; }
.tab-link.is-current { color: #3d5cc1; font-weight: 790; }
.tab-link.is-current::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg,#617de4,#3fb99d); content: ""; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; color: #435eb4; font-size: 9px; font-weight: 780; border-radius: 99px; background: #eef2ff; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 17px 22px; border-bottom: 1px solid #e9eef4; background: #fcfdff; }
.search-control, .date-filter { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 11px; color: #8796aa; border: 1px solid #dfe6ef; border-radius: 11px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.search-control { flex: 1 1 210px; min-width: 180px; }
.search-control:focus-within, .date-filter:focus-within { border-color: #aebdf0; box-shadow: 0 0 0 3px rgba(85,117,231,.09); }
.search-control input { width: 100%; min-width: 0; color: #334a68; font-size: 11px; outline: 0; border: 0; background: transparent; }
.search-control input::placeholder { color: #91a0b3; }
.date-filter { gap: 8px; }
.date-filter span { color: #71819a; font-size: 10px; white-space: nowrap; }
.date-filter input { width: 125px; color: #445a77; font-size: 10px; outline: 0; border: 0; background: transparent; }
.date-dash { color: #9ba8b9; }
.filter-submit { min-height: 42px; }
.clear-filter { padding: 7px 5px; color: #6c7e97; font-size: 10px; font-weight: 680; }
.clear-filter:hover { color: #405fc1; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px 10px; color: #71819a; font-size: 11px; }
.table-toolbar strong { color: #314966; font-weight: 800; }
.table-toolbar-meta { color: #8594aa; }
.invoice-table { min-width: 1000px; }
.invoice-table td { height: 65px; }
.pagination-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; color: #71819a; font-size: 10px; border-top: 1px solid #e9eef4; background: #fcfdff; }
.pagination-actions { display: flex; gap: 7px; }
.page-button { padding: 8px 11px; color: #516681; font-size: 10px; font-weight: 680; border: 1px solid #dfe6ef; border-radius: 9px; background: #fff; }
.page-button:hover { color: #405fc1; border-color: #cad5f3; background: #f7f9ff; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 42px 20px; text-align: center; }
.empty-state.compact { padding: 23px 14px; }
.empty-icon { display: grid; place-items: center; width: 45px; height: 45px; color: #516ed0; border: 1px solid #e2eaff; border-radius: 15px; background: #f0f4ff; }
.empty-state strong { color: #405470; font-size: 13px; font-weight: 740; }
.empty-state span:not(.empty-icon) { color: #73839b; font-size: 11px; }
.note-strip { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 13px 15px; color: #62758f; font-size: 11px; line-height: 1.6; border: 1px solid #e2e9f2; border-radius: 13px; background: #fcfdff; }
.note-strip-icon { display: grid; place-items: center; flex: 0 0 21px; width: 21px; height: 21px; color: #4b68c7; font-size: 11px; font-weight: 850; border-radius: 50%; background: #ecf1ff; }
.bulk-approval-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; color: #60738e; font-size: 11px; border-bottom: 1px solid #e7edf4; background: #f8faff; }
.bulk-approval-bar form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bulk-approval-bar button:disabled { opacity: .5; cursor: not-allowed; }

/* Invoice edit state: visible, but soft */
.invoice-edit-guide { display: flex; align-items: center; gap: 12px; margin: 0 18px 14px; padding: 14px 16px; border: 1px solid #dce5f9; border-radius: 14px; background: linear-gradient(105deg,#f3f6ff,#fcfdff); }
.invoice-edit-guide-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; color: #506bc6; border-radius: 12px; background: #e9efff; }
.invoice-edit-guide-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.invoice-edit-guide-copy strong { color: #344f89; font-size: 12px; font-weight: 800; }
.invoice-edit-guide-copy small { color: #617490; font-size: 10px; line-height: 1.55; }
.invoice-edit-legend { display: inline-flex; align-items: center; gap: 6px; color: #536984; font-size: 10px; font-weight: 740; white-space: nowrap; }
.invoice-edit-legend i { display: grid; place-items: center; width: 26px; height: 26px; color: #188268; border-radius: 8px; background: #e6f7f0; font-style: normal; }
.invoice-edit-legend i.is-locked { color: #6d7c92; background: #eef1f5; }
.invoice-row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.invoice-inline-update, .invoice-inline-lock { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 9px; font-size: 10px; font-weight: 780; white-space: nowrap; border: 1px solid; border-radius: 9px; }
.invoice-inline-update { color: #3c59bd; border-color: #d4def9; background: #f2f5ff; }
.invoice-inline-update:hover { color: #2d49a9; border-color: #b7c6f1; background: #eaf0ff; }
.invoice-inline-lock { color: #6f7e94; border-color: #e1e6ed; background: #f7f8fa; cursor: help; }
.invoice-edit-state { display: flex; align-items: center; gap: 13px; margin: 0 0 19px; padding: 15px 17px; border: 1px solid; border-radius: 15px; box-shadow: 0 4px 15px rgba(36,55,87,.035); }
.invoice-edit-state.is-open { border-color: #c8eadb; background: linear-gradient(100deg,#f0fbf6,#fff); }
.invoice-edit-state.is-locked { border-color: #e0e6ee; background: linear-gradient(100deg,#f6f8fb,#fff); }
.invoice-edit-state-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; color: #168064; border-radius: 13px; background: #e2f6ed; }
.invoice-edit-state.is-locked .invoice-edit-state-icon { color: #71819a; background: #edf1f6; }
.invoice-edit-state > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 0; }
.invoice-edit-state strong { color: #17664f; font-size: 13px; font-weight: 810; }
.invoice-edit-state.is-locked strong { color: #465a76; }
.invoice-edit-state small { color: #5e738e; font-size: 11px; line-height: 1.55; }
.invoice-edit-state-tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #167355; font-size: 10px; font-weight: 820; white-space: nowrap; border: 1px solid #d0ebdc; border-radius: 999px; background: #eaf8f0; }
.invoice-edit-state.is-locked .invoice-edit-state-tag { color: #62738b; border-color: #e1e7ee; background: #f0f3f7; }

/* Forms, details, entities, administration and reports */
.form-layout { display: grid; gap: 18px; }
.form-panel, .attachment-panel { overflow: hidden; }
.form-panel-heading { align-items: center; padding-bottom: 18px; border-bottom: 1px solid #edf1f6; }
.required-note { color: #70819a; font-size: 10px; }
.required-note i, .form-field i { color: #bf5969; font-style: normal; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 22px; padding: 24px; }
.form-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #435773; font-size: 11px; font-weight: 720; }
.form-field > span { color: #435773; }
.form-field input:not([type="file"]), .form-field select, .form-field textarea, .form-input-small { width: 100%; min-width: 0; min-height: 45px; padding: 10px 13px; color: #324967; font-size: 12px; font-weight: 500; outline: none; border: 1px solid #dfe6ef; border-radius: 11px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.form-field textarea { min-height: 98px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .form-input-small:focus { border-color: #aabaf0; box-shadow: 0 0 0 4px rgba(85,117,231,.10); }
.form-field input::placeholder, .form-field textarea::placeholder, .form-input-small::placeholder { color: #91a0b3; }
.form-field small { color: #73839a; font-size: 10px; font-weight: 500; }
.form-field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 0 24px 24px; }
.form-help-note { display: flex; gap: 9px; margin: 15px 22px 0; padding: 12px; color: #62758f; font-size: 10px; border-radius: 11px; background: #f5f7fb; }
.form-help-note > span { display: grid; place-items: center; flex: 0 0 20px; height: 20px; color: #4e68c0; border-radius: 7px; background: #ebefff; }
.form-help-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.file-limit-chip { padding: 7px 10px; color: #586c88; font-size: 10px; font-weight: 700; border: 1px solid #e0e7f0; border-radius: 9px; background: #fbfcfe; }
.upload-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; margin: 0 24px 24px; padding: 20px; text-align: center; border: 1px dashed #bbc9dd; border-radius: 15px; background: linear-gradient(180deg,#fcfdff,#f8faff); cursor: pointer; transition: .18s ease; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: #8da4e8; background: #f4f7ff; }
.upload-icon { display: grid; place-items: center; width: 44px; height: 44px; color: #4b68c5; border-radius: 14px; background: #edf1ff; }
.upload-dropzone strong { color: #344d6b; font-size: 12px; }
.upload-dropzone small { color: #71819a; font-size: 10px; }
.stacked-form { display: grid; gap: 14px; padding: 0 21px; }
.stacked-form .form-field { gap: 7px; }
.stacked-form .form-field input, .stacked-form .form-field select, .stacked-form .form-field textarea { min-height: 43px; }
.stacked-form .form-field textarea { min-height: 75px; }
.entity-type-tabs, .report-type-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 17px; }
.entity-type-tab, .report-type-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: #5a6e89; font-size: 10px; font-weight: 700; border: 1px solid #dfe6ef; border-radius: 10px; background: #fff; }
.entity-type-tab:hover, .entity-type-tab.is-active, .report-type-tab:hover, .report-type-tab.is-active { color: #3b59bd; border-color: #d2dcf6; background: #f2f5ff; }
.entity-layout, .admin-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(290px,.75fr); align-items: start; gap: 18px; }
.entity-list-panel, .admin-list-panel { overflow: hidden; }
.entity-search-form { display: flex; gap: 9px; padding: 0 22px 16px; }
.entity-search-form .search-control { flex: 1; }
.entity-table, .admin-grid .data-table { min-width: 650px; }
.entity-actions { text-align: right !important; }
.entity-actions form { display: inline; }
.delete-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; color: #a0606e; font-size: 18px; border: 1px solid #f0dfe2; border-radius: 9px; background: #fffafb; }
.delete-icon:hover { color: #a13e50; border-color: #edc6cd; background: #fff2f3; }
.entity-create-panel, .admin-create-panel { padding-bottom: 18px; }
.create-panel-icon, .help-panel-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #4b68c5; border: 1px solid #e4eaff; border-radius: 12px; background: #f0f4ff; }
.permission-chip { display: inline-block; padding: 6px 9px; color: #4b61b7; font-size: 9px; font-weight: 750; border-radius: 8px; background: #eef2ff; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > span:nth-child(2) { display: grid; gap: 4px; }
.user-cell strong { color: #344965; font-size: 11px; font-weight: 740; }
.user-cell small { color: #718099; font-size: 10px; }
.avatar-small { flex-basis: 32px; width: 32px; height: 32px; font-size: 11px; border-radius: 11px; }
.profile-settings-grid { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); align-items: start; gap: 18px; }
.profile-card { padding: 23px; }
.profile-card-identity { display: flex; align-items: center; gap: 13px; padding-bottom: 19px; border-bottom: 1px solid #e9eef4; }
.profile-avatar-large { flex-basis: 53px; width: 53px; height: 53px; font-size: 17px; }
.profile-card-identity h2 { margin: 0; color: #293e5e; font-size: 16px; font-weight: 750; }
.profile-card-identity div > span { display: block; margin-top: 4px; color: #718099; font-size: 10px; }
.profile-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; color: #718099; font-size: 11px; border-bottom: 1px solid #edf1f5; }
.profile-info-row:last-child { border: 0; }
.profile-info-row strong { color: #344a68; font-size: 11px; font-weight: 680; text-align: right; }
.profile-active { color: #167557 !important; }
.help-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.help-panel { padding: 22px; border: 1px solid #e4eaf2; border-radius: 17px; background: #fff; box-shadow: var(--app-shadow); }
.help-panel h2 { margin: 14px 0 7px; color: #304561; font-size: 14px; }
.help-panel p { margin: 0; color: #718099; font-size: 11px; line-height: 1.7; }

/* Invoice detail and approval steps */
.detail-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.82fr); align-items: start; gap: 18px; }
.detail-main-column, .detail-side-column { display: grid; align-content: start; gap: 18px; min-width: 0; }
.detail-side-column { gap: 16px; }
.detail-heading { align-items: center; }
.detail-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.detail-title-line h1 { margin: 5px 0; color: #1e314d; font-size: clamp(27px,2.25vw,37px); font-weight: 800; letter-spacing: -.055em; }
.detail-heading p { margin: 6px 0 0; color: #71819a; font-size: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-stats-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 20px 24px; border-bottom: 1px solid #edf1f6; background: #fcfdff; }
.detail-stats-row > div { display: grid; gap: 5px; }
.detail-stats-row > div + div { padding-left: 17px; border-left: 1px solid #e4eaf1; }
.detail-stats-row span, .detail-field span { color: #718099; font-size: 10px; font-weight: 680; }
.detail-stats-row strong { color: #2b405e; font-size: 13px; font-weight: 740; }
.detail-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 26px; padding: 22px 24px 25px; }
.detail-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.detail-field strong { overflow-wrap: anywhere; color: #304763; font-size: 12px; font-weight: 650; line-height: 1.6; }
.detail-field-wide { grid-column: 1 / -1; }
.action-panel { padding-bottom: 4px; }
.action-panel .panel-heading { padding-bottom: 16px; }
.action-panel .panel-heading h2 { font-size: 16px; }
.action-panel .panel-heading p { font-size: 11px; }
.action-panel > form, .action-panel > div:not(.panel-heading) { padding-bottom: 18px !important; }
.action-panel .stacked-form { padding-bottom: 18px; }
.side-tip { padding: 17px; color: #60738e; border: 1px solid #e3eaf2; border-radius: 15px; background: #fcfdff; }
.side-tip strong { color: #3d5475; font-size: 11px; }
.side-tip p { margin: 6px 0 0; color: #718099; font-size: 10px; line-height: 1.65; }
.v3-progress { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin: 19px 0 23px; }
.v3-progress-step { display: flex; align-items: center; gap: 9px; min-height: 70px; padding: 11px; text-align: left; border: 1px solid #e3e9f1; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(35,54,86,.03); }
.v3-progress-step.done { border-color: #d2ecdf; background: linear-gradient(140deg,#f3fbf7,#fff); }
.v3-progress-step.current { border-color: #d8e1fa; background: linear-gradient(140deg,#f4f6ff,#fff); }
.v3-progress-icon { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; color: #7b8ca2; border-radius: 11px; background: #f0f3f7; }
.v3-progress-step.done .v3-progress-icon { color: #188166; background: #e3f6ed; }
.v3-progress-step.current .v3-progress-icon { color: #4564c7; background: #e9efff; }
.v3-progress-copy { display: grid; gap: 3px; min-width: 0; }
.v3-progress-copy strong { color: #526783; font-size: 10px; font-weight: 770; }
.v3-progress-copy small { color: #8190a5; font-size: 9px; }
.v3-progress-step.done .v3-progress-copy strong { color: #187458; }
.v3-progress-step.current .v3-progress-copy strong { color: #3d5bbd; }
.invoice-edit-state { display: flex; align-items: center; gap: 13px; margin: 0 0 19px; padding: 15px 17px; border: 1px solid; border-radius: 15px; box-shadow: 0 4px 15px rgba(36,55,87,.035); }
.invoice-edit-state.is-open { border-color: #c9eadb; background: linear-gradient(100deg,#f0fbf6,#fff); }
.invoice-edit-state.is-locked { border-color: #e1e7ee; background: linear-gradient(100deg,#f7f9fb,#fff); }
.invoice-edit-state-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; color: #168064; border-radius: 13px; background: #e4f7ef; }
.invoice-edit-state.is-locked .invoice-edit-state-icon { color: #71819a; background: #eff2f6; }
.invoice-edit-state > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 0; }
.invoice-edit-state strong { color: #17664f; font-size: 13px; font-weight: 810; }
.invoice-edit-state.is-locked strong { color: #465a76; }
.invoice-edit-state small { color: #5e738e; font-size: 11px; line-height: 1.55; }
.invoice-edit-state-tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #167355; font-size: 10px; font-weight: 820; white-space: nowrap; border: 1px solid #d2ebdd; border-radius: 999px; background: #ebf8f1; }
.invoice-edit-state.is-locked .invoice-edit-state-tag { color: #62738b; border-color: #e2e8ef; background: #f2f5f8; }
.rejection-banner { display: flex; align-items: center; gap: 13px; margin: -5px 0 15px; padding: 15px 18px; border: 1px solid #f0d5d9; border-radius: 14px; background: #fff8f8; }
.rejection-banner > span { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; color: #b64d5d; border-radius: 11px; background: #ffebed; }
.rejection-banner strong { color: #9d3f4f; font-size: 12px; }
.rejection-banner p { margin: 4px 0 0; color: #805861; font-size: 11px; line-height: 1.5; }
.v3-attachment-list { display: grid; gap: 9px; padding: 0 22px 20px; }
.v3-attachment { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e4eaf2; border-radius: 12px; background: #fcfdff; }
.v3-attachment strong { display: block; max-width: 55vw; overflow: hidden; color: #344b69; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.v3-attachment small { color: #718099; font-size: 10px; }
.v3-tag { display: inline-flex; padding: 5px 9px; color: #566b86; font-size: 10px; border: 1px solid #e3e9f1; border-radius: 8px; background: #f8fafd; }
.v3-audit-meta { max-width: 360px; overflow-wrap: anywhere; color: #60738f; font-size: 10px; }
.report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 700px; }
.report-metrics .metric-value { font-size: 29px; }
.report-type-tabs { gap: 8px; margin: 0 0 18px; }
.report-type-tab { gap: 9px; padding: 10px 13px; }
.report-bar-cell { display: flex; align-items: center; gap: 9px; min-width: 125px; }
.report-bar-track { overflow: hidden; width: 84px; height: 7px; border-radius: 10px; background: #edf1f6; }
.report-bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#657fe5,#44bba1); }
.report-bar-cell small { color: #718099; font-size: 9px; }
.currency-total-list { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: baseline; min-height: 28px; margin-top: 8px; color: #203754; font-size: 15px; font-weight: 800; }
.currency-total-list span + span { padding-left: 11px; border-left: 1px solid #e1e7ef; }
.tracking-context { display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid #e8edf4; background: linear-gradient(100deg,#f7f9ff,#fcfdff); }
.tracking-context-mark { display: grid; place-items: center; width: 39px; height: 39px; color: #3e61be; border: 1px solid #dce5fa; border-radius: 12px; background: #eef3ff; font-size: 10px; font-weight: 850; }
.tracking-context > span:last-child { display: grid; gap: 4px; }
.tracking-context strong { color: #344b6b; font-size: 12px; }
.tracking-context small { color: #718099; font-size: 10px; }

/* Login: clean white panel with a soft colorful welcome side */
body.login-body { min-height: 100vh; background: #f4f7fc; }
.login-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(390px,.82fr); gap: 19px; min-height: 100vh; padding: 20px; background: radial-gradient(circle at 77% 14%,rgba(112,137,229,.09),transparent 25%),#f4f7fc; }
.login-showcase { position: relative; display: flex; min-height: calc(100vh - 40px); overflow: hidden; color: #273d5f; border: 1px solid #e2eafa; border-radius: 26px; background: radial-gradient(ellipse at 84% 20%,rgba(56,189,158,.13),transparent 31%),linear-gradient(140deg,#eef2ff 0%,#eff8fb 55%,#e9f8f2 100%); box-shadow: 0 15px 38px rgba(58,81,125,.08); }
.login-showcase::before { position: absolute; inset: 0; background: linear-gradient(135deg,transparent 58%,rgba(86,113,193,.045) 58.1%,transparent 58.5%),linear-gradient(30deg,transparent 69%,rgba(57,174,147,.05) 69.1%,transparent 69.5%); content: ""; }
.login-showcase-inner { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; min-height: calc(100vh - 40px); padding: 29px clamp(30px,5vw,65px) 23px; }
.login-brand { padding: 0; }
.login-brand .topbar-brand-copy strong { color: #293e60; }
.login-brand .topbar-brand-copy small { color: #637895; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: clamp(25px,4vw,54px); border: 1px solid #e4eaf2; border-radius: 26px; background: #fff; box-shadow: 0 15px 38px rgba(40,58,89,.065); }
.login-form-wrap { width: min(405px,100%); }
.login-heading { margin-bottom: 26px; }
.login-heading h2 { margin: 9px 0 7px; color: #1f3350; font-size: 30px; font-weight: 790; letter-spacing: -.05em; }
.login-heading p { color: #6d7e97; font-size: 12px; }
.login-form { display: grid; gap: 10px; }
.field-label { color: #435772; font-size: 11px; font-weight: 740; }
.input-wrap { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 11px; padding: 0 13px; color: #8091aa; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.input-wrap:focus-within { border-color: #aabaf0; box-shadow: 0 0 0 4px rgba(85,117,231,.1); }
.input-leading { display: grid; place-items: center; color: #7487ad; }
.input-wrap input { width: 100%; min-width: 0; color: #314866; font-size: 12px; outline: 0; border: 0; background: transparent; }
.input-wrap input::placeholder { color: #92a0b3; }
.password-label-row { display: flex; justify-content: space-between; }
.quiet-label { color: #8291a6; font-size: 9px; }
.password-toggle { padding: 5px; color: #4c68c2; font-size: 10px; border: 0; background: transparent; cursor: pointer; }
.login-submit { min-height: 48px; margin-top: 4px; }
.login-submit span { margin-left: auto; font-size: 17px; }
.login-mobile-brand { display: none; }
.demo-login-note { display: flex; gap: 11px; margin-top: 20px; padding: 13px; border: 1px solid #dfe7f8; border-radius: 13px; background: #f7f9ff; }
.demo-note-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: #4c68c2; border-radius: 9px; background: #eaf0ff; }
.demo-login-note strong { display: block; color: #455b8d; font-size: 10px; font-weight: 760; }
.demo-login-note p { margin: 4px 0; color: #667a9b; font-size: 10px; }
.demo-login-note code { color: #3d56aa; font-size: 10px; }
.demo-login-note small { display: block; margin-top: 4px; color: #718099; font-size: 9px; }
.login-privacy { margin: 18px 0 0; color: #74849b; font-size: 9px; line-height: 1.6; text-align: center; }
.login-showcase-copy { width: min(560px,100%); margin: auto 0; padding: 38px 0 48px; }
.eyebrow-light { display: inline-flex; align-items: center; gap: 8px; color: #657ab9; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.eyebrow-light i { width: 6px; height: 6px; border-radius: 50%; background: #31b492; box-shadow: 0 0 0 4px rgba(49,180,146,.13); }
.login-showcase-copy h1 { margin: 20px 0 17px; color: #243b5c; font-size: clamp(40px,4.5vw,62px); font-weight: 790; line-height: 1.04; letter-spacing: -.06em; }
.login-showcase-copy h1 em { color: #25a98c; font-style: normal; }
.login-showcase-copy p { max-width: 420px; color: #5d7391; font-size: 13px; line-height: 1.75; }
.login-feature-row { display: flex; flex-wrap: wrap; gap: 16px 22px; margin-top: 28px; color: #4b6281; font-size: 10px; }
.login-feature-row span { display: inline-flex; align-items: center; gap: 8px; }
.login-feature-row .icon { color: #279e87; }
.login-showcase-footer { display: flex; justify-content: space-between; gap: 12px; color: #7487a2; font-size: 10px; }
.showcase-orb { position: absolute; border: 1px solid rgba(91,121,191,.14); border-radius: 50%; pointer-events: none; }
.showcase-orb-one { top: 14%; right: -150px; width: 430px; height: 430px; box-shadow: 0 0 0 48px rgba(103,132,204,.025),0 0 0 100px rgba(103,132,204,.02); }
.showcase-orb-two { bottom: -255px; left: -140px; width: 430px; height: 430px; border-color: rgba(49,180,146,.18); box-shadow: 0 0 0 38px rgba(49,180,146,.025); }

@media (max-width: 1160px) {
  .topbar { padding-right: 24px; padding-left: 24px; }
  .top-navigation { padding-right: 24px; padding-left: 24px; gap: 3px; }
  .top-nav-home, .top-nav-group > summary { gap: 7px; padding-right: 8px; padding-left: 8px; font-size: 9px; }
  .top-nav-icon { flex-basis: 25px; width: 25px; height: 25px; }
  .page-area { padding-right: 24px; padding-left: 24px; }
  .metric-grid { gap: 12px; }
  .metric-card { padding: 18px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.2fr) minmax(280px,1fr); }
  .v3-progress { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .topbar { min-height: 66px; }
  .topbar-workspace { display: none; }
  .top-navigation { gap: 3px; }
  .top-nav-home, .top-nav-group > summary { padding-right: 7px; padding-left: 7px; }
  .detail-layout { grid-template-columns: minmax(0,1fr); }
  .detail-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-side-column .side-tip { grid-column: 1 / -1; }
  .entity-layout, .admin-grid { grid-template-columns: minmax(0,1fr); }
  .entity-create-panel, .admin-create-panel { order: -1; }
  .entity-create-panel .stacked-form, .admin-create-panel .stacked-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .entity-create-panel .stacked-form .button, .admin-create-panel .stacked-form .button { align-self: end; }
  .profile-settings-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); }
}
@media (max-width: 760px) {
  .app-header { position: sticky; }
  .topbar { min-height: 61px; padding: 0 14px; }
  .topbar-brand { min-width: 0; gap: 9px; }
  .topbar-brand .brand-mark { flex-basis: 37px; width: 37px; height: 37px; border-radius: 12px; }
  .topbar-brand-copy strong { font-size: 12px; }
  .topbar-brand-copy small { font-size: 8px; }
  .topbar-actions { gap: 7px; }
  .topbar-account { gap: 3px; margin-left: 0; padding-left: 0; border-left: 0; }
  .topbar-account-link { padding: 2px; }
  .topbar-account-copy, .topbar-account .logout-form { display: none; }
  .topbar-account .profile-avatar { flex-basis: 32px; width: 32px; height: 32px; border-radius: 11px; }
  .topbar-quick-create { width: 34px; min-height: 34px; padding: 0; border-radius: 10px; }
  .topbar-quick-create span { display: none; }
  .mobile-menu-button { display: inline-grid !important; place-items: center; width: 35px; height: 35px; color: #536887; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
  .top-navigation { display: none; align-items: stretch; flex-direction: column; gap: 5px; width: 100%; max-height: min(72vh,600px); overflow-y: auto; padding: 10px 14px 14px; border-top: 1px solid #edf1f6; box-shadow: 0 12px 20px rgba(34,53,84,.06); }
  body.app-body.nav-open .top-navigation { display: flex; }
  .top-nav-home, .top-nav-group > summary { justify-content: flex-start; width: 100%; min-height: 43px; padding: 0 10px; font-size: 11px; }
  .top-nav-group { display: block; width: 100%; }
  .top-nav-group > summary { justify-content: flex-start; }
  .top-nav-chevron { margin-left: auto; }
  .top-nav-dropdown { position: static; width: 100%; min-width: 0; max-width: none; margin: 4px 0 5px; padding: 5px; border: 1px solid #edf0f5; border-radius: 12px; background: #fbfcfe; box-shadow: none; }
  .top-nav-link { min-height: 39px; padding-left: 10px; }
  .page-area { min-height: calc(100vh - 61px); padding: 23px 16px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 12px; }
  .page-heading .button { align-self: flex-start; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 13px; }
  .metric-card { padding: 15px; border-radius: 15px; }
  .metric-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 11px; }
  .metric-label { font-size: 10px; }
  .metric-value { margin-top: 12px; font-size: 28px; }
  .metric-foot { margin-top: 10px; font-size: 10px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .panel-heading { padding: 18px 17px 14px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-heading p { font-size: 10px; }
  .recent-heading { align-items: flex-start; }
  .recent-heading .button { align-self: center; padding: 0 10px; font-size: 9px; }
  .table-toolbar { padding-right: 15px; padding-left: 15px; }
  .invoice-table { display: block; min-width: 0; }
  .invoice-table thead { display: none; }
  .invoice-table tbody { display: grid; padding: 4px 12px 10px; }
  .invoice-table tr { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; padding: 12px 5px 12px 1px; border-bottom: 1px solid #edf1f5; }
  .invoice-table tr:last-child { border: 0; }
  .invoice-table td { display: block; height: auto; padding: 1px 0; font-size: 10px; border: 0; }
  .invoice-table td:first-child { padding-left: 0; }
  .invoice-table td:nth-child(2) { grid-column: 1; }
  .invoice-table td:nth-child(3), .invoice-table td:nth-child(5) { display: none; }
  .invoice-table td:nth-child(4) { grid-column: 1; color: #718099; font-size: 10px; }
  .invoice-table td:nth-child(6) { grid-column: 2; grid-row: 1; font-size: 11px; text-align: right; }
  .invoice-table td:nth-child(7) { grid-column: 1; grid-row: 4; }
  .invoice-table td:nth-child(8) { position: absolute; top: 13px; right: 1px; }
  .invoice-row-actions { gap: 4px; }
  .invoice-inline-update, .invoice-inline-lock, .invoice-row-actions .row-action { width: 30px; min-height: 30px; height: 30px; padding: 0; border-radius: 8px; }
  .invoice-inline-update span, .invoice-inline-lock span { display: none; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 13px; }
  .data-table td { font-size: 10px; }
  .filter-bar { gap: 8px; padding: 13px; }
  .search-control { flex: 1 1 100%; min-width: 0; }
  .date-filter { flex: 1 1 45%; min-width: 0; }
  .date-filter input { width: 100%; min-width: 0; }
  .date-dash { display: none; }
  .filter-submit { flex: 1; }
  .tab-row { gap: 15px; padding: 0 15px; }
  .tab-link { min-height: 46px; font-size: 10px; }
  .form-grid { grid-template-columns: minmax(0,1fr); gap: 15px; padding: 17px; }
  .form-field-wide { grid-column: auto; }
  .form-actions { justify-content: stretch; gap: 8px; padding: 0 17px 18px; }
  .form-actions .button { flex: 1; }
  .upload-dropzone { margin-right: 17px; margin-left: 17px; }
  .detail-heading { align-items: flex-start; }
  .detail-title-line h1 { font-size: 25px; }
  .detail-actions { align-self: stretch; }
  .detail-actions .button { flex: 1; }
  .detail-stats-row { padding: 15px 17px; gap: 12px; }
  .detail-stats-row > div + div { padding-left: 10px; }
  .detail-field-grid { gap: 14px; padding: 17px; }
  .detail-side-column { grid-template-columns: minmax(0,1fr); }
  .detail-side-column .side-tip { grid-column: auto; }
  .v3-progress { grid-template-columns: 1fr; gap: 8px; margin: 15px 0 18px; }
  .v3-progress-step { min-height: 58px; padding: 10px 12px; }
  .invoice-edit-guide { align-items: flex-start; flex-wrap: wrap; margin-right: 10px; margin-left: 10px; padding: 11px; }
  .invoice-edit-guide-icon { flex-basis: 33px; width: 33px; height: 33px; }
  .invoice-edit-guide-copy { flex-basis: calc(100% - 48px); }
  .invoice-edit-guide-copy small { font-size: 10px; }
  .invoice-edit-legend { margin-left: 42px; font-size: 10px; }
  .invoice-edit-state { align-items: flex-start; padding: 12px; }
  .invoice-edit-state-icon { flex-basis: 35px; width: 35px; height: 35px; }
  .invoice-edit-state-tag { display: none; }
  .invoice-edit-state small { font-size: 10px; }
  .bulk-approval-bar { align-items: flex-start; flex-direction: column; padding: 11px 14px; }
  .bulk-approval-bar form { width: 100%; }
  .bulk-approval-bar form .button { flex: 1; }
  .entity-create-panel .stacked-form, .admin-create-panel .stacked-form { grid-template-columns: minmax(0,1fr); }
  .entity-list-panel .table-wrap, .admin-list-panel .table-wrap { overflow-x: auto; }
  .report-metrics { max-width: none; }
  .report-metrics .metric-value { font-size: 23px; }
  .report-type-tabs { gap: 6px; }
  .report-type-tab { padding: 8px 10px; font-size: 9px; }
  .profile-settings-grid { grid-template-columns: minmax(0,1fr); }
  .help-grid { grid-template-columns: minmax(0,1fr); }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .login-layout { grid-template-columns: minmax(0,1fr); gap: 0; min-height: 100vh; padding: 0; background: #fff; }
  .login-showcase { display: none; }
  .login-form-panel { min-height: 100vh; align-items: flex-start; padding: 31px 22px; border: 0; border-radius: 0; box-shadow: none; }
  .login-form-wrap { width: min(420px,100%); margin: 0 auto; }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 43px; color: #253653; font-size: 13px; font-weight: 740; }
  .login-mobile-brand .brand-mark { flex-basis: 37px; width: 37px; height: 37px; font-size: 13px; }
  .login-heading h2 { font-size: 26px; }
}
@media (max-width: 430px) {
  .topbar { padding-right: 10px; padding-left: 10px; }
  .topbar-brand-copy small { display: none; }
  .topbar-actions { gap: 5px; }
  .topbar-account { display: none; }
  .metric-card { padding: 12px; }
  .metric-value { font-size: 25px; }
  .detail-stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-stats-row > div + div { padding-left: 0; border-left: 0; }
  .detail-field-grid { grid-template-columns: minmax(0,1fr); }
  .detail-field-wide { grid-column: auto; }
  .invoice-edit-guide-copy small { font-size: 10px; }
  .invoice-edit-legend { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .app-header, .detail-actions, .action-panel, .note-strip, .page-footer { display: none !important; }
  .main-shell { margin: 0 !important; }
  .page-area { max-width: none; padding: 0; }
  .panel { box-shadow: none; }
}

/* Finishing pass: warmer light canvas, clearer color accents and richer menus */
body.app-body { background: radial-gradient(ellipse at 5% 0%, rgba(113,136,224,.055), transparent 28%), radial-gradient(ellipse at 97% 5%, rgba(74,189,158,.045), transparent 25%), #f7f9fc; }
.app-header { overflow: visible; }
.app-header::before { position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg,#7288ef 0%,#67a1e8 27%,#45bca7 58%,#d6a24a 78%,#c47fc1 100%); content: ""; pointer-events: none; }
.topbar { background: rgba(255,255,255,.98); }
.topbar-workspace { color: #536a92; border-color: #e5ebf5; background: linear-gradient(110deg,#f6f8ff,#f8fcfb); }
.topbar-quick-create { border-color: #4d70d8; background: linear-gradient(120deg,#627fe9,#4772da 60%,#3fae9d); box-shadow: 0 6px 15px rgba(79,112,214,.18); }
.top-navigation { gap: 9px; padding-top: 6px; padding-bottom: 6px; background: linear-gradient(90deg,#fff,#fbfcff 52%,#fbfefd); }
.top-nav-home, .top-nav-group > summary { min-height: 40px; padding: 0 13px; color: #536783; font-size: 10px; font-weight: 750; border-color: #edf1f6; background: rgba(255,255,255,.92); box-shadow: 0 2px 5px rgba(39,57,87,.025); }
.top-nav-home:hover, .top-nav-group > summary:hover { color: var(--nav-color,#4765c4); border-color: var(--nav-border,#e0e7fb); background: var(--nav-soft,#f1f4ff); transform: translateY(-1px); }
.top-nav-home.is-active, .top-nav-group.is-active > summary, .top-nav-group[open] > summary { font-weight: 800; box-shadow: 0 4px 11px rgba(37,54,84,.06); }
.top-nav-icon { flex-basis: 29px; width: 29px; height: 29px; border: 1px solid rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.top-nav-group[open] > summary .top-nav-icon, .top-nav-home.is-active .top-nav-icon { filter: saturate(1.08); }
.top-nav-dropdown { top: calc(100% + 8px); padding: 10px; border-color: #e5eaf2; border-radius: 16px; box-shadow: 0 18px 40px rgba(35,53,84,.14); }
.top-nav-dropdown-head { display: flex; align-items: center; gap: 10px; padding: 5px 5px 11px; margin-bottom: 4px; border-bottom: 1px solid #edf1f6; }
.top-nav-dropdown-mark { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: var(--nav-color); border: 1px solid var(--nav-border); border-radius: 11px; background: var(--nav-soft); }
.top-nav-dropdown-head > span:last-child { display: grid; gap: 3px; }
.top-nav-dropdown-head strong { color: #344966; font-size: 10px; font-weight: 820; letter-spacing: .06em; }
.top-nav-dropdown-head small { color: #8493a8; font-size: 9px; }
.top-nav-link { min-height: 42px; font-size: 11px; }
.top-nav-link:hover { color: var(--nav-color,#405bb6); background: var(--nav-soft,#f2f5ff); }
.top-nav-link.is-active { color: var(--nav-color,#405bb6); background: var(--nav-soft,#f2f5ff); }
.top-nav-active-dot { background: var(--nav-color,#48b99c); box-shadow: 0 0 0 3px var(--nav-soft,#e8f7f2); }
.page-heading .eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: #536fc4; font-size: 9px; letter-spacing: .12em; border: 1px solid #e1e8fb; border-radius: 999px; background: linear-gradient(100deg,#f1f4ff,#f8fbff); }
.page-heading .eyebrow::before { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg,#6783eb,#43b7a0); box-shadow: 0 0 0 3px rgba(94,126,225,.11); content: ""; }
.dashboard-page-heading { position: relative; align-items: center; min-height: 153px; overflow: hidden; padding: 23px 27px; border: 1px solid #e1e8f5; border-radius: 21px; background: linear-gradient(110deg,#eff3ff 0%,#f7faff 48%,#effaf6 100%); box-shadow: 0 8px 22px rgba(42,63,101,.045); }
.dashboard-page-heading::after { position: absolute; top: -96px; right: 6%; width: 230px; height: 230px; border: 1px solid rgba(104,129,211,.14); border-radius: 50%; box-shadow: 0 0 0 20px rgba(104,129,211,.035),0 0 0 42px rgba(104,129,211,.025),0 0 0 68px rgba(56,183,153,.025); content: ""; }
.dashboard-page-heading > * { position: relative; z-index: 1; }
.dashboard-page-heading h1 { margin-top: 10px; font-size: clamp(30px,2.6vw,39px); }
.dashboard-page-heading p { color: #647792; }
.dashboard-page-heading > a { box-shadow: 0 8px 16px rgba(82,109,215,.17); }
.metric-card:nth-child(1) { background: linear-gradient(145deg,#fff 55%,#f7f8ff); }
.metric-card:nth-child(2) { background: linear-gradient(145deg,#fff 55%,#fffaf1); }
.metric-card:nth-child(3) { background: linear-gradient(145deg,#fff 55%,#faf8ff); }
.metric-card:nth-child(4) { background: linear-gradient(145deg,#fff 55%,#f2fbf7); }
.panel { box-shadow: 0 7px 22px rgba(35,55,88,.045); }
@media (max-width: 760px) {
  .top-navigation { padding-top: 9px; padding-bottom: 12px; }
  .top-nav-home, .top-nav-group > summary { min-height: 43px; }
  .top-nav-dropdown-head { padding-bottom: 9px; }
  .dashboard-page-heading { align-items: flex-start; min-height: 0; padding: 18px 18px 20px; }
  .dashboard-page-heading::after { top: -125px; right: -55px; width: 200px; height: 200px; }
}

/* V1-inspired final shell: the legacy left rail is explicitly disabled. */
.app-shell, .main-shell { width: 100% !important; min-width: 0; margin-left: 0 !important; }
.sidebar, .sidebar-scrim, .side-navigation, .sidebar-bottom, .sidebar-close { display: none !important; }
.app-header { position: sticky; inset: 0 0 auto; overflow: visible; }
.top-navigation-v1 { display: flex; flex-flow: row wrap; align-items: center; justify-content: flex-start; gap: 6px; width: min(100%,1600px); min-height: 0; padding-top: 8px; padding-bottom: 9px; }
.top-navigation-v1 .top-nav-home, .top-navigation-v1 .top-nav-group > summary { min-height: 42px; padding: 0 10px; font-size: 10px; }
.top-navigation-v1 .top-nav-group { position: relative; flex: 0 0 auto; }
.top-navigation-v1 .top-nav-dropdown { max-height: min(74vh,640px); overflow-y: auto; overscroll-behavior: contain; }
.top-navigation-v1 .top-nav-group:last-child .top-nav-dropdown { right: 0; left: auto; }
.top-nav-dropdown-head small { letter-spacing: .01em; }

/* Consistent spacing and readable content across V3 pages */
.page-area { width: min(100%,1600px); min-width: 0; padding: clamp(22px,3vw,42px) clamp(18px,3vw,44px) 30px; }
.page-heading { align-items: center; flex-wrap: wrap; gap: 18px 24px; margin-bottom: 23px; }
.page-heading > div:first-child { min-width: min(100%,360px); flex: 1 1 420px; }
.page-heading > .v3-page-actions, .page-heading > .detail-actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.page-heading p { max-width: 860px; }
.panel { border-color: #e5ebf3; border-radius: 17px; }
.panel-heading { flex-wrap: wrap; padding: 22px 24px 17px; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { line-height: 1.3; }
.data-table { min-width: 760px; }
.data-table th { height: 46px; padding-right: 16px; padding-left: 16px; font-size: 10px; letter-spacing: .075em; }
.data-table td { height: 60px; padding: 11px 16px; font-size: 12px; line-height: 1.45; }
.data-table td small { line-height: 1.5; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.table-wrap { border-radius: 0 0 16px 16px; }
.v3-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { min-height: 42px; font-size: 12px; }
.button-small { min-height: 36px; font-size: 11px; }
.form-field { font-size: 12px; }
.form-field input, .form-field select, .form-field textarea, .form-input-small { font-size: 13px; }
.filter-bar { align-items: flex-end; gap: 10px; }
.search-control { min-width: min(220px,100%); }
.tab-row { gap: 15px; }
.tab-link { font-size: 11px; }
.entity-type-tab, .report-type-tab { font-size: 11px; }
.admin-grid, .entity-layout, .detail-layout { gap: 18px; }

/* Numbered pagination, matching V1's direct page selection (no prev/next controls) */
.pagination-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding: 14px 20px; color: #677992; border-top: 1px solid #e9eef4; background: linear-gradient(90deg,#fff,#fbfcff); }
.pagination-summary { display: flex; align-items: center; gap: 6px; min-height: 34px; font-size: 12px; }
.pagination-summary strong { color: #405775; font-weight: 780; }
.pagination-total { color: #8997aa; }
.pagination-pages { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.page-number { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; color: #536882; font-size: 12px; font-weight: 700; border: 1px solid #e3e9f1; border-radius: 10px; background: #fff; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease; }
.page-number:hover { color: #395cc5; border-color: #cbd7f8; background: #f5f7ff; transform: translateY(-1px); }
.page-number.is-current { color: #fff; border-color: #5b77df; background: linear-gradient(135deg,#6d87ea,#4f6bd3); box-shadow: 0 5px 12px rgba(81,109,215,.18); }
.page-ellipsis { display: inline-grid; place-items: center; min-width: 24px; height: 36px; color: #8997aa; font-size: 14px; }
@media (max-width: 1000px) {
  .top-navigation-v1 { gap: 5px; padding-right: 20px; padding-left: 20px; }
  .top-navigation-v1 .top-nav-home, .top-navigation-v1 .top-nav-group > summary { min-height: 40px; padding: 0 8px; font-size: 9px; }
  .top-navigation-v1 .top-nav-icon { flex-basis: 26px; width: 26px; height: 26px; }
  .page-area { padding-right: 22px; padding-left: 22px; }
}
@media (max-width: 760px) {
  .top-navigation-v1 { align-items: stretch; flex-flow: column nowrap; gap: 5px; padding: 10px 15px 14px; }
  .top-navigation-v1 .top-nav-home, .top-navigation-v1 .top-nav-group > summary { justify-content: flex-start; width: 100%; min-height: 44px; padding: 0 11px; font-size: 12px; }
  .top-navigation-v1 .top-nav-group { width: 100%; }
  .top-navigation-v1 .top-nav-dropdown { max-height: none; }
  .page-area { padding: 22px 16px 20px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading > div:first-child { flex-basis: 100%; }
  .page-heading > .v3-page-actions { justify-content: flex-start; }
  .data-table td { font-size: 11px; }
  .pagination-row { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  .pagination-pages { flex-wrap: wrap; margin-left: 0; }
  .page-number { min-width: 34px; height: 34px; }
}
@media (max-width: 430px) {
  .page-area { padding-right: 12px; padding-left: 12px; }
  .page-heading > .v3-page-actions { width: 100%; }
  .page-heading > .v3-page-actions .button { flex: 1 1 auto; }
  .pagination-summary { flex-wrap: wrap; }
  .pagination-pages { gap: 4px; }
  .page-number { min-width: 32px; height: 32px; border-radius: 9px; }
}

/* V4 visual pass — centered V1-style navigation and richer, still-light surfaces */
:root {
  --app-blue: #4e69e7;
  --app-blue-dark: #3653cf;
  --app-teal: #159b8a;
  --app-violet: #7c58c9;
  --app-amber: #c18423;
  --app-rose: #d25978;
  --app-shadow: 0 10px 28px rgba(34,55,89,.075);
}
body.app-body {
  background:
    radial-gradient(ellipse at 5% 12%, rgba(103,128,239,.10), transparent 27%),
    radial-gradient(ellipse at 96% 10%, rgba(48,183,155,.085), transparent 24%),
    radial-gradient(ellipse at 82% 92%, rgba(219,166,76,.055), transparent 27%),
    #f7f9fd;
}
.app-header { background: rgba(255,255,255,.985); box-shadow: 0 7px 24px rgba(42,61,94,.06); }
.topbar { min-height: 76px; }
.topbar-brand { min-width: 230px; }
.brand-mark { flex-basis: 45px; width: 45px; height: 45px; border-radius: 15px; background: linear-gradient(145deg,#718af5 0%,#526fe3 48%,#24b39c 100%); box-shadow: 0 8px 18px rgba(81,110,223,.25); }
.topbar-brand-copy strong { font-size: 14px; }
.topbar-brand-copy small { font-size: 10px; }
.topbar-workspace { padding: 8px 11px; color: #476384; font-size: 10px; border-color: #dfe7f2; background: linear-gradient(110deg,#f0f4ff,#eefaf6); }
.topbar-quick-create { min-height: 42px; padding: 0 15px; font-size: 12px; border-radius: 12px; background: linear-gradient(120deg,#5f7ce9,#4f68d7 58%,#23a994); box-shadow: 0 7px 16px rgba(78,106,216,.24); }
.profile-avatar { border-color: #d7e2ff; background: linear-gradient(145deg,#e8edff,#dcf7ed); }

/* V1 navigation lives in the middle of the top bar and remains visibly colored */
.top-navigation-v1 {
  justify-content: center;
  gap: 8px;
  padding: 10px clamp(18px,3.6vw,54px) 12px;
  border-top: 1px solid #edf1f8;
  border-bottom: 1px solid #e8edf5;
  background: linear-gradient(90deg,#f8faff 0%,#fff 24%,#fff 72%,#f5fbf9 100%);
}
.top-navigation-v1 .top-nav-home,
.top-navigation-v1 .top-nav-group > summary {
  min-height: 45px;
  padding: 0 12px;
  color: var(--nav-color,#4e69e7);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--nav-border,#d9e2ff);
  border-radius: 13px;
  background: linear-gradient(145deg,#fff 0%,var(--nav-soft,#f0f3ff) 100%);
  box-shadow: 0 3px 9px rgba(41,61,99,.045);
}
.top-navigation-v1 .top-nav-home:hover,
.top-navigation-v1 .top-nav-group > summary:hover,
.top-navigation-v1 .top-nav-group[open] > summary {
  color: var(--nav-color,#3653cf);
  border-color: var(--nav-color,#4e69e7);
  background: linear-gradient(145deg,#fff 0%,var(--nav-soft,#eff2ff) 100%);
  box-shadow: 0 7px 16px rgba(48,68,109,.11);
  transform: translateY(-2px);
}
.top-navigation-v1 .top-nav-home.is-active,
.top-navigation-v1 .top-nav-group.is-active > summary {
  color: #fff;
  border-color: var(--nav-color,#4e69e7);
  background: linear-gradient(125deg,var(--nav-color,#4e69e7),color-mix(in srgb,var(--nav-color,#4e69e7) 78%,#2eb59d));
  box-shadow: 0 8px 18px color-mix(in srgb,var(--nav-color,#4e69e7) 22%,transparent);
}
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  color: #fff;
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.18);
}
.tone-blue { --nav-color:#4e69e7; --nav-soft:#eef2ff; --nav-border:#d8e0ff; }
.tone-teal { --nav-color:#128d7d; --nav-soft:#e7f8f3; --nav-border:#cceee5; }
.tone-violet { --nav-color:#7952c4; --nav-soft:#f2edff; --nav-border:#e2d8fb; }
.tone-amber { --nav-color:#a96c12; --nav-soft:#fff5df; --nav-border:#f5e5bd; }
.tone-rose { --nav-color:#c44f70; --nav-soft:#fff0f4; --nav-border:#f3d6e0; }
.top-navigation-v1 .top-nav-icon { flex-basis: 30px; width: 30px; height: 30px; color: var(--nav-color); border: 1px solid rgba(255,255,255,.82); border-radius: 10px; background: var(--nav-soft); box-shadow: 0 2px 5px rgba(36,55,90,.06); }
.top-navigation-v1 .top-nav-chevron { color: var(--nav-color); font-size: 15px; font-weight: 800; }
.top-nav-dropdown { min-width: 278px; padding: 11px; border-color: #dfe6f0; border-radius: 17px; box-shadow: 0 22px 44px rgba(30,47,78,.17); }
.top-nav-dropdown::before { display: block; height: 4px; margin: -11px -11px 9px; border-radius: 17px 17px 0 0; background: linear-gradient(90deg,var(--nav-color,#4e69e7),#4caed1,#42b99c); content: ""; }
.top-nav-dropdown-head { padding: 7px 6px 12px; }
.top-nav-dropdown-mark { border-radius: 12px; }
.top-nav-dropdown-head strong { color: var(--nav-color,#4e69e7); font-size: 11px; }
.top-nav-dropdown-head small { color: #7a8ba4; font-size: 10px; }
.top-nav-link { min-height: 43px; color: #405873; font-size: 12px; border-radius: 11px; }
.top-nav-link-icon { flex-basis: 31px; width: 31px; height: 31px; border: 1px solid var(--nav-border); border-radius: 10px; }
.top-nav-link:hover, .top-nav-link.is-active { color: var(--nav-color,#3653cf); background: var(--nav-soft,#f0f3ff); }
.top-nav-active-dot { width: 7px; height: 7px; background: var(--nav-color,#4e69e7); box-shadow: 0 0 0 4px color-mix(in srgb,var(--nav-color,#4e69e7) 12%,transparent); }

/* Stronger but soft color rhythm throughout dashboards, lists, forms and reports */
.page-heading .eyebrow { color: #5269c7; border-color: #dce4ff; background: linear-gradient(110deg,#edf1ff,#f4f7ff); }
.page-heading .eyebrow::before { background: linear-gradient(135deg,#667fed,#29b39b); box-shadow: 0 0 0 4px rgba(99,126,231,.13); }
.page-heading h1 { color: #1d3150; }
.dashboard-page-heading {
  min-height: 176px;
  padding: 28px 32px;
  border-color: #d7e1f5;
  background: linear-gradient(112deg,#e9edff 0%,#f3f8ff 47%,#e8f8f1 100%);
  box-shadow: 0 14px 34px rgba(57,81,133,.09);
}
.dashboard-page-heading::before { position:absolute; inset:0 auto 0 0; width:6px; background:linear-gradient(180deg,#627fe9,#28b39b,#e3ac50); content:""; }
.dashboard-page-heading::after { top:-120px; right:7%; width:285px; height:285px; border-color:rgba(89,116,218,.2); box-shadow:0 0 0 22px rgba(89,116,218,.055),0 0 0 48px rgba(89,116,218,.035),0 0 0 78px rgba(40,179,155,.035); }
.dashboard-page-heading h1 { color:#20365c; }
.metric-card { position:relative; overflow:hidden; border-color:#e0e7f1; box-shadow:0 9px 23px rgba(38,58,93,.065); }
.metric-card::before { position:absolute; top:0; right:0; left:0; height:4px; background:linear-gradient(90deg,#6d86ed,#47bba4); content:""; }
.metric-card:nth-child(1) { background:linear-gradient(145deg,#fff 45%,#eef1ff); }
.metric-card:nth-child(2) { background:linear-gradient(145deg,#fff 45%,#fff5e6); }
.metric-card:nth-child(3) { background:linear-gradient(145deg,#fff 45%,#f4efff); }
.metric-card:nth-child(4) { background:linear-gradient(145deg,#fff 45%,#eaf9f3); }
.metric-value { color:#233958; }
.panel { border-color:#e1e8f1; box-shadow:0 10px 28px rgba(34,55,89,.065); }
.panel-heading { background:linear-gradient(105deg,#fff,#fbfcff); }
.panel-heading .eyebrow { color:#6579c9; }
.data-table thead { background:linear-gradient(90deg,#f0f4ff,#f3f9fc 60%,#f0faf6); }
.data-table th { color:#53688a; font-size:10px; }
.data-table tr:hover td { background:#f8faff; }
.button-primary { border-color:#4e69d8; background:linear-gradient(125deg,#617be9,#4e66d6 62%,#1fa58e); box-shadow:0 7px 17px rgba(79,105,213,.22); }
.button-primary:hover { background:linear-gradient(125deg,#506edd,#3f58c7 62%,#138f7a); }
.button-secondary { border-color:#dbe4f1; background:linear-gradient(120deg,#fff,#f5f8ff); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .form-input-small:focus { border-color:#8298f1; box-shadow:0 0 0 4px rgba(88,116,226,.12); }
.entity-type-tab.is-active, .report-type-tab.is-active { color:#fff; border-color:#647ee2; background:linear-gradient(125deg,#6881e9,#4f68d6 70%,#35ab99); box-shadow:0 5px 13px rgba(79,105,213,.16); }
.tab-link.is-current { color:#4a63d0; }
.tab-link.is-current::after { height:3px; background:linear-gradient(90deg,#687fe5,#38b49d); }
.status-success, .v3-status.ok { border-color:#cceee1; }
.pagination-row { border-color:#e2e9f2; }
.page-number.is-current { border-color:#4f69d8; background:linear-gradient(125deg,#677fe8,#4e66d4 65%,#35a993); }
@media (max-width: 1100px) {
  .top-navigation-v1 { justify-content:center; }
  .top-navigation-v1 .top-nav-home, .top-navigation-v1 .top-nav-group > summary { min-height:43px; }
}
@media (max-width: 760px) {
  .top-navigation-v1 { align-items:stretch; justify-content:flex-start; }
  .top-navigation-v1 .top-nav-home, .top-navigation-v1 .top-nav-group > summary { min-height:45px; }
  .dashboard-page-heading { min-height:0; padding:22px 22px 23px; }
  .dashboard-page-heading::after { top:-95px; right:-65px; width:205px; height:205px; }
  .panel-heading { background:#fff; }
}

/* V5: one calm blue identity — color is an accent, not decoration */
:root {
  --app-ink:#21334f;
  --app-ink-soft:#435772;
  --app-muted:#708099;
  --app-line:#e4e9f1;
  --app-line-soft:#eff2f7;
  --app-canvas:#f8f9fc;
  --app-blue:#536fe0;
  --app-blue-dark:#3e59c7;
  --app-teal:#536fe0;
  --app-violet:#536fe0;
  --app-amber:#536fe0;
  --app-rose:#536fe0;
  --app-shadow:0 8px 24px rgba(37,55,88,.055);
  --app-radius:16px;
}
body.app-body {
  background:radial-gradient(ellipse at 7% 0%,rgba(83,111,224,.055),transparent 32%),#f8f9fc;
}
.app-header { background:rgba(255,255,255,.985); box-shadow:0 5px 18px rgba(35,54,88,.045); }
.app-header::before { height:3px; background:linear-gradient(90deg,#cbd5fb,#7187e5 22%,#536fe0 50%,#7187e5 78%,#cbd5fb); }
.brand-mark { background:linear-gradient(145deg,#7187e5,#536fe0); box-shadow:0 6px 14px rgba(83,111,224,.16); }
.brand-mark span { color:#e3e9ff; }
.topbar-quick-create { border-color:#4c66d2; background:#536fe0; box-shadow:0 5px 12px rgba(83,111,224,.16); }
.topbar-quick-create:hover { background:#435fcf; box-shadow:0 7px 16px rgba(83,111,224,.2); }
.topbar-workspace { color:#63738d; border-color:#e6eaf2; background:#fafbfe; }

/* Centered horizontal menu, matching the V1 hierarchy with one consistent accent */
.top-navigation-v1 {
  justify-content:center;
  gap:7px;
  padding:10px clamp(18px,3.6vw,54px) 12px;
  border-top:1px solid #f0f2f7;
  border-bottom:1px solid #e9edf4;
  background:#fff;
}
.tone-blue,.tone-teal,.tone-violet,.tone-amber,.tone-rose {
  --nav-color:#536fe0;
  --nav-soft:#f0f3ff;
  --nav-border:#dfe5fb;
}
.top-navigation-v1 .top-nav-home,
.top-navigation-v1 .top-nav-group > summary {
  min-height:43px;
  padding:0 11px;
  color:#4c607d;
  font-size:11px;
  font-weight:720;
  border:1px solid #e8ecf3;
  border-radius:11px;
  background:#fff;
  box-shadow:0 2px 5px rgba(34,53,85,.025);
  transform:none;
}
.top-navigation-v1 .top-nav-home:hover,
.top-navigation-v1 .top-nav-group > summary:hover,
.top-navigation-v1 .top-nav-group[open] > summary {
  color:#3d58c2;
  border-color:#d7e0fb;
  background:#f7f8ff;
  box-shadow:0 4px 10px rgba(54,77,139,.06);
  transform:translateY(-1px);
}
.top-navigation-v1 .top-nav-home.is-active,
.top-navigation-v1 .top-nav-group.is-active > summary {
  color:#405bc9;
  border-color:#cfd9f8;
  background:#eef2ff;
  box-shadow:inset 0 -2px 0 #657de0,0 2px 7px rgba(54,77,139,.04);
}
.top-navigation-v1 .top-nav-icon,
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex-basis:28px;
  width:28px;
  height:28px;
  color:#526bd2;
  border:0;
  border-radius:9px;
  background:#eef2ff;
  box-shadow:none;
}
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon { color:#405bc9; background:#e3eaff; }
.top-navigation-v1 .top-nav-chevron { color:#7c8ba3; }
.top-nav-dropdown { border-color:#e3e8f0; border-radius:14px; box-shadow:0 16px 34px rgba(35,52,84,.12); }
.top-nav-dropdown::before { height:3px; margin:-11px -11px 9px; background:#627be0; }
.top-nav-dropdown-mark,.top-nav-link-icon { color:#526bd2; border-color:#e1e7fb; background:#f0f3ff; }
.top-nav-dropdown-head strong { color:#334b70; }
.top-nav-link { color:#4c607b; }
.top-nav-link:hover,.top-nav-link.is-active { color:#3f59c1; background:#f2f5ff; }
.top-nav-active-dot { background:#536fe0; box-shadow:0 0 0 3px rgba(83,111,224,.11); }

/* Quiet white surfaces; consistent typography, spacing and blue highlights */
body.app-body { color:#263852; }
.page-area { background:transparent; }
.page-heading .eyebrow { color:#5369bf; border-color:#e0e6fb; background:#f3f5ff; }
.page-heading .eyebrow::before { background:#647de0; box-shadow:0 0 0 3px rgba(100,125,224,.12); }
.dashboard-page-heading {
  min-height:160px;
  padding:26px 30px;
  border-color:#e0e6f5;
  border-radius:18px;
  background:linear-gradient(110deg,#f0f3ff 0%,#fbfcff 56%,#f5f8ff 100%);
  box-shadow:0 9px 24px rgba(43,62,101,.055);
}
.dashboard-page-heading::before { width:4px; background:#637be0; }
.dashboard-page-heading::after { top:-106px; right:7%; width:250px; height:250px; border-color:rgba(83,111,224,.14); box-shadow:0 0 0 20px rgba(83,111,224,.035),0 0 0 44px rgba(83,111,224,.022),0 0 0 70px rgba(83,111,224,.015); }
.dashboard-page-heading h1 { color:#243752; }
.metric-card {
  border-color:#e5eaf2;
  border-radius:16px;
  background:linear-gradient(145deg,#fff 62%,#f6f8ff) !important;
  box-shadow:0 7px 18px rgba(35,55,89,.045);
}
.metric-card::before { height:3px; background:#6a82e2; }
.metric-card:nth-child(1),.metric-card:nth-child(2),.metric-card:nth-child(3),.metric-card:nth-child(4) { background:linear-gradient(145deg,#fff 62%,#f6f8ff) !important; }
.metric-blue,.metric-amber,.metric-violet,.metric-green { color:#5069cf; background:#eef2ff; }
.metric-value { color:#253a59; }
.panel { border-color:#e5eaf1; border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(35,55,89,.05); }
.panel-heading { background:linear-gradient(100deg,#fff,#fbfcff); }
.data-table thead { background:#f5f7fc; }
.data-table th { color:#5e7089; }
.data-table tbody tr:hover td { background:#fafbff; }
.button-primary { border-color:#4c66d2; background:#536fe0; box-shadow:0 5px 13px rgba(83,111,224,.16); }
.button-primary:hover { background:#435fcf; box-shadow:0 7px 16px rgba(83,111,224,.2); }
.topbar-quick-create { background:#536fe0; }
.button-secondary { color:#4b5f7c; border-color:#e0e6ef; background:#fff; box-shadow:0 2px 5px rgba(37,57,91,.025); }
.button-secondary:hover { color:#405bc9; border-color:#d3dcf6; background:#f8f9ff; }
.entity-type-tab.is-active,.report-type-tab.is-active {
  color:#405bc9;
  border-color:#d4ddf8;
  background:#eef2ff;
  box-shadow:none;
}
.tab-link.is-current { color:#4b63ca; }
.tab-link.is-current::after { height:2px; background:#627be0; }
.report-bar-track span { background:#647ce0; }
.page-number.is-current { border-color:#536fe0; background:#536fe0; box-shadow:0 4px 11px rgba(83,111,224,.16); }
.login-showcase { background:linear-gradient(135deg,#eef2ff 0%,#f7f9ff 60%,#eef2ff 100%); }
.login-showcase::before { background:linear-gradient(135deg,transparent 58%,rgba(83,111,224,.035) 58.1%,transparent 58.5%); }
.login-showcase-copy h1 em { color:#536fe0; }
.login-feature-row .icon { color:#536fe0; }
@media (max-width:760px) {
  .top-navigation-v1 { justify-content:flex-start; background:#fff; }
  .dashboard-page-heading { min-height:0; padding:21px 20px; }
}

/* V6 navbar: one horizontal bar, one flat flyout, no boxed nav items */
.app-header { position:sticky; top:0; z-index:100; overflow:visible; }
.topbar {
  display:grid;
  grid-template-columns:minmax(155px,auto) minmax(0,1fr) auto;
  align-items:center;
  gap:clamp(10px,1.2vw,20px);
  min-height:76px;
  padding:0 clamp(14px,2.1vw,32px);
}
.topbar-brand { min-width:0; gap:9px; }
.brand-mark { flex-basis:39px; width:39px; height:39px; border-radius:12px; }
.topbar-brand-copy { gap:3px; }
.topbar-brand-copy strong { font-size:12px; }
.topbar-brand-copy small { font-size:8px; }
.topbar-brand-copy b { font-size:7px; }
.topbar-actions { gap:8px; }
.topbar-quick-create { min-height:37px; padding:0 11px; font-size:11px; border-radius:9px; }
.topbar-account { gap:4px; margin-left:0; padding-left:8px; }
.topbar-account-link { gap:6px; padding:3px 4px; }
.profile-avatar { flex-basis:31px; width:31px; height:31px; border-radius:10px; }
.topbar-account-copy strong { max-width:110px; font-size:9px; }
.topbar-account-copy small { font-size:8px; }
.logout-button { width:28px; height:28px; }
.top-navigation-v1 {
  position:static;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-flow:row nowrap;
  gap:clamp(6px,.75vw,12px);
  width:100%;
  min-width:0;
  min-height:52px;
  margin:0;
  padding:0;
  overflow:visible;
  border:0;
  background:transparent;
}
.top-navigation-v1 .top-nav-home,
.top-navigation-v1 .top-nav-group > summary {
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:42px;
  padding:0 2px;
  color:#4e5f78;
  font-size:10px;
  font-weight:650;
  white-space:nowrap;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.top-navigation-v1 .top-nav-home:hover,
.top-navigation-v1 .top-nav-group > summary:hover,
.top-navigation-v1 .top-nav-group[open] > summary {
  color:#415cbe;
  border:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.top-navigation-v1 .top-nav-home.is-active,
.top-navigation-v1 .top-nav-group.is-active > summary {
  position:relative;
  color:#405bc2;
  border:0;
  background:transparent;
  box-shadow:none;
}
.top-navigation-v1 .top-nav-home.is-active::after,
.top-navigation-v1 .top-nav-group.is-active > summary::after {
  position:absolute;
  right:0;
  bottom:1px;
  left:0;
  height:2px;
  border-radius:2px;
  background:#536fe0;
  content:"";
}
.top-navigation-v1 .top-nav-icon,
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex-basis:17px;
  width:17px;
  height:17px;
  color:#7080a0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.top-navigation-v1 .top-nav-home:hover .top-nav-icon,
.top-navigation-v1 .top-nav-group > summary:hover .top-nav-icon,
.top-navigation-v1 .top-nav-group[open] > summary .top-nav-icon,
.top-navigation-v1 .is-active .top-nav-icon { color:#536fe0; background:transparent; }
.top-navigation-v1 .top-nav-chevron { margin-left:0; color:#8290a5; font-size:12px; font-weight:500; }
.top-nav-group { position:relative; display:flex; align-items:center; }
.top-nav-group > summary { list-style:none; cursor:pointer; }
.top-nav-group > summary::-webkit-details-marker { display:none; }
.top-nav-dropdown,
.top-nav-group[open] .top-nav-dropdown {
  position:absolute;
  z-index:120;
  top:calc(100% + 6px);
  right:auto;
  left:0;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  flex-flow:column nowrap;
  gap:0;
  width:max-content;
  min-width:220px;
  max-width:min(340px,calc(100vw - 24px));
  max-height:min(68vh,480px);
  overflow-y:auto;
  margin:0;
  padding:7px;
  border:1px solid #e8edf4;
  border-radius:10px;
  background:#fff;
  box-shadow:0 10px 24px rgba(35,52,84,.11);
  transform:none;
}
.top-nav-dropdown::before { display:none; }
.top-navigation-v1 .top-nav-group .top-nav-dropdown { left:0; right:auto; width:max-content; }
@media (min-width:1321px) {
  .top-navigation-v1 .top-nav-group:nth-last-child(-n+3) .top-nav-dropdown { left:auto; right:0; }
}
.top-nav-link {
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:38px;
  padding:0 7px;
  color:#50617b;
  font-size:11px;
  font-weight:570;
  white-space:nowrap;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.top-nav-link:hover,
.top-nav-link.is-active {
  color:#405bc2;
  background:transparent;
}
.top-nav-link-icon,
.top-nav-link:hover .top-nav-link-icon,
.top-nav-link.is-active .top-nav-link-icon {
  display:inline-grid;
  place-items:center;
  flex:0 0 17px;
  width:17px;
  height:17px;
  color:#6c7fa4;
  border:0;
  border-radius:0;
  background:transparent;
}
.top-nav-link:hover .top-nav-link-icon,
.top-nav-link.is-active .top-nav-link-icon { color:#536fe0; }
.top-nav-active-dot { display:none; }
.mobile-menu-button { display:none; }
@media (max-width:1450px) and (min-width:1321px) {
  .topbar { grid-template-columns:minmax(142px,auto) minmax(0,1fr) auto; gap:9px; padding-right:14px; padding-left:14px; }
  .topbar-brand-copy small { display:none; }
  .top-navigation-v1 { gap:6px; }
  .top-navigation-v1 .top-nav-home,.top-navigation-v1 .top-nav-group > summary { font-size:9px; gap:4px; }
  .topbar-account-copy strong { max-width:85px; }
}
@media (max-width:1320px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto; min-height:68px; padding:0 18px; }
  .topbar-actions { grid-column:2; grid-row:1; }
  .topbar-account-copy { display:none; }
  .topbar-account { border-left:0; padding-left:0; }
  .mobile-menu-button { display:inline-grid !important; place-items:center; width:36px; height:36px; color:#53647d; border:0; border-radius:8px; background:transparent; }
  .top-navigation-v1 {
    display:none;
    grid-column:1 / -1;
    grid-row:2;
    align-items:stretch;
    justify-content:flex-start;
    flex-flow:column nowrap;
    gap:0;
    width:100%;
    max-height:min(72vh,600px);
    overflow-y:auto;
    padding:6px 0 10px;
    border-top:1px solid #eef1f6;
    background:#fff;
  }
  body.app-body.nav-open .top-navigation-v1 { display:flex; }
  .top-navigation-v1 .top-nav-home,
  .top-navigation-v1 .top-nav-group > summary {
    justify-content:flex-start;
    width:100%;
    min-height:41px;
    padding:0 5px;
    font-size:12px;
  }
  .top-navigation-v1 .top-nav-home.is-active::after,
  .top-navigation-v1 .top-nav-group.is-active > summary::after { right:auto; bottom:3px; left:27px; width:2px; height:28px; }
  .top-nav-group { display:block; width:100%; }
  .top-nav-group > summary { width:100%; }
  .top-nav-chevron { margin-left:auto !important; }
  .top-nav-dropdown,
  .top-nav-group[open] .top-nav-dropdown {
    position:static;
    display:flex;
    flex-flow:row wrap;
    justify-content:flex-start;
    gap:0 18px;
    max-height:none;
    width:100%;
    padding:4px 10px 8px 25px;
    border:0;
    border-left:1px solid #e5e9f2;
    border-radius:0;
    background:#fff;
    box-shadow:none;
  }
  .top-nav-link { min-height:36px; }
}
@media (max-width:600px) {
  .topbar { min-height:62px; padding:0 12px; }
  .topbar-quick-create { width:35px; min-height:35px; padding:0; }
  .topbar-quick-create span { display:none; }
  .topbar-account { display:none; }
  .top-navigation-v1 .top-nav-home,.top-navigation-v1 .top-nav-group > summary { font-size:11px; }
  .top-nav-dropdown,.top-nav-group[open] .top-nav-dropdown { flex-direction:column; align-items:stretch; gap:0; padding-left:20px; }
  .top-nav-link { white-space:normal; }
}

/* V9: larger navigation and a clearer, icon-led inner workspace */
.topbar { min-height:82px; }
.topbar-brand .brand-mark { flex-basis:42px; width:42px; height:42px; }
.topbar-brand-copy strong { font-size:13px; }
.top-navigation-v1 { gap:clamp(7px,.62vw,11px); min-height:58px; }
.top-navigation-v1 .top-nav-home,
.top-navigation-v1 .top-nav-group > summary {
  min-height:48px;
  gap:6px;
  padding:0 4px;
  font-size:11.5px;
  font-weight:690;
}
.top-navigation-v1 .top-nav-icon,
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex-basis:19px;
  width:19px;
  height:19px;
}
.top-navigation-v1 .top-nav-chevron { font-size:14px; }
.top-nav-link { min-height:42px; padding:0 9px; font-size:12px; }
.top-nav-link-icon,
.top-nav-link:hover .top-nav-link-icon,
.top-nav-link.is-active .top-nav-link-icon { flex-basis:18px; width:18px; height:18px; }
@media (max-width:1450px) and (min-width:1321px) {
  .topbar { min-height:78px; }
  .top-navigation-v1 { gap:4px; }
  .top-navigation-v1 .top-nav-home,
  .top-navigation-v1 .top-nav-group > summary { min-height:45px; gap:4px; padding:0 2px; font-size:10px; }
  .top-navigation-v1 .top-nav-icon,
  .top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
  .top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon { flex-basis:17px; width:17px; height:17px; }
}
@media (max-width:1320px) {
  .topbar { min-height:72px; }
  .top-navigation-v1 .top-nav-home,
  .top-navigation-v1 .top-nav-group > summary { min-height:45px; font-size:12.5px; }
  .top-navigation-v1 .top-nav-icon { flex-basis:19px; width:19px; height:19px; }
}
@media (max-width:600px) {
  .topbar { min-height:64px; }
  .top-navigation-v1 .top-nav-home,
  .top-navigation-v1 .top-nav-group > summary { font-size:12px; }
}

/* Page-level icon blocks make internal screens easier to scan */
.page-heading-main { display:flex; align-items:center; gap:16px; min-width:min(100%,360px); flex:1 1 420px; }
.page-heading-copy { min-width:0; }
.page-title-icon {
  display:grid;
  place-items:center;
  flex:0 0 54px;
  width:54px;
  height:54px;
  color:#536fe0;
  border:1px solid #dfe6fb;
  border-radius:16px;
  background:linear-gradient(145deg,#edf1ff,#f9faff);
  box-shadow:inset 0 1px 0 #fff,0 6px 15px rgba(61,85,157,.075);
}
.page-title-icon .icon { width:24px; height:24px; stroke-width:1.8; }
.page-heading-copy .eyebrow { margin-bottom:3px; }
.page-heading-copy h1 { margin-top:7px; }
.dashboard-page-heading .page-heading-main { gap:18px; }
.dashboard-page-heading .page-title-icon { flex-basis:60px; width:60px; height:60px; color:#536fe0; border-color:#dfe5fa; border-radius:18px; background:#fff; box-shadow:0 8px 20px rgba(60,83,146,.1); }
.dashboard-page-heading .page-title-icon .icon { width:27px; height:27px; }
.detail-title-line { gap:13px; }
.detail-title-icon { flex-basis:48px; width:48px; height:48px; border-radius:14px; }
.detail-title-icon .icon { width:22px; height:22px; }

/* Panel title groups and subtle color cues */
.panel { border-color:#dfe6f0; border-radius:18px; box-shadow:0 9px 26px rgba(35,55,89,.06); }
.panel-heading {
  padding:21px 24px 18px;
  border-bottom:1px solid #edf1f7;
  background:linear-gradient(105deg,#f9faff 0%,#fff 58%,#fbfcff 100%);
}
.panel-heading h2 { color:#293e5c; font-size:19px; }
.panel-heading p { color:#6d7f98; font-size:12px; }
.panel-heading .eyebrow { color:#596fc0; }
.panel-title-group { display:flex; align-items:center; gap:13px; min-width:0; }
.panel-title-group > div { min-width:0; }
.section-heading-icon {
  display:grid;
  place-items:center;
  flex:0 0 42px;
  width:42px;
  height:42px;
  color:#526bd2;
  border:1px solid #e0e7fb;
  border-radius:13px;
  background:linear-gradient(145deg,#eef2ff,#f9faff);
}
.section-heading-icon .icon { width:19px; height:19px; }
.form-panel-heading { background:linear-gradient(110deg,#f5f7ff,#fff 65%); }
.create-panel-icon { flex:0 0 42px; width:42px; height:42px; border-color:#e0e7fb; border-radius:13px; background:#eef2ff; }

/* Tables: stronger hierarchy, more breathing room, clearer row actions */
.data-table { min-width:760px; }
.data-table thead { background:#f2f5fc; }
.data-table th {
  height:50px;
  padding:0 17px;
  color:#50658b;
  font-size:10px;
  font-weight:820;
  letter-spacing:.085em;
  border-top:1px solid #e9eef7;
  border-bottom:1px solid #dfe6f1;
}
.data-table th:first-child,.data-table td:first-child { padding-left:23px; }
.data-table td {
  height:66px;
  padding:12px 17px;
  color:#435772;
  font-size:12px;
  line-height:1.5;
  font-variant-numeric:tabular-nums;
  border-bottom:1px solid #edf1f6;
}
.data-table tbody tr:nth-child(even) td { background:#fcfdff; }
.data-table tbody tr:hover td { background:#f3f6ff !important; }
.data-table tbody tr:hover td:first-child { box-shadow:inset 3px 0 #667fe0; }
.table-primary-link { color:#3f5ec2; font-size:12px; font-weight:780; }
.table-primary-link:hover { color:#304cae; }
.table-subtext,.v3-small { font-size:11px; }
.invoice-table { min-width:1060px; }
.invoice-table td { height:68px; }
.table-toolbar { padding:15px 23px 12px; color:#657894; background:#fbfcff; }
.table-toolbar strong { color:#3654ac; }
.status-badge,.v3-status { padding:7px 11px; font-size:11px; font-weight:760; }
.row-action { flex-basis:37px; width:37px; height:37px; color:#536bd0; border-color:#dfe6f5; border-radius:11px; background:#f8f9ff; }
.row-action .icon { width:17px; height:17px; }
.row-action:hover { color:#344fb7; border-color:#c8d4f5; background:#eef2ff; }
.invoice-inline-update,.invoice-inline-lock { min-height:36px; font-size:11px; }
.permission-chip { padding:6px 10px; color:#435dbb; font-size:10px; border:1px solid #e0e6fa; border-radius:999px; background:#f2f5ff; }
.v3-tag { padding:6px 10px; color:#435dbb; border-color:#e0e6fa; border-radius:999px; background:#f2f5ff; }
.pagination-row { padding:16px 22px; background:#f8faff; }
.page-number { min-width:38px; height:38px; border-radius:11px; }
.page-number.is-current { border-color:#536fe0; background:#536fe0; }

/* Forms and filters: larger controls, calm tinted surfaces, crisp focus states */
.form-grid { gap:23px 25px; padding:27px; }
.form-field { gap:9px; color:#394f70; font-size:13px; font-weight:700; }
.form-field > span { color:#394f70; }
.form-field input,.form-field select,.form-field textarea,.form-input-small {
  min-height:48px;
  padding:11px 14px;
  color:#2e4362;
  font-size:14px;
  border:1px solid #d8e1ef;
  border-radius:12px;
  background:#fcfdff;
  box-shadow:inset 0 1px 2px rgba(28,45,76,.025);
}
.form-field textarea { min-height:112px; line-height:1.55; }
.form-field input:hover,.form-field select:hover,.form-field textarea:hover,.form-input-small:hover { border-color:#bdcbed; background:#fff; }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus,.form-input-small:focus {
  border-color:#8197e6;
  background:#fff;
  box-shadow:0 0 0 4px rgba(83,111,224,.12);
}
.form-field input::placeholder,.form-field textarea::placeholder,.form-input-small::placeholder { color:#94a0b3; }
.form-field small { color:#6d7e97; font-size:11px; line-height:1.5; }
.form-field input[type="checkbox"],.form-field input[type="radio"],.data-table input[type="checkbox"] { width:17px; height:17px; accent-color:#536fe0; }
.stacked-form { gap:16px; padding-right:23px; padding-left:23px; }
.stacked-form .form-field input,.stacked-form .form-field select,.stacked-form .form-field textarea { min-height:46px; }
.stacked-form .form-field textarea { min-height:86px; }
.form-actions { gap:11px; padding:19px 27px 27px; border-top:1px solid #edf1f7; background:#fbfcff; }
.form-help-note { margin:16px 23px 0; padding:14px; border:1px solid #e2e8f3; background:#f7f9ff; }
.form-help-note > span { flex:0 0 24px; width:24px; height:24px; color:#536bd2; border-radius:8px; background:#e9eeff; }
.filter-bar { gap:12px; padding:19px 23px; border-bottom-color:#e5ebf4; background:#f8faff; }
.search-control,.date-filter { min-height:46px; border-color:#dbe3ef; border-radius:12px; background:#fff; }
.search-control > .icon { flex:0 0 17px; color:#5b73d3; }
.search-control input,.date-filter input { font-size:12px; }
.date-filter { padding:0 12px; }
.date-filter span { color:#637590; font-size:11px; font-weight:650; }
.filter-submit { min-height:46px; }
.entity-search-form { padding-bottom:18px; }
.entity-search-form .search-control { min-height:44px; }
.v3-filter-details { border-color:#dce4f1; border-radius:12px; background:#fff; }
.v3-filter-details[open] { border-color:#ccd8f7; box-shadow:0 5px 16px rgba(57,78,137,.05); }
.v3-filter-details summary { padding:13px 15px; color:#3f5577; font-size:12px; }
.v3-filter-details summary::before { display:inline-block; margin-right:8px; color:#536fe0; content:"▦"; font-size:14px; }
.v3-filter-details summary span { color:#77869d; font-size:11px; }
.v3-filter-advanced-grid { gap:14px; padding:17px; background:#fbfcff; }
.v3-filter-advanced-grid .form-field { font-size:12px; }
.v3-filter-advanced-grid .form-field input,.v3-filter-advanced-grid .form-field select { min-height:43px; font-size:13px; }
.file-limit-chip { color:#4c63bb; border-color:#e0e7fb; background:#f3f5ff; }
.upload-dropzone { min-height:164px; margin-right:27px; margin-left:27px; border-color:#bac8ec; border-radius:16px; background:linear-gradient(145deg,#f6f8ff,#fcfdff); }
.upload-dropzone:hover,.upload-dropzone.is-dragging { border-color:#7289df; background:#eff3ff; }
.upload-icon { width:49px; height:49px; color:#536fe0; border:1px solid #e0e7fb; border-radius:15px; background:#fff; }
.upload-icon .icon { width:23px; height:23px; }
.upload-dropzone strong { color:#334b70; font-size:13px; }
.upload-dropzone small { font-size:11px; }

/* Keep the stronger layout comfortable on tablets and phones */
@media (max-width:1000px) {
  .dashboard-grid,.detail-layout,.entity-layout,.admin-grid,.profile-settings-grid { grid-template-columns:minmax(0,1fr); }
  .entity-create-panel,.admin-create-panel { grid-row:auto; }
}
@media (max-width:760px) {
  .page-heading-main { gap:12px; flex-basis:100%; }
  .page-title-icon { flex-basis:46px; width:46px; height:46px; border-radius:14px; }
  .page-title-icon .icon { width:21px; height:21px; }
  .dashboard-page-heading .page-title-icon { flex-basis:50px; width:50px; height:50px; }
  .dashboard-page-heading .page-title-icon .icon { width:23px; height:23px; }
  .panel-heading { padding:18px 17px 15px; }
  .panel-heading h2 { font-size:17px; }
  .panel-title-group { gap:10px; }
  .section-heading-icon { flex-basis:36px; width:36px; height:36px; border-radius:11px; }
  .form-grid { grid-template-columns:minmax(0,1fr); gap:18px; padding:20px; }
  .form-field-wide { grid-column:auto; }
  .form-actions { padding:16px 20px 20px; }
  .filter-bar { align-items:stretch; padding:15px; }
  .search-control { flex-basis:100%; min-width:0; }
  .date-filter { flex:1 1 40%; min-width:0; }
  .date-filter input { min-width:0; width:100%; }
  .invoice-edit-guide { flex-wrap:wrap; }
  .data-table th:first-child,.data-table td:first-child { padding-left:16px; }
}
@media (max-width:480px) {
  .page-title-icon { flex-basis:42px; width:42px; height:42px; border-radius:13px; }
  .page-title-icon .icon { width:20px; height:20px; }
  .dashboard-page-heading { padding:18px 16px; }
  .panel-title-group { align-items:flex-start; }
  .section-heading-icon { margin-top:2px; }
  .panel-heading { gap:11px; }
  .form-grid { padding:17px; }
  .upload-dropzone { margin-right:17px; margin-left:17px; padding:16px; }
}

/* V11 responsive tables: collapse each horizontal row into a labeled record card */
@media (max-width:900px) {
  .table-wrap,.v3-table-wrap { width:100%; overflow:visible; border-radius:0; }
  .data-table,.invoice-table,.entity-table,.admin-grid .data-table,.report-table {
    display:block;
    width:100%;
    min-width:0;
    border-collapse:separate;
    border-spacing:0;
  }
  .data-table thead {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
  }
  .data-table tbody { display:grid; gap:13px; padding:13px 14px 17px; }
  .data-table tbody tr {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 10px;
    min-width:0;
    margin:0;
    padding:6px 11px;
    border:1px solid #e0e7f1;
    border-radius:15px;
    background:linear-gradient(145deg,#fff,#fbfcff);
    box-shadow:0 5px 14px rgba(37,56,92,.055);
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
  }
  .data-table tbody tr:hover {
    border-color:#cbd7f3;
    box-shadow:0 8px 20px rgba(54,76,131,.09);
    transform:translateY(-1px);
  }
  .data-table tbody tr td {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    width:auto;
    min-width:0;
    min-height:57px;
    height:auto;
    padding:10px 7px;
    color:#3e536f;
    font-size:12px;
    line-height:1.45;
    overflow-wrap:anywhere;
    vertical-align:top;
    border:0;
    border-bottom:1px solid #edf1f6;
    background:transparent !important;
  }
  .data-table tbody tr td::before {
    display:block;
    max-width:100%;
    margin:0 0 5px;
    color:#73829a;
    font-size:9px;
    font-weight:820;
    letter-spacing:.075em;
    line-height:1.25;
    text-transform:uppercase;
    content:attr(data-label);
  }
  .data-table tbody tr td:first-child {
    grid-column:1 / -1;
    min-height:0;
    padding-top:10px;
    padding-bottom:12px;
    border-bottom:1px solid #e7ecf4;
  }
  .data-table tbody tr td:last-child {
    grid-column:1 / -1;
    min-height:0;
    border-bottom:0;
  }
  .data-table tbody tr td[colspan] {
    grid-column:1 / -1;
    display:block;
    min-height:0;
    padding:0;
    border:0;
  }
  .data-table tbody tr td[colspan]::before { display:none; }
  .data-table td .v3-small,.data-table td small { max-width:100% !important; white-space:normal !important; overflow-wrap:anywhere; }
  .data-table td .table-desc { max-width:100%; white-space:normal; }
  .data-table td.entity-actions { align-items:flex-start !important; text-align:left !important; }
  .data-table td .invoice-row-actions,.data-table td .v3-table-actions { justify-content:flex-start; flex-wrap:wrap; }
  .data-table td .empty-state,.data-table td .v3-empty { padding:17px 8px; }
  .data-table td .status-badge,.data-table td .v3-status { margin-top:1px; }
  .invoice-table { min-width:0; }
  .table-toolbar { padding:13px 16px; }
  .pagination-row { padding:14px 16px; }
}
@media (max-width:480px) {
  .data-table tbody { gap:11px; padding:11px 10px 14px; }
  .data-table tbody tr { grid-template-columns:minmax(0,1fr); padding:5px 10px; border-radius:13px; }
  .data-table tbody tr td { min-height:0; padding:10px 6px; }
  .data-table tbody tr td:first-child { padding-top:9px; padding-bottom:11px; }
  .data-table tbody tr td:last-child { padding-bottom:10px; }
  .data-table td .v3-table-actions,.data-table td .invoice-row-actions { gap:7px; }
  .table-toolbar { align-items:flex-start; flex-direction:column; gap:4px; }
}

/* Make other compact vertical information lists read as distinct cards too */
.detail-field-grid { gap:12px; }
.detail-field-grid .detail-field {
  padding:13px 14px;
  border:1px solid #e7ecf4;
  border-radius:13px;
  background:linear-gradient(145deg,#fff,#fbfcff);
}
.detail-field-grid .detail-field-wide { background:linear-gradient(110deg,#f5f7ff,#fff); }
.detail-stats-row { gap:11px; }
.detail-stats-row > div {
  padding:13px 14px;
  border:1px solid #e7ecf4;
  border-radius:12px;
  background:#fff;
}
.detail-stats-row > div + div { padding-left:14px; border-left:1px solid #e7ecf4; }
.quick-list { gap:8px; padding-right:18px; padding-left:18px; }
.quick-list-item { padding:12px; border:1px solid #e8edf4; border-radius:13px; background:#fbfcff; }
.quick-list-item:last-child { border-bottom:1px solid #e8edf4; }
.profile-info-row { margin-top:9px; padding:12px 13px; border:1px solid #e7ecf4; border-radius:12px; background:#fbfcff; }
.profile-info-row:last-child { border:1px solid #e7ecf4; }
@media (max-width:760px) {
  .detail-stats-row { grid-template-columns:minmax(0,1fr); }
  .detail-stats-row > div + div { padding-left:14px; border-left:1px solid #e7ecf4; }
}

/* V13 color system — vivid operational widgets, stronger tables and forms */
:root {
  --color-ink:#213651;
  --color-muted:#627691;
  --color-line:#dce5f0;
  --color-blue:#2868c5;
  --color-blue-deep:#1f4f9c;
  --color-cyan:#1a9dbb;
  --color-green:#1a9b76;
  --color-amber:#e6a12b;
  --color-coral:#df5f6d;
  --color-violet:#7961ce;
}
body.app-body { color:var(--color-ink); background:#edf2f8; }
.app-shell,.main-shell { background:#edf2f8; }
.page-area { background:transparent; }
.panel { border-color:#d8e2ef; border-radius:18px; box-shadow:0 12px 30px rgba(30,56,96,.085); }
.panel-heading { border-bottom-color:#e5ebf4; background:linear-gradient(100deg,#f3f7ff 0%,#fff 62%,#f4f9ff 100%); }
.panel-heading h2 { color:#243d60; }
.panel-heading p { color:#607793; }
.panel-heading .eyebrow { color:#315f9e; }
.page-heading .eyebrow { color:#315f9e; border-color:#c9daf4; background:#e7effd; }
.page-heading .eyebrow::before { background:#27a7b8; box-shadow:0 0 0 3px rgba(39,167,184,.16); }
.page-title-icon { color:#fff; border-color:#3d79d1; background:linear-gradient(145deg,#3578d4,#295bb0); box-shadow:0 9px 18px rgba(39,94,173,.22); }
.page-title-icon .icon { stroke-width:1.9; }
.dashboard-page-heading {
  min-height:166px;
  border:0;
  border-radius:22px;
  background:linear-gradient(112deg,#204d98 0%,#2e70bf 52%,#139ab5 100%);
  box-shadow:0 16px 32px rgba(31,80,147,.22);
}
.dashboard-page-heading::before { width:6px; background:linear-gradient(180deg,#89d9ff,#36d0bf,#ffc55a); }
.dashboard-page-heading::after { top:-122px; right:9%; width:300px; height:300px; border-color:rgba(255,255,255,.2); box-shadow:0 0 0 23px rgba(255,255,255,.065),0 0 0 51px rgba(255,255,255,.04),0 0 0 82px rgba(255,255,255,.025); }
.dashboard-page-heading .page-heading-copy .eyebrow { color:#d5e9ff; border-color:rgba(255,255,255,.18); background:rgba(255,255,255,.1); }
.dashboard-page-heading .page-heading-copy .eyebrow::before { background:#58ddbd; box-shadow:0 0 0 3px rgba(88,221,189,.18); }
.dashboard-page-heading h1 { color:#fff; }
.dashboard-page-heading p { color:rgba(255,255,255,.82); }
.dashboard-page-heading .page-title-icon { color:#fff; border-color:rgba(255,255,255,.26); background:rgba(255,255,255,.15); box-shadow:inset 0 1px 0 rgba(255,255,255,.18); }
.dashboard-page-heading > .button-primary { color:#2459a5; border-color:#fff; background:#fff; box-shadow:0 8px 20px rgba(18,46,94,.2); }
.dashboard-page-heading > .button-primary:hover { color:#173e7c; background:#f0f6ff; }

/* CoreUI-inspired invoice widgets with useful, non-decorative metrics */
.dashboard-metrics { gap:15px; margin-bottom:18px; }
.dashboard-metrics .metric-widget {
  min-height:164px;
  padding:20px 21px 17px;
  color:#fff;
  border:0;
  border-radius:18px;
  box-shadow:0 12px 24px rgba(37,66,112,.16);
}
.dashboard-metrics .metric-widget::before { display:none; }
.dashboard-metrics .metric-widget::after { position:absolute; top:-42px; right:-24px; width:138px; height:138px; border:1px solid rgba(255,255,255,.18); border-radius:50%; box-shadow:0 0 0 16px rgba(255,255,255,.055),0 0 0 35px rgba(255,255,255,.035); content:""; pointer-events:none; }
.dashboard-metrics .metric-widget:hover { transform:translateY(-4px); box-shadow:0 17px 30px rgba(37,66,112,.22); }
.dashboard-metrics .metric-widget.metric-widget-blue { background:linear-gradient(130deg,#168fce 0%,#347bd2 56%,#4a68d3 100%) !important; }
.dashboard-metrics .metric-widget.metric-widget-cyan { background:linear-gradient(130deg,#159bb6 0%,#25acc1 55%,#35bdd0 100%) !important; }
.dashboard-metrics .metric-widget.metric-widget-green { background:linear-gradient(130deg,#138e75 0%,#19a783 56%,#37b895 100%) !important; }
.dashboard-metrics .metric-widget.metric-widget-coral { background:linear-gradient(130deg,#d9506a 0%,#e66a6b 56%,#f18762 100%) !important; }
.dashboard-metrics .metric-label { color:rgba(255,255,255,.94); font-size:12px; font-weight:760; }
.dashboard-metrics .metric-icon { z-index:1; width:43px; height:43px; color:#fff; border:1px solid rgba(255,255,255,.27); border-radius:14px; background:rgba(255,255,255,.17); }
.dashboard-metrics .metric-icon .icon { width:21px; height:21px; }
.dashboard-metrics .metric-value { position:relative; z-index:1; margin-top:8px; color:#fff; font-size:38px; letter-spacing:-.05em; }
.dashboard-metrics .metric-foot { position:relative; z-index:1; margin-top:8px; color:rgba(255,255,255,.84); font-size:10px; }
.dashboard-metrics .metric-arrow { color:#fff; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.16); }
.dashboard-metrics .metric-sparkline { position:absolute; right:0; bottom:0; left:0; width:100%; height:58px; overflow:visible; opacity:.42; }
.dashboard-metrics .metric-sparkline polyline { fill:none; stroke:rgba(255,255,255,.92); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }

.dashboard-analytics-grid { display:grid; grid-template-columns:minmax(0,1.62fr) minmax(330px,.88fr); gap:18px; margin:0 0 18px; }
.dashboard-trend-panel,.dashboard-flow-panel { min-width:0; overflow:hidden; }
.trend-panel-heading { border-bottom:0; background:linear-gradient(105deg,#eff5ff,#fff 62%); }
.trend-panel-heading .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#3a83dc,#3863c7); box-shadow:0 7px 14px rgba(49,104,193,.2); }
.trend-chart-legend { display:flex; align-items:center; flex-wrap:wrap; gap:12px 18px; padding:4px 25px 0; color:#617791; font-size:10px; }
.trend-chart-legend span { display:inline-flex; align-items:center; gap:7px; }
.trend-chart-legend i { width:9px; height:9px; border-radius:50%; box-shadow:0 0 0 3px rgba(48,116,208,.12); }
.trend-chart-legend .legend-blue { background:#347be0; }
.trend-chart-legend .legend-green { background:#17a682; box-shadow:0 0 0 3px rgba(23,166,130,.13); }
.trend-chart-legend b { margin-left:auto; padding:6px 10px; color:#2d5ea8; font-size:10px; border-radius:999px; background:#e9f1ff; }
.trend-chart-wrap { padding:4px 15px 13px; }
.invoice-trend-chart { display:block; width:100%; height:230px; overflow:visible; }
.trend-grid-lines line { stroke:#e7edf5; stroke-width:1; stroke-dasharray:4 5; }
.trend-area { fill:url(#invoice-trend-fill); }
.trend-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.trend-line-invoices { stroke:#347be0; }
.trend-line-paid { stroke:#19a783; stroke-width:2.5; }
.trend-point { stroke:#fff; stroke-width:2; vector-effect:non-scaling-stroke; }
.trend-point-invoices { fill:#347be0; }
.trend-point-paid { fill:#19a783; }
.trend-month-label { fill:#7789a2; font-size:10px; font-family:inherit; font-weight:700; }
.dashboard-flow-panel .panel-heading { background:linear-gradient(105deg,#fff8ed,#fff 70%); }
.dashboard-flow-panel .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#efa62f,#ed7b31); box-shadow:0 7px 14px rgba(215,131,45,.2); }
.flow-widget { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:15px; padding:12px 19px 21px; }
.flow-donut { position:relative; display:grid; place-items:center; width:142px; aspect-ratio:1; border-radius:50%; box-shadow:0 8px 18px rgba(41,64,105,.13); }
.flow-donut::before { position:absolute; inset:15px; border:1px solid #e7edf5; border-radius:50%; background:#fff; content:""; }
.flow-donut > div { position:relative; z-index:1; display:grid; gap:3px; text-align:center; }
.flow-donut strong { color:#203b63; font-size:22px; font-weight:850; letter-spacing:-.04em; }
.flow-donut small { color:#71829a; font-size:9px; font-weight:700; }
.flow-legend { display:grid; gap:9px; min-width:0; }
.flow-legend-item { display:grid; grid-template-columns:9px minmax(0,1fr) auto; align-items:center; gap:6px 8px; min-width:0; color:#536882; }
.flow-legend-item:hover .flow-legend-label { color:#285eb0; }
.flow-legend-dot { width:9px; height:9px; border-radius:50%; background:var(--flow-color); }
.flow-legend-label { overflow:hidden; font-size:10px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.flow-legend-item strong { color:#2d4567; font-size:11px; font-weight:800; font-variant-numeric:tabular-nums; }
.flow-legend-item > i { grid-column:2 / -1; height:4px; overflow:hidden; border-radius:9px; background:#e9eef5; font-style:normal; }
.flow-legend-item > i > b { display:block; width:var(--flow-share); height:100%; border-radius:inherit; background:var(--flow-color); }
.dashboard-widget-footer { padding:0 20px 18px; }
.dashboard-grid { gap:18px; }
.dashboard-grid .panel-heading { min-height:94px; }
.dashboard-grid .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#3984dc,#335ec1); box-shadow:0 6px 12px rgba(54,105,193,.18); }
.dashboard-grid .quick-approval-panel .section-heading-icon { background:linear-gradient(145deg,#f1af35,#e98532); box-shadow:0 6px 12px rgba(224,146,42,.18); }

/* Use bolder color rhythm across all inner pages, not only dashboard */
.button-primary,.topbar-quick-create { border-color:#205aa9; background:linear-gradient(120deg,#347bd2,#275eb5); box-shadow:0 7px 16px rgba(39,94,181,.22); }
.button-primary:hover,.topbar-quick-create:hover { background:linear-gradient(120deg,#286dc2,#204f9c); box-shadow:0 10px 20px rgba(39,94,181,.28); }
.button-secondary { color:#34577f; border-color:#cbd9eb; background:#fff; }
.button-secondary:hover { color:#245db2; border-color:#8fb1e1; background:#f1f6ff; }
.panel-heading .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#4a8cdb,#3565bd); box-shadow:0 6px 13px rgba(51,103,190,.18); }
.panel-heading .section-icon-amber { background:linear-gradient(145deg,#f1b437,#eb8733); box-shadow:0 6px 13px rgba(225,144,46,.2); }
.form-panel-heading { background:linear-gradient(105deg,#eaf2ff,#f9fbff 72%); border-bottom-color:#dce7f7; }
.form-panel-heading .section-heading-icon { background:linear-gradient(145deg,#367bd2,#285ab0); }
.form-field,.form-field > span { color:#334b6d; }
.form-field input,.form-field select,.form-field textarea,.form-input-small { border-color:#c9d6e8; background:#fff; }
.form-field input:hover,.form-field select:hover,.form-field textarea:hover,.form-input-small:hover { border-color:#8eafe0; box-shadow:0 3px 10px rgba(45,96,173,.07); }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus,.form-input-small:focus { border-color:#3c7fd0; box-shadow:0 0 0 4px rgba(52,123,210,.16); }
.filter-bar { background:linear-gradient(100deg,#eff5ff,#f8fbff); border-bottom-color:#d9e5f3; }
.search-control,.date-filter { border-color:#cbd9ea; }
.search-control > .icon { color:#3478ca; }
.v3-filter-details { border-color:#cad8ea; background:#fff; }
.v3-filter-details[open] { border-color:#7ca7df; box-shadow:0 8px 20px rgba(42,92,161,.1); }
.v3-filter-details summary { color:#2e5486; }
.v3-filter-details summary::before { color:#367bd2; }
.upload-dropzone { border-color:#80aee0; background:linear-gradient(145deg,#eaf4ff,#f7fcff); }
.upload-dropzone:hover,.upload-dropzone.is-dragging { border-color:#347bd2; background:#e4f2ff; box-shadow:0 8px 18px rgba(52,123,210,.1); }
.upload-icon { color:#fff; border:0; background:linear-gradient(145deg,#3684d8,#3262bb); box-shadow:0 6px 13px rgba(49,104,188,.19); }
.file-limit-chip { color:#2c5d9f; border-color:#c7d8f0; background:#e8f1ff; }
.page-heading:not(.dashboard-page-heading) .page-title-icon { background:linear-gradient(145deg,#3d83d8,#315fbb); border-color:#2c66b5; box-shadow:0 8px 18px rgba(43,96,175,.2); }
.entity-type-tab,.report-type-tab { border-color:#cad8e9; background:#fff; }
.entity-type-tab:hover,.report-type-tab:hover { color:#215cab; border-color:#8eb0df; background:#eff5ff; }
.entity-type-tab.is-active,.report-type-tab.is-active { color:#fff; border-color:#2b69bb; background:linear-gradient(125deg,#3982d4,#285daf); box-shadow:0 6px 15px rgba(42,96,177,.2); }
.tab-link { color:#627793; }
.tab-link.is-current { color:#285fab; }
.tab-link.is-current::after { height:3px; background:linear-gradient(90deg,#2d75ca,#16a4b8); }

/* Strong, readable table headers; keep every data row clear */
.data-table thead { background:linear-gradient(100deg,#265ca8,#347bc2 62%,#2495b2); }
.data-table th { color:#fff; border-top:0; border-bottom:1px solid rgba(255,255,255,.2); }
.data-table tbody tr:nth-child(even) td { background:#f2f6fc; }
.data-table tbody tr:hover td { background:#e7f1ff !important; }
.data-table tbody tr:hover td:first-child { box-shadow:inset 4px 0 #258dbf; }
.table-primary-link { color:#245eaf; }
.table-primary-link:hover { color:#173f7e; }
.table-toolbar { color:#536b89; background:#edf4ff; }
.table-toolbar strong { color:#245fae; }
.pagination-row { background:linear-gradient(90deg,#edf4ff,#f7faff); border-top-color:#d8e4f3; }
.page-number { border-color:#c8d7eb; }
.page-number:hover { color:#fff; border-color:#347bd2; background:#347bd2; }
.page-number.is-current { color:#fff; border-color:#245ba9; background:linear-gradient(125deg,#3982d4,#275bad); box-shadow:0 6px 14px rgba(38,94,177,.25); }
.status-blue { color:#235ca9; background:#e5efff; }
.status-teal { color:#087f91; background:#def6f7; }
.status-warning { color:#94600d; background:#fff0cf; }
.status-success { color:#117451; background:#ddf5e9; }
.status-danger { color:#a83b4a; background:#ffe5e9; }
.status-violet { color:#614cb4; background:#eee9ff; }
.v3-status.ok { color:#126b4c; background:#dff5e9; }
.v3-status.wait { color:#87590d; background:#fff0d2; }
.v3-status.bad { color:#a43d4a; background:#ffe6e9; }
.v3-status.blue { color:#255eae; background:#e6efff; }
.invoice-edit-guide { border-color:#bbd2f1; background:linear-gradient(105deg,#e7f1ff,#f8fbff); }
.invoice-edit-guide-icon { color:#fff; background:linear-gradient(145deg,#3981d2,#2f61b8); }
.invoice-edit-state.is-open { border-color:#8fd2b4; background:linear-gradient(100deg,#e4f8ed,#fff); }
.invoice-edit-state.is-locked { border-color:#cbd7e5; background:linear-gradient(100deg,#eef2f7,#fff); }

/* Keep the new analytics and colors responsive */
@media (max-width:1100px) {
  .dashboard-analytics-grid { grid-template-columns:minmax(0,1fr); }
  .flow-widget { grid-template-columns:160px minmax(0,1fr); }
}
@media (max-width:760px) {
  .dashboard-page-heading { padding:23px 22px; }
  .dashboard-page-heading .page-heading-main { gap:13px; }
  .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-metrics .metric-widget { min-height:150px; padding:17px; }
  .dashboard-metrics .metric-value { font-size:32px; }
  .dashboard-analytics-grid { gap:14px; }
  .flow-widget { grid-template-columns:130px minmax(0,1fr); gap:12px; padding:8px 15px 17px; }
  .flow-donut { width:124px; }
  .invoice-trend-chart { height:195px; }
  .trend-chart-legend { padding-right:18px; padding-left:18px; }
  .trend-panel-heading .button { width:100%; }
}
@media (max-width:480px) {
  .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .dashboard-metrics .metric-widget { min-height:143px; padding:14px; border-radius:15px; }
  .dashboard-metrics .metric-label { font-size:10px; }
  .dashboard-metrics .metric-value { font-size:29px; }
  .dashboard-metrics .metric-foot { font-size:9px; }
  .dashboard-metrics .metric-icon { width:36px; height:36px; }
  .flow-widget { grid-template-columns:minmax(0,1fr); justify-items:center; }
  .flow-legend { width:100%; }
  .trend-chart-wrap { padding-right:6px; padding-left:6px; }
  .invoice-trend-chart { height:175px; }
  .dashboard-page-heading .page-title-icon { display:none; }
}

/* Keep the single-row top navigation flat and unified; color stays in content widgets */
.app-header { border-bottom:1px solid #e1e8f1; box-shadow:0 5px 18px rgba(31,53,88,.07); }
.app-header::before { display:none; }
.topbar { min-height:79px; }
.top-navigation-v1 {
  justify-content:center;
  gap:clamp(8px,.8vw,13px);
  min-height:55px;
  padding:0 clamp(12px,1.8vw,28px);
  border:0;
  background:transparent;
}
.top-navigation-v1 .top-nav-home,
.top-navigation-v1 .top-nav-group > summary {
  min-height:46px;
  padding:0 1px;
  color:#4e617c;
  font-size:11.5px;
  font-weight:690;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.top-navigation-v1 .top-nav-home:hover,
.top-navigation-v1 .top-nav-group > summary:hover,
.top-navigation-v1 .top-nav-group[open] > summary {
  color:#285f9f;
  border:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.top-navigation-v1 .top-nav-home.is-active,
.top-navigation-v1 .top-nav-group.is-active > summary {
  color:#255c9b;
  border:0;
  background:transparent;
  box-shadow:none;
}
.top-navigation-v1 .top-nav-home.is-active::after,
.top-navigation-v1 .top-nav-group.is-active > summary::after {
  right:0;
  bottom:1px;
  left:0;
  width:auto;
  height:2px;
  background:#2b75bc;
}
.top-navigation-v1 .top-nav-icon,
.top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex-basis:19px;
  width:19px;
  height:19px;
  color:#7588a2;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.top-navigation-v1 .top-nav-home:hover .top-nav-icon,
.top-navigation-v1 .top-nav-group > summary:hover .top-nav-icon,
.top-navigation-v1 .top-nav-group[open] > summary .top-nav-icon,
.top-navigation-v1 .is-active .top-nav-icon { color:#2b75bc; background:transparent; }
.top-navigation-v1 .top-nav-chevron { color:#7a8ca5; font-size:13px; }
.tone-blue,.tone-teal,.tone-violet,.tone-amber,.tone-rose {
  --nav-color:#2d6eaf;
  --nav-soft:#edf4fb;
  --nav-border:#d5e2f0;
}
.top-nav-dropdown,
.top-nav-group[open] .top-nav-dropdown { border-color:#d9e3ef; border-radius:13px; background:#fff; box-shadow:0 14px 32px rgba(29,52,88,.16); }
.top-nav-dropdown::before { display:none !important; }
.top-nav-link { color:#415a78; border-radius:8px; }
.top-nav-link:hover,.top-nav-link.is-active { color:#245f9f; background:#f0f6fd; }
.top-nav-link-icon,
.top-nav-link:hover .top-nav-link-icon,
.top-nav-link.is-active .top-nav-link-icon { color:#4f77a8; border:0; border-radius:0; background:transparent; }
.top-nav-link:hover .top-nav-link-icon,.top-nav-link.is-active .top-nav-link-icon { color:#2470b2; }
.top-nav-dropdown-head { border-bottom-color:#e8eef5; }
.top-nav-dropdown-head strong { color:#315b89; }
.top-navigation-v1 .top-nav-home:focus-visible,
.top-navigation-v1 .top-nav-group > summary:focus-visible { outline:2px solid #73a7d6; outline-offset:4px; }
@media (max-width:1450px) and (min-width:1321px) {
  .top-navigation-v1 { gap:clamp(5px,.55vw,8px); }
  .top-navigation-v1 .top-nav-home,.top-navigation-v1 .top-nav-group > summary { font-size:10.5px; }
  .top-navigation-v1 .top-nav-icon { flex-basis:17px; width:17px; height:17px; }
}
@media (max-width:1320px) {
  .top-navigation-v1 { min-height:0; padding:8px 14px 13px; border-top:1px solid #edf2f7; background:#fff; }
  .top-navigation-v1 .top-nav-home,.top-navigation-v1 .top-nav-group > summary { justify-content:flex-start; min-height:46px; padding:0 6px; font-size:13px; }
  .top-navigation-v1 .top-nav-icon { flex-basis:21px; width:21px; height:21px; }
  .top-navigation-v1 .top-nav-home.is-active::after,
  .top-navigation-v1 .top-nav-group.is-active > summary::after { right:auto; bottom:7px; left:5px; width:3px; height:30px; border-radius:3px; }
  .top-nav-link { min-height:42px; font-size:12px; }
}

/* Mobile horizontal data tables become distinct, labeled invoice record cards */
@media (max-width:900px) {
  .data-table tbody tr {
    position:relative;
    border-color:#cbdced;
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 19px rgba(36,65,105,.085);
  }
  .data-table tbody tr::before {
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    width:4px;
    border-radius:16px 0 0 16px;
    background:linear-gradient(180deg,#3c83d1,#20a5b6);
    content:"";
    pointer-events:none;
  }
  .data-table tbody tr td { color:#364e6d; }
  .data-table tbody tr td::before { color:#35689f; }
  .data-table tbody tr td:first-child { border-bottom-color:#dce7f3; }
  .data-table tbody tr:hover { border-color:#8fb5df; box-shadow:0 11px 23px rgba(37,89,150,.13); }
  .detail-field-grid .detail-field { border-color:#dce6f1; box-shadow:0 4px 11px rgba(36,65,105,.045); }
  .detail-field-grid .detail-field span,.detail-stats-row span { color:#426e9f; }
}
.quick-list-icon { color:#a56b14; border-color:#f1dfb6; background:#fff4d9; }
.quick-list-item:hover .quick-list-icon { color:#fff; border-color:#eaa333; background:#eaa333; }

/* Login welcome panel carries the same confident blue/cyan identity */
body.login-body { background:#edf2f8; }
.login-layout { background:radial-gradient(circle at 79% 15%,rgba(31,153,185,.11),transparent 25%),#edf2f8; }
.login-showcase { color:#fff; border-color:#24599b; background:linear-gradient(125deg,#1e4d95 0%,#2b70bd 54%,#149bb4 100%); box-shadow:0 18px 42px rgba(34,78,139,.22); }
.login-showcase::before { background:radial-gradient(ellipse at 78% 20%,rgba(255,255,255,.16),transparent 31%),linear-gradient(135deg,transparent 58%,rgba(255,255,255,.075) 58.1%,transparent 58.5%),linear-gradient(30deg,transparent 69%,rgba(128,248,220,.09) 69.1%,transparent 69.5%); }
.showcase-orb { border-color:rgba(255,255,255,.17); }
.showcase-orb-one { box-shadow:0 0 0 48px rgba(255,255,255,.045),0 0 0 100px rgba(255,255,255,.028); }
.showcase-orb-two { border-color:rgba(131,243,217,.24); box-shadow:0 0 0 38px rgba(131,243,217,.055); }
.login-brand .brand-mark { border-color:rgba(255,255,255,.25); background:rgba(255,255,255,.15); box-shadow:inset 0 1px 0 rgba(255,255,255,.22); }
.login-brand .topbar-brand-copy strong { color:#fff !important; }
.login-brand .topbar-brand-copy small { color:rgba(226,240,255,.74) !important; }
.login-brand .topbar-brand-copy b { color:#8ff0d8; }
.login-showcase-copy h1 { color:#fff; }
.login-showcase-copy h1 em { color:#9bf0d9; }
.login-showcase-copy p { color:rgba(235,245,255,.84); }
.eyebrow-light { color:#d5eaff; }
.eyebrow-light i { background:#79ebca; box-shadow:0 0 0 4px rgba(121,235,202,.18); }
.login-feature-row { color:rgba(242,248,255,.9); }
.login-feature-row .icon { color:#9cf2d9; }
.login-showcase-footer { color:rgba(226,240,255,.68); }
.login-form-panel { border-color:#dbe4ef; box-shadow:0 17px 40px rgba(39,61,96,.11); }
.login-form-panel .login-heading h2 { color:#213a5c; }
.login-form-panel .input-wrap { border-color:#cad8e8; }
.login-form-panel .input-wrap:focus-within { border-color:#4380cb; box-shadow:0 0 0 4px rgba(55,123,199,.14); }
.login-form-panel .input-leading { color:#3979bf; }

/* V16 — stronger AdminKit/CoreUI-inspired color across every inner screen */
:root {
  --color-blue:#2469b8;
  --color-blue-deep:#174d91;
  --color-cyan:#159db9;
  --color-green:#159773;
  --color-amber:#efa91f;
  --color-coral:#e85c68;
  --color-violet:#7658c9;
}
body.app-body { background:#e8eef6; }
.app-shell,.main-shell { background:#e8eef6; }
.page-area { background:transparent; }
.page-heading:not(.dashboard-page-heading) {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  min-height:132px;
  overflow:hidden;
  padding:22px 27px;
  margin-bottom:22px;
  border:1px solid #1b5ba2;
  border-radius:20px;
  background:linear-gradient(112deg,#174b90 0%,#2567b3 51%,#168da9 100%);
  box-shadow:0 15px 30px rgba(25,79,143,.23);
}
.page-heading:not(.dashboard-page-heading)::before {
  position:absolute;
  z-index:-1;
  inset:0 auto 0 0;
  width:6px;
  background:linear-gradient(180deg,#89e4ff 0%,#3bd0bd 56%,#ffc14d 100%);
  content:"";
}
.page-heading:not(.dashboard-page-heading)::after {
  position:absolute;
  z-index:-1;
  top:-144px;
  right:7%;
  width:300px;
  height:300px;
  border:1px solid rgba(255,255,255,.19);
  border-radius:50%;
  box-shadow:0 0 0 25px rgba(255,255,255,.065),0 0 0 55px rgba(255,255,255,.04),0 0 0 90px rgba(95,232,211,.035);
  content:"";
  pointer-events:none;
}
.page-heading:not(.dashboard-page-heading) > * { position:relative; z-index:1; }
.page-heading:not(.dashboard-page-heading) h1 { color:#fff; }
.page-heading:not(.dashboard-page-heading) p { color:rgba(239,247,255,.86); }
.page-heading:not(.dashboard-page-heading) .eyebrow {
  color:#e0efff;
  border-color:rgba(255,255,255,.26);
  background:rgba(255,255,255,.13);
}
.page-heading:not(.dashboard-page-heading) .eyebrow::before { background:#57e0be; box-shadow:0 0 0 4px rgba(87,224,190,.2); }
.page-heading:not(.dashboard-page-heading) .page-title-icon {
  flex-basis:56px;
  width:56px;
  height:56px;
  color:#fff;
  border:1px solid rgba(255,255,255,.28);
  border-radius:17px;
  background:rgba(255,255,255,.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.19);
}
.page-heading:not(.dashboard-page-heading) .page-title-icon .icon { width:26px; height:26px; }
.page-heading:not(.dashboard-page-heading) .v3-page-actions { position:relative; z-index:2; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-secondary {
  color:#fff;
  border-color:rgba(255,255,255,.3);
  background:rgba(255,255,255,.13);
  box-shadow:none;
}
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-secondary:hover { border-color:rgba(255,255,255,.55); background:rgba(255,255,255,.23); }
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-primary,
.page-heading:not(.dashboard-page-heading) > .button-primary {
  color:#1b5597;
  border-color:#fff;
  background:#fff;
  box-shadow:0 8px 18px rgba(14,48,97,.22);
}
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-primary:hover,
.page-heading:not(.dashboard-page-heading) > .button-primary:hover { color:#123d72; background:#edf6ff; }

/* Stronger color rhythm on every content panel */
.panel { border:1px solid #cbd9ea; border-top:4px solid #3279c2; border-radius:16px; background:#fff; box-shadow:0 10px 25px rgba(29,58,100,.09); }
.panel-heading {
  min-height:83px;
  border-bottom:1px solid #c8d9ed;
  background:linear-gradient(105deg,#dceafd 0%,#eaf4fd 58%,#f4fbfc 100%);
}
.panel-heading h2 { color:#174a80; }
.panel-heading p { color:#476b90; }
.panel-heading .eyebrow { color:#176bb0; }
.panel-heading .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#3987d6,#245eaf); box-shadow:0 7px 14px rgba(35,99,171,.24); }
.dashboard-trend-panel { border-top-color:#3279d0; }
.dashboard-trend-panel .panel-heading { background:linear-gradient(105deg,#d9eaff,#eaf5ff 64%,#f5fbff); }
.dashboard-flow-panel { border-top-color:#e9a224; }
.dashboard-flow-panel .panel-heading { background:linear-gradient(105deg,#fff0cb,#fff8e8 66%,#fffdf6); border-bottom-color:#f0dcae; }
.dashboard-flow-panel .panel-heading h2 { color:#765018; }
.dashboard-flow-panel .panel-heading p,.dashboard-flow-panel .panel-heading .eyebrow { color:#986515; }
.dashboard-flow-panel .panel-heading .section-heading-icon,.quick-approval-panel .panel-heading .section-heading-icon { background:linear-gradient(145deg,#f4b633,#e88228); box-shadow:0 7px 14px rgba(213,135,37,.25); }
.dashboard-grid .recent-panel { border-top-color:#3279d0; }
.dashboard-grid .quick-approval-panel { border-top-color:#efa82a; }
.dashboard-grid .recent-panel .panel-heading { background:linear-gradient(105deg,#dceafd,#eff7ff); }
.dashboard-grid .quick-approval-panel .panel-heading { background:linear-gradient(105deg,#fff0cb,#fff9eb); border-bottom-color:#efddb5; }
.form-panel-heading {
  color:#fff;
  border-bottom:0;
  background:linear-gradient(108deg,#1f5ba3 0%,#2d78bd 58%,#168da8 100%);
}
.form-panel-heading h2,.form-panel-heading p,.form-panel-heading .eyebrow,.form-panel-heading .required-note { color:#fff; }
.form-panel-heading p { color:rgba(239,247,255,.82); }
.form-panel-heading .eyebrow { color:#d8edff; }
.form-panel-heading .section-heading-icon { color:#fff; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.15); box-shadow:none; }
.form-panel-heading .file-limit-chip { color:#fff; border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.14); }
.create-panel-icon { color:#fff !important; border:0 !important; background:linear-gradient(145deg,#3d8bd5,#275eae) !important; box-shadow:0 7px 15px rgba(37,96,170,.25); }
.action-panel .panel-heading { background:linear-gradient(105deg,#e1edfc,#f0f7fd); }
.action-panel .panel-heading h2 { color:#1d4e82; }
.action-panel .panel-heading .eyebrow { color:#216eae; }
.tracking-context { border-bottom-color:#a9cce8; background:linear-gradient(100deg,#d7edff,#e6f8fc); }
.tracking-context-mark { color:#fff; border:0; background:linear-gradient(145deg,#2d83ca,#17a0b2); box-shadow:0 5px 12px rgba(32,122,178,.2); }

/* Search and status navigation get an unmistakable active state */
.filter-bar { border-top:3px solid #32a0c3; border-bottom-color:#b6d1eb; background:linear-gradient(105deg,#dcecff 0%,#e7f3fb 60%,#e1f6f4 100%); }
.search-control,.date-filter,.tracking-cari { border-color:#9db9d8; background:#fff; }
.search-control > .icon { color:#2475bb; }
.date-filter span { color:#365e89; }
.v3-filter-details { border-color:#a8c5e4; background:#f8fbff; }
.v3-filter-details summary { color:#1f5a95; }
.v3-filter-details summary::before { color:#148fad; }
.v3-filter-advanced-grid { border-top-color:#cbdced; background:linear-gradient(105deg,#f1f7ff,#f8fcff); }
.tab-row { gap:5px; padding:11px 14px; border-bottom-color:#b6cde8; background:linear-gradient(100deg,#e0ecfb,#edf6fb); }
.tab-link { padding:9px 11px; color:#3f6388; border-radius:9px; }
.tab-link:hover { color:#174d90; background:#d3e6fc; }
.tab-link.is-current { color:#fff; border-radius:9px; background:linear-gradient(120deg,#347fd0,#245eae); box-shadow:0 5px 12px rgba(40,101,174,.24); }
.tab-link.is-current::after { display:none; }
.report-type-tabs,.entity-type-tabs { gap:9px; }
.report-type-tab,.entity-type-tab { border-color:#a9c3e2; color:#315f8b; background:#fff; box-shadow:0 3px 8px rgba(39,81,128,.06); }
.report-type-tab.is-active,.entity-type-tab.is-active { color:#fff; border-color:#235fa9; background:linear-gradient(120deg,#347fd0,#2058a3 75%,#168caa); box-shadow:0 7px 15px rgba(35,93,164,.24); }

/* CoreUI-like colorful metric tiles on report and overview screens */
.report-metrics .metric-card-static { color:#fff; border:0; box-shadow:0 12px 23px rgba(33,67,112,.2); }
.report-metrics .metric-card-static::before { display:none; }
.report-metrics .metric-card-static:nth-child(1) { background:linear-gradient(130deg,#168fce,#347bd2 58%,#4a68d3) !important; }
.report-metrics .metric-card-static:nth-child(2) { background:linear-gradient(130deg,#119bb8,#24b4c5 60%,#39c4cb) !important; }
.report-metrics .metric-card-static:nth-child(3) { background:linear-gradient(130deg,#d78e14,#efa91f 62%,#f7c44b) !important; }
.report-metrics .metric-card-static:nth-child(4) { background:linear-gradient(130deg,#dc5269,#ea686a 58%,#f08062) !important; }
.report-metrics .metric-card-static .metric-label,.report-metrics .metric-card-static .metric-value { color:#fff; }
.report-metrics .metric-card-static .metric-label { font-weight:760; }
.report-metrics .metric-card-static .metric-value { font-size:30px; text-shadow:0 1px 0 rgba(0,0,0,.08); }
.report-metrics .metric-card-static .metric-foot { color:rgba(255,255,255,.83); }
.report-metrics .metric-card-static .metric-icon { color:#fff; border:1px solid rgba(255,255,255,.29); border-radius:13px; background:rgba(255,255,255,.18); }
.report-metrics .metric-card-static:nth-child(1)::after,.report-metrics .metric-card-static:nth-child(2)::after,.report-metrics .metric-card-static:nth-child(3)::after,.report-metrics .metric-card-static:nth-child(4)::after {
  position:absolute;
  top:-38px;
  right:-25px;
  width:112px;
  height:112px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:50%;
  box-shadow:0 0 0 15px rgba(255,255,255,.055),0 0 0 34px rgba(255,255,255,.035);
  content:"";
  pointer-events:none;
}

/* Sharper tables, cards and status colors throughout the app */
.data-table thead { background:linear-gradient(100deg,#174c91 0%,#2367b2 55%,#188eaa 100%); }
.data-table th { color:#fff; border-bottom-color:rgba(255,255,255,.25); }
.data-table tbody tr:nth-child(even) td { background:#edf4fc; }
.data-table tbody td { color:#2f4867; border-bottom-color:#dce6f1; }
.data-table tbody tr:hover td { background:#dcecff !important; }
.table-primary-link { color:#155ca8; }
.table-primary-link:hover { color:#0c3d78; }
.table-toolbar { color:#254f7d; background:linear-gradient(100deg,#dcecff,#e8f4fb); }
.table-toolbar strong { color:#174f91; }
.pagination-row { border-top-color:#bed2e9; background:linear-gradient(100deg,#dfecfb,#eaf5fb); }
.page-number { color:#345c87; border-color:#9ebadd; background:#fff; }
.page-number:hover { color:#fff; border-color:#2569b6; background:#2569b6; }
.page-number.is-current { color:#fff; border-color:#174f99; background:linear-gradient(125deg,#3785d4,#1e59a5); box-shadow:0 6px 14px rgba(30,87,157,.28); }
.status-blue { color:#153f7e; background:#d1e2ff; }
.status-teal { color:#076b7a; background:#c8f0f3; }
.status-warning { color:#805000; background:#ffe5a2; }
.status-success { color:#075a40; background:#c6efd9; }
.status-danger { color:#8d293a; background:#ffd3dc; }
.status-violet { color:#4f3d9c; background:#e0d9ff; }
.v3-status.ok { color:#075c40; background:#c9f0dc; }
.v3-status.wait { color:#805000; background:#ffe7a9; }
.v3-status.bad { color:#8d293a; background:#ffd5dd; }
.v3-status.blue { color:#153f7e; background:#d2e3ff; }
.v3-progress-step.done { color:#075e43; border-color:#8bd1b1; background:linear-gradient(120deg,#ccf0dc,#effbf5); }
.v3-progress-step.current { color:#164f91; border-color:#8cb3e2; background:linear-gradient(120deg,#d5e7ff,#f0f7ff); }
.v3-progress-step.done .v3-progress-icon { color:#fff; background:#169b70; }
.v3-progress-step.current .v3-progress-icon { color:#fff; background:#2c76c1; }
.invoice-edit-guide { border-color:#86b6e5; background:linear-gradient(105deg,#d7ebff,#e8f8fb); }
.invoice-edit-guide-icon { color:#fff; background:linear-gradient(145deg,#3987d6,#205cae); }
.invoice-edit-state.is-open { border-color:#83c9a8; background:linear-gradient(100deg,#d7f3e4,#f0fbf5); }
.invoice-edit-state.is-locked { border-color:#bacadd; background:linear-gradient(100deg,#e3eaf2,#f5f7fa); }
.quick-list-item { border-color:#dbe5f0; background:#f8fbff; }
.quick-list-item:last-child { border-bottom-color:#dbe5f0; }
.quick-list-icon { color:#fff; border-color:#e5a12c; background:linear-gradient(145deg,#f5b532,#e58a2a); }
.quick-list-arrow { color:#2b70b5; }

@media (max-width:1000px) {
  .page-heading:not(.dashboard-page-heading) { align-items:flex-start; min-height:0; padding:19px 20px; }
  .page-heading:not(.dashboard-page-heading) .v3-page-actions { width:100%; justify-content:flex-start; }
}
@media (max-width:760px) {
  body.app-body,.app-shell,.main-shell { background:#e8eef6; }
  .page-heading:not(.dashboard-page-heading) { gap:16px; flex-direction:column; align-items:stretch; padding:19px 17px; border-radius:16px; }
  .page-heading:not(.dashboard-page-heading) .page-heading-main { gap:12px; }
  .page-heading:not(.dashboard-page-heading) .page-title-icon { flex-basis:45px; width:45px; height:45px; border-radius:14px; }
  .page-heading:not(.dashboard-page-heading) .page-title-icon .icon { width:21px; height:21px; }
  .page-heading:not(.dashboard-page-heading) .v3-page-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-heading:not(.dashboard-page-heading) .v3-page-actions .button { width:100%; min-height:39px; padding:0 9px; font-size:10px; }
  .panel-heading { min-height:74px; padding:16px 17px 14px; }
  .form-panel-heading { min-height:78px; }
  .tab-row { overflow-x:auto; flex-wrap:nowrap; }
  .tab-link { flex:0 0 auto; }
  .report-metrics .metric-card-static .metric-value { font-size:25px; }
}
@media (max-width:480px) {
  .page-heading:not(.dashboard-page-heading) .page-heading-main { align-items:flex-start; }
  .page-heading:not(.dashboard-page-heading) .page-title-icon { flex-basis:40px; width:40px; height:40px; }
  .page-heading:not(.dashboard-page-heading) h1 { font-size:27px; }
  .report-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-metrics .metric-card-static { min-height:130px; padding:13px; }
  .report-metrics .metric-card-static .metric-label { font-size:10px; }
  .report-metrics .metric-card-static .metric-value { font-size:22px; }
}

/* V17 header refresh — one flat AdminKit-inspired blue navigation row */
.app-header {
  background:linear-gradient(108deg,#153f78 0%,#1b5798 58%,#1b688f 100%);
  border-bottom:1px solid #103a6e;
  box-shadow:0 9px 22px rgba(20,59,107,.24);
}
.app-header::before { display:none; }
.app-header .topbar { min-height:82px; background:transparent; }
.app-header .topbar-brand { color:#fff; }
.app-header .brand-mark {
  color:#fff;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}
.app-header .brand-mark span { color:#74ead5; }
.app-header .topbar-brand-copy strong { color:#fff; font-size:14px; }
.app-header .topbar-brand-copy small { color:rgba(226,240,255,.76); font-size:9px; }
.app-header .topbar-brand-copy b { color:#75e7d1; }
.app-header .top-navigation-v1 {
  min-height:58px;
  background:transparent;
  border:0;
}
.app-header .top-navigation-v1 .top-nav-home,
.app-header .top-navigation-v1 .top-nav-group > summary {
  min-height:49px;
  color:rgba(242,248,255,.9);
  font-size:12px;
  font-weight:680;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.app-header .top-navigation-v1 .top-nav-home:hover,
.app-header .top-navigation-v1 .top-nav-group > summary:hover,
.app-header .top-navigation-v1 .top-nav-group[open] > summary {
  color:#fff;
  border:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.app-header .top-navigation-v1 .top-nav-home.is-active,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary {
  color:#fff;
  border:0;
  background:transparent;
  box-shadow:none;
}
.app-header .top-navigation-v1 .top-nav-home.is-active::after,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary::after,
.app-header .top-navigation-v1 .top-nav-group[open] > summary::after {
  right:0;
  bottom:1px;
  left:0;
  width:auto;
  height:3px;
  border-radius:3px;
  background:#42d4bb;
  box-shadow:0 0 12px rgba(66,212,187,.32);
}
.app-header .top-navigation-v1 .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex-basis:20px;
  width:20px;
  height:20px;
  color:rgba(222,239,255,.78);
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.app-header .top-navigation-v1 .top-nav-home:hover .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group > summary:hover .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group[open] > summary .top-nav-icon,
.app-header .top-navigation-v1 .is-active .top-nav-icon { color:#78f0d7; background:transparent; }
.app-header .top-navigation-v1 .top-nav-chevron { color:rgba(225,240,255,.72); font-size:13px; }
.app-header .top-navigation-v1 .top-nav-home:focus-visible,
.app-header .top-navigation-v1 .top-nav-group > summary:focus-visible { outline:2px solid #70e8d1; outline-offset:4px; }
.app-header .tone-blue,.app-header .tone-teal,.app-header .tone-violet,.app-header .tone-amber,.app-header .tone-rose {
  --nav-color:#197cac;
  --nav-soft:#e8f5fc;
  --nav-border:#cbe2f2;
}
.app-header .topbar-quick-create {
  min-height:41px;
  padding:0 15px;
  color:#fff;
  border:1px solid #35cdb5;
  border-radius:10px;
  background:linear-gradient(120deg,#21b99f,#0d9e9e);
  box-shadow:0 7px 16px rgba(5,35,75,.22);
}
.app-header .topbar-quick-create:hover { color:#fff; border-color:#73ead1; background:linear-gradient(120deg,#20c3a7,#0aa8a3); box-shadow:0 9px 20px rgba(5,35,75,.27); }
.app-header .topbar-account { border-left-color:rgba(228,241,255,.24); }
.app-header .topbar-account-link:hover { background:rgba(255,255,255,.09); }
.app-header .profile-avatar { color:#fff; border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.14); }
.app-header .topbar-account-copy strong { color:#fff; }
.app-header .topbar-account-copy small { color:rgba(226,240,255,.7); }
.app-header .logout-button { color:rgba(233,244,255,.78); }
.app-header .logout-button:hover { color:#fff; border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.12); }
.app-header .mobile-menu-button { color:#fff; }
.app-header .top-nav-dropdown,
.app-header .top-nav-group[open] .top-nav-dropdown { color:#304965; border-color:#cbd9e9; background:#fff; box-shadow:0 18px 38px rgba(10,31,62,.24); }
.app-header .top-nav-dropdown-head strong { color:#1e5b99; }
.app-header .top-nav-link { color:#405a77; }
.app-header .top-nav-link:hover,.app-header .top-nav-link.is-active { color:#155e9e; background:#eaf4fd; }
.app-header .top-nav-link-icon { color:#287bb6; }
@media (max-width:1450px) and (min-width:1321px) {
  .app-header .top-navigation-v1 .top-nav-home,.app-header .top-navigation-v1 .top-nav-group > summary { font-size:11px; }
}
@media (max-width:1320px) {
  .app-header .top-navigation-v1 { background:linear-gradient(108deg,#153f78,#1b5798 62%,#1b688f); border-top:1px solid rgba(255,255,255,.16); }
  .app-header .top-navigation-v1 .top-nav-home,.app-header .top-navigation-v1 .top-nav-group > summary { color:rgba(243,249,255,.92); }
  .app-header .top-navigation-v1 .top-nav-home.is-active::after,
  .app-header .top-navigation-v1 .top-nav-group.is-active > summary::after { right:auto; bottom:8px; left:4px; width:3px; height:31px; background:#42d4bb; box-shadow:0 0 10px rgba(66,212,187,.28); }
  .app-header .top-navigation-v1 .top-nav-home:hover,.app-header .top-navigation-v1 .top-nav-group > summary:hover { color:#fff; }
  .app-header .top-navigation-v1 .top-nav-icon { color:rgba(226,240,255,.86); }
  .app-header .top-navigation-v1 .top-nav-chevron { color:rgba(226,240,255,.76); }
}

/* V18 cards and canvas finish — clearer surfaces, stronger accents, less washed-out */
body.app-body {
  background:
    radial-gradient(ellipse at 5% 8%,rgba(55,129,211,.13),transparent 25%),
    radial-gradient(ellipse at 96% 18%,rgba(25,161,183,.11),transparent 23%),
    radial-gradient(ellipse at 77% 94%,rgba(111,91,200,.07),transparent 27%),
    linear-gradient(135deg,#e4ebf5 0%,#edf2f8 46%,#e7f0f6 100%);
}
.app-shell,.main-shell { background:transparent; }
.page-area { background:transparent; }
.panel {
  --panel-accent:#347bc2;
  border-color:#b9cde3;
  border-top-color:var(--panel-accent);
  border-radius:17px;
  background:linear-gradient(180deg,#fff 0%,#fff 72%,#fbfdff 100%);
  box-shadow:0 13px 28px rgba(27,59,104,.12),0 2px 5px rgba(24,55,97,.045);
}
.list-panel { --panel-accent:#2779c4; }
.report-panel { --panel-accent:#12a0b8; }
.entity-list-panel { --panel-accent:#159b7d; }
.entity-create-panel { --panel-accent:#eaa229; }
.admin-list-panel { --panel-accent:#7763c7; }
.admin-create-panel { --panel-accent:#e35f73; }
.action-panel { --panel-accent:#e3a02c; }
.dashboard-trend-panel { --panel-accent:#2778ce; }
.dashboard-flow-panel { --panel-accent:#eaa229; }
.recent-panel { --panel-accent:#2876bf; }
.quick-approval-panel { --panel-accent:#e6a22e; }
.panel-heading {
  border-bottom-color:#c2d6ea;
  background:linear-gradient(105deg,#d7e8fb 0%,#e5f2fc 60%,#eef8fb 100%);
}
.panel-heading h2 { color:#153f70; }
.panel-heading p { color:#3f6389; }
.panel-heading .eyebrow { color:#125f9d; }
.entity-list-panel .panel-heading { background:linear-gradient(105deg,#d8f2e9,#e9f8f3 65%,#f5fcf8); border-bottom-color:#bfe4d5; }
.entity-list-panel .panel-heading h2,.entity-list-panel .panel-heading .eyebrow { color:#10694f; }
.entity-create-panel .panel-heading { background:linear-gradient(105deg,#fff0c8,#fff7df 65%,#fffbef); border-bottom-color:#f0d9a5; }
.entity-create-panel .panel-heading h2,.entity-create-panel .panel-heading .eyebrow { color:#84590c; }
.admin-list-panel .panel-heading { background:linear-gradient(105deg,#e9e2ff,#f1edff 65%,#faf8ff); border-bottom-color:#d7cdf8; }
.admin-list-panel .panel-heading h2,.admin-list-panel .panel-heading .eyebrow { color:#514093; }
.admin-create-panel .panel-heading { background:linear-gradient(105deg,#ffe1e6,#fff0f2 65%,#fff8f8); border-bottom-color:#f2c2cb; }
.admin-create-panel .panel-heading h2,.admin-create-panel .panel-heading .eyebrow { color:#a53a52; }
.report-panel .panel-heading { background:linear-gradient(105deg,#d5f0f5,#e6f7fa 65%,#f5fcfd); border-bottom-color:#b5e0e8; }
.report-panel .panel-heading h2,.report-panel .panel-heading .eyebrow { color:#096e83; }
.action-panel .panel-heading { background:linear-gradient(105deg,#fff0c8,#fff8e5 65%,#fffdf6); border-bottom-color:#efd8a5; }
.action-panel .panel-heading h2,.action-panel .panel-heading .eyebrow { color:#81590e; }
.section-heading-icon { border-radius:13px; }
.panel-heading .section-heading-icon { box-shadow:0 8px 16px rgba(28,79,143,.24); }
.dashboard-flow-panel .panel-heading { background:linear-gradient(105deg,#ffe9b4,#fff3d2 66%,#fffaf0); }
.dashboard-trend-panel .panel-heading,.recent-panel .panel-heading { background:linear-gradient(105deg,#d8eaff,#e8f4ff 66%,#f5fbff); }
.quick-approval-panel .panel-heading { background:linear-gradient(105deg,#ffe9b7,#fff4d8 66%,#fffaf0); }

/* Make existing compact cards and detail records feel intentional and tactile */
.detail-field-grid .detail-field {
  border-color:#bfd2e8;
  background:linear-gradient(145deg,#eaf3ff 0%,#f5faff 62%,#fff 100%);
  box-shadow:0 5px 13px rgba(33,74,126,.08);
}
.detail-field-grid .detail-field-wide { background:linear-gradient(115deg,#deedff,#f0f8fd 65%,#fff); }
.detail-field-grid .detail-field span,.detail-stats-row span { color:#315f8f; }
.detail-field-grid .detail-field strong,.detail-stats-row strong { color:#183f6c; }
.detail-stats-row > div { border-color:#c1d4e8; background:linear-gradient(145deg,#e9f3ff,#fff); box-shadow:0 4px 12px rgba(33,74,126,.07); }
.detail-stats-row > div + div { border-left-color:#c1d4e8; }
.quick-list-item { border-color:#d4e2ef; background:linear-gradient(105deg,#f2f8ff,#fff); box-shadow:0 4px 11px rgba(32,69,115,.06); }
.quick-list-item:hover { border-color:#8cb7dc; background:linear-gradient(105deg,#e5f2ff,#f7fcff); }
.profile-info-row { border-color:#c5d8eb; background:linear-gradient(105deg,#eaf3fc,#fff); box-shadow:0 4px 10px rgba(34,71,119,.05); }
.v3-attachment { border-color:#c6d9ec; background:linear-gradient(105deg,#eaf4ff,#f7fbff); }
.v3-tag { color:#165c9d; border-color:#b5cee8; background:#e1efff; }
.v3-note { border-color:#a9c7e9; background:linear-gradient(105deg,#dcecff,#eaf7fc); box-shadow:0 6px 15px rgba(36,88,150,.08); }
.v3-note > span:first-child { color:#fff; background:#2878bd; }
.v3-note strong { color:#184f86; }
.upload-dropzone { border-color:#4e94cf; background:linear-gradient(140deg,#d9edff,#e0f7f8 72%,#effbfa); box-shadow:inset 0 0 0 1px rgba(255,255,255,.75); }
.upload-dropzone:hover,.upload-dropzone.is-dragging { border-color:#167eae; background:linear-gradient(140deg,#c9e7ff,#d2f3f4); box-shadow:0 10px 22px rgba(31,119,171,.15); }
.file-limit-chip { color:#165a96; border-color:#a6c7e6; background:#d9eaff; }
.invoice-edit-guide { border-color:#78aee0; background:linear-gradient(105deg,#cee5ff,#ddf4f8); box-shadow:0 8px 18px rgba(38,102,168,.1); }
.invoice-edit-state.is-open { border-color:#5fbd90; background:linear-gradient(100deg,#c8efd9,#e1f7eb); }
.invoice-edit-state.is-locked { border-color:#b4c5d8; background:linear-gradient(100deg,#e2eaf3,#f4f7fa); }

/* Increase separation between list rows, cards and the blue-gray canvas */
.data-table tbody tr:nth-child(even) td { background:#eaf2fb; }
.data-table tbody tr:hover td { background:#d8eaff !important; }
.table-wrap { background:#fff; }
.table-toolbar { border-bottom:1px solid #bdd1e7; background:linear-gradient(100deg,#d5e8fc,#e5f4fb); }
.pagination-row { border-top-color:#a9c5e3; background:linear-gradient(100deg,#d8e9fa,#e6f4fa); }
@media (max-width:900px) {
  .data-table tbody tr { border-color:#a9c2dc; background:linear-gradient(145deg,#fff,#f5faff); box-shadow:0 9px 20px rgba(28,67,117,.12); }
  .data-table tbody tr::before { width:5px; background:linear-gradient(180deg,#2778c7,#12a4b7 56%,#38b895); }
  .data-table tbody tr td::before { color:#1d639e; }
  .data-table tbody tr:hover { border-color:#70a4d5; box-shadow:0 13px 24px rgba(31,87,148,.17); }
  .detail-field-grid .detail-field { border-color:#b4cbe3; }
}

/* V19 brand lockup: replace the cramped F3 tile with a clear invoice-and-check mark */
.brand-logo-mark {
  display:grid;
  place-items:center;
  flex:0 0 48px;
  width:48px;
  height:48px;
  padding:0;
  font-size:0;
  line-height:0;
  letter-spacing:0;
  border-radius:15px;
}
.brand-logo-mark svg { display:block; width:28px; height:28px; overflow:visible; }
.brand-logo-mark .brand-logo-check { stroke:#62e6cd; stroke-width:2.8; }
.brand-version {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  padding:2px 6px;
  margin-left:7px;
  color:#c8f9ee;
  font-size:8px;
  font-weight:850;
  letter-spacing:.08em;
  line-height:1.2;
  border:1px solid rgba(164,238,220,.35);
  border-radius:5px;
  background:rgba(89,215,187,.13);
}
.app-header .brand-logo-mark { flex-basis:46px; width:46px; height:46px; border-radius:14px; }
.app-header .brand-logo-mark svg { width:27px; height:27px; }
.app-header .brand-logo-mark .brand-logo-check { stroke:#72f0d6; }
.app-header .topbar-brand { gap:12px; }
.app-header .topbar-brand-copy { gap:5px; }
.app-header .topbar-brand-copy strong { font-size:15px; letter-spacing:-.035em; }
.app-header .topbar-brand-copy small { display:flex; align-items:center; color:rgba(228,241,255,.76); font-size:8px; font-weight:720; letter-spacing:.1em; }
.login-brand { gap:13px; }
.login-showcase .brand-logo-mark { flex-basis:49px; width:49px; height:49px; border:1px solid rgba(255,255,255,.35); border-radius:15px; background:rgba(255,255,255,.16); box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 7px 18px rgba(13,49,99,.12); }
.login-showcase .brand-logo-mark svg { width:29px; height:29px; }
.login-showcase .brand-logo-mark .brand-logo-check { stroke:#7cf0d8; }
.login-brand .topbar-brand-copy { gap:5px; }
.login-brand .topbar-brand-copy strong { color:#fff !important; font-size:15px; letter-spacing:-.035em; }
.login-brand .topbar-brand-copy small { display:flex; align-items:center; color:rgba(228,241,255,.78) !important; font-size:8px; font-weight:740; letter-spacing:.11em; }
.login-brand .brand-version { color:#98f0db; border-color:rgba(153,240,219,.34); background:rgba(128,239,214,.13); }
.login-mobile-brand { align-items:center; gap:12px; }
.login-mobile-brand .brand-logo-mark { flex-basis:42px; width:42px; height:42px; border:1px solid #d4e6f4; border-radius:13px; color:#fff; background:linear-gradient(140deg,#347dc8,#1b9bb0); box-shadow:0 7px 15px rgba(37,103,166,.2); }
.login-mobile-brand .brand-logo-mark svg { width:25px; height:25px; }
.login-mobile-brand-copy { display:grid; gap:4px; }
.login-mobile-brand-copy strong { color:#214165; font-size:14px; font-weight:820; letter-spacing:-.025em; }
.login-mobile-brand-copy small { display:flex; align-items:center; color:#7188a1; font-size:8px; font-weight:760; letter-spacing:.1em; }
.login-mobile-brand-copy .brand-version { color:#1d6c9f; border-color:#b9d8ec; background:#e4f3fb; }
@media (min-width:761px) {
  /* Giriş formu panelin TAM ORTASINDA durur (eskiden alta yaslıyordu). */
  .login-form-panel { align-items:center; }
  .login-form-wrap { display:flex; flex-direction:column; justify-content:center; min-height:0; }
  .login-form-wrap .login-heading { margin-top:0; }
  .login-form-wrap .login-privacy { margin-top:16px; }
}
@media (max-width:760px) {
  /* Mobilde form üstten başlar; alta yaslama kaldırıldı. */
  .login-form-panel { align-items:center; justify-content:center; }
  .login-form-wrap { display:flex; flex-direction:column; justify-content:center; min-height:0; }
  .login-form-wrap .login-heading { margin-top:0; }
  .login-form-wrap .login-privacy { margin-top:15px; }
  .login-mobile-brand { margin-bottom:25px; }
}

/* V20: light header, aligned chevrons, period context on the home metrics */
.app-header {
  color:#243b58;
  background:#fff;
  border-bottom:1px solid #dce5ef;
  box-shadow:0 5px 16px rgba(32,57,91,.08);
}
.app-header::before { display:none; }
.app-header .topbar { min-height:82px; background:#fff; }
.app-header .topbar-brand { color:#213b5c; }
.app-header .brand-logo-mark {
  color:#fff;
  border:1px solid #2876b8;
  background:linear-gradient(145deg,#2f81cb,#168fa9);
  box-shadow:0 6px 14px rgba(28,105,167,.2);
}
.app-header .brand-logo-mark .brand-logo-check { stroke:#a0f1df; }
.app-header .topbar-brand-copy strong { color:#213b5c; }
.app-header .topbar-brand-copy small { color:#7a8ca4; }
.app-header .topbar-brand-copy .brand-version { color:#21618f; border-color:#c7e0ef; background:#e8f4fb; }
.app-header .top-navigation-v1 { min-height:58px; background:#fff; border:0; }
.app-header .top-navigation-v1 .top-nav-home,
.app-header .top-navigation-v1 .top-nav-group > summary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:49px;
  padding:0 2px;
  color:#3e5572;
  font-size:12px;
  font-weight:680;
  line-height:1.2;
  white-space:nowrap;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.app-header .top-navigation-v1 .top-nav-home:hover,
.app-header .top-navigation-v1 .top-nav-group > summary:hover,
.app-header .top-navigation-v1 .top-nav-group[open] > summary {
  color:#1e65a5;
  border:0;
  background:transparent;
  box-shadow:none;
  transform:none;
}
.app-header .top-navigation-v1 .top-nav-home.is-active,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary {
  color:#155e9f;
  border:0;
  background:transparent;
  box-shadow:none;
}
.app-header .top-navigation-v1 .top-nav-home.is-active::after,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary::after,
.app-header .top-navigation-v1 .top-nav-group[open] > summary::after {
  right:0;
  bottom:1px;
  left:0;
  width:auto;
  height:3px;
  border-radius:3px;
  background:#2b82c6;
  box-shadow:none;
}
.app-header .top-navigation-v1 .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-home.is-active .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group.is-active > summary .top-nav-icon {
  flex:0 0 19px;
  width:19px;
  height:19px;
  color:#4f78a5;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.app-header .top-navigation-v1 .top-nav-home:hover .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group > summary:hover .top-nav-icon,
.app-header .top-navigation-v1 .top-nav-group[open] > summary .top-nav-icon,
.app-header .top-navigation-v1 .is-active .top-nav-icon { color:#1879b4; background:transparent; }
.app-header .top-navigation-v1 .top-nav-chevron {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 13px;
  width:13px;
  height:13px;
  margin-left:2px;
  color:#73859b;
  line-height:0;
  transform:none;
}
.app-header .top-nav-chevron svg { display:block; width:12px; height:12px; overflow:visible; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s ease; }
.app-header .top-nav-group[open] .top-nav-chevron { transform:none; }
.app-header .top-nav-group[open] .top-nav-chevron svg { transform:rotate(180deg); }
.app-header .top-navigation-v1 .top-nav-home:focus-visible,
.app-header .top-navigation-v1 .top-nav-group > summary:focus-visible { outline:2px solid #8ab9df; outline-offset:4px; }
.app-header .topbar-quick-create {
  color:#fff;
  border-color:#216bb3;
  background:linear-gradient(120deg,#347fc6,#2264ad);
  box-shadow:0 6px 13px rgba(35,101,168,.2);
}
.app-header .topbar-quick-create:hover { color:#fff; border-color:#1c5d9f; background:linear-gradient(120deg,#286fb7,#1e5799); }
.app-header .topbar-account { border-left-color:#e0e8f0; }
.app-header .topbar-account-link:hover { background:#f2f7fc; }
.app-header .profile-avatar { color:#246aa5; border-color:#c8dced; background:linear-gradient(145deg,#e5f2fc,#e5f8f4); }
.app-header .topbar-account-copy strong { color:#29415e; }
.app-header .topbar-account-copy small { color:#8090a4; }
.app-header .logout-button { color:#71849b; }
.app-header .logout-button:hover { color:#a34252; border-color:#efd2d8; background:#fff3f5; }
.app-header .mobile-menu-button { color:#315d87; }
.app-header .top-nav-dropdown,
.app-header .top-nav-group[open] .top-nav-dropdown { border-color:#d6e1ed; background:#fff; box-shadow:0 16px 34px rgba(27,52,85,.17); }
.app-header .top-nav-link { color:#425a76; }
.app-header .top-nav-link:hover,.app-header .top-nav-link.is-active { color:#195f9b; background:#edf5fc; }
.app-header .top-nav-link-icon { color:#397caf; }
@media (max-width:1450px) and (min-width:1321px) {
  .app-header .top-navigation-v1 .top-nav-home,.app-header .top-navigation-v1 .top-nav-group > summary { font-size:11px; }
}
@media (max-width:1320px) {
  .app-header .top-navigation-v1 { background:#fff; border-top:1px solid #e7eef5; }
  .app-header .top-navigation-v1 .top-nav-home,.app-header .top-navigation-v1 .top-nav-group > summary { justify-content:flex-start; color:#3e5572; }
  .app-header .top-navigation-v1 .top-nav-home:hover,.app-header .top-navigation-v1 .top-nav-group > summary:hover { color:#1e65a5; }
  .app-header .top-navigation-v1 .top-nav-chevron { margin-left:auto !important; }
  .app-header .top-navigation-v1 .top-nav-home.is-active::after,
  .app-header .top-navigation-v1 .top-nav-group.is-active > summary::after { right:auto; bottom:7px; left:4px; width:3px; height:31px; background:#2b82c6; }
}

.dashboard-scope-row { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:50px; padding:8px 14px; margin:0 0 12px; border:1px solid #c9d9e9; border-left:4px solid #2d7fbe; border-radius:12px; background:linear-gradient(100deg,#fff,#f3f8fc); box-shadow:0 5px 13px rgba(33,65,103,.055); }
.dashboard-scope-row > div { display:flex; align-items:center; gap:10px; }
.dashboard-scope-row .eyebrow { color:#39709f; }
.dashboard-scope-row > div > strong { color:#254969; font-size:12px; font-weight:820; }
.dashboard-month-chip { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; color:#285c86; border:1px solid #c4dceb; border-radius:9px; background:#e8f4fa; font-size:10px; }
.dashboard-month-chip .icon { color:#19849c; }
.dashboard-month-chip > span { color:#52728d; font-weight:680; }
.dashboard-month-chip > strong { color:#174f7b; font-weight:820; }
.dashboard-metrics .metric-foot { margin-top:8px; }
.dashboard-metrics .metric-change { color:rgba(255,255,255,.94); font-weight:720; }
@media (max-width:760px) {
  .dashboard-scope-row { align-items:flex-start; flex-direction:column; gap:8px; padding:10px 12px; }
  .dashboard-scope-row > div { flex-wrap:wrap; }
  .dashboard-month-chip { align-self:flex-start; }
}

/* V21: restore the reference's light gray/white surfaces with restrained blue accents */
body.app-body {
  color:#29394d;
  background:
    radial-gradient(ellipse at 6% 8%,rgba(69,128,181,.045),transparent 24%),
    radial-gradient(ellipse at 94% 14%,rgba(80,143,168,.035),transparent 23%),
    linear-gradient(145deg,#eef1f4 0%,#f5f6f8 46%,#eef1f4 100%);
}
.app-shell,.main-shell,.page-area { background:transparent; }
.page-heading:not(.dashboard-page-heading) {
  color:#29394d;
  border-color:#d8dfe6;
  background:linear-gradient(105deg,#fff 0%,#f7f8fa 63%,#f1f3f5 100%);
  box-shadow:0 8px 20px rgba(34,50,70,.07);
}
.page-heading:not(.dashboard-page-heading)::before { width:4px; background:#397db7; }
.page-heading:not(.dashboard-page-heading)::after { border-color:rgba(65,118,164,.09); box-shadow:0 0 0 24px rgba(65,118,164,.025),0 0 0 52px rgba(65,118,164,.018),0 0 0 84px rgba(65,118,164,.012); }
.page-heading:not(.dashboard-page-heading) h1 { color:#25384e; }
.page-heading:not(.dashboard-page-heading) p { color:#66768a; }
.page-heading:not(.dashboard-page-heading) .eyebrow { color:#426c91; border-color:#d8e1e9; background:#edf2f6; }
.page-heading:not(.dashboard-page-heading) .eyebrow::before { background:#3e86bd; box-shadow:0 0 0 3px rgba(62,134,189,.12); }
.page-heading:not(.dashboard-page-heading) .page-title-icon {
  color:#fff;
  border-color:#3476ae;
  background:linear-gradient(145deg,#4b8ac0,#2d6eaa);
  box-shadow:0 7px 15px rgba(42,97,147,.18);
}
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-secondary { color:#52667b; border-color:#d5dce3; background:#fff; box-shadow:0 2px 5px rgba(28,45,67,.04); }
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-secondary:hover { color:#235e91; border-color:#adc5d9; background:#f5f8fa; }
.page-heading:not(.dashboard-page-heading) .v3-page-actions .button-primary,
.page-heading:not(.dashboard-page-heading) > .button-primary { color:#fff; border-color:#2c70ad; background:linear-gradient(120deg,#4187c0,#2e6fa9); }
.dashboard-page-heading {
  color:#29394d;
  border:1px solid #d8dfe6;
  background:linear-gradient(105deg,#fff 0%,#f7f8fa 60%,#f0f3f5 100%);
  box-shadow:0 9px 22px rgba(34,50,70,.07);
}
.dashboard-page-heading::before { width:4px; background:#397db7; }
.dashboard-page-heading::after { border-color:rgba(65,118,164,.09); box-shadow:0 0 0 24px rgba(65,118,164,.025),0 0 0 52px rgba(65,118,164,.018),0 0 0 84px rgba(65,118,164,.012); }
.dashboard-page-heading .page-heading-copy .eyebrow { color:#426c91; border-color:#d8e1e9; background:#edf2f6; }
.dashboard-page-heading .page-heading-copy .eyebrow::before { background:#3e86bd; box-shadow:0 0 0 3px rgba(62,134,189,.12); }
.dashboard-page-heading h1 { color:#25384e; }
.dashboard-page-heading p { color:#66768a; }
.dashboard-page-heading .page-title-icon { color:#fff; border-color:#3476ae; background:linear-gradient(145deg,#4b8ac0,#2d6eaa); box-shadow:0 7px 15px rgba(42,97,147,.18); }
.dashboard-page-heading > .button-primary { color:#fff; border-color:#2c70ad; background:linear-gradient(120deg,#4187c0,#2e6fa9); box-shadow:0 6px 14px rgba(42,97,147,.18); }

.panel {
  --panel-accent:#4580b2;
  border-color:#d9dfe5;
  border-top-color:var(--panel-accent);
  background:#fff;
  box-shadow:0 8px 20px rgba(30,46,65,.065);
}
.list-panel,.report-panel,.entity-list-panel,.entity-create-panel,.admin-list-panel,.admin-create-panel,.action-panel,
.dashboard-trend-panel,.dashboard-flow-panel,.recent-panel,.quick-approval-panel { --panel-accent:#4580b2; }
.panel-heading {
  min-height:78px;
  border-bottom-color:#e1e6eb;
  background:linear-gradient(100deg,#f3f5f7,#f8f9fa 68%,#fff);
}
.panel-heading h2 { color:#304257; }
.panel-heading p { color:#718092; }
.panel-heading .eyebrow { color:#52718f; }
.panel-heading .section-heading-icon { color:#fff; background:linear-gradient(145deg,#4c8abd,#326eaa); box-shadow:0 5px 11px rgba(46,100,149,.16); }
.entity-list-panel .panel-heading,.entity-create-panel .panel-heading,.admin-list-panel .panel-heading,
.admin-create-panel .panel-heading,.report-panel .panel-heading,.action-panel .panel-heading,
.dashboard-flow-panel .panel-heading,.dashboard-trend-panel .panel-heading,.recent-panel .panel-heading,
.quick-approval-panel .panel-heading {
  border-bottom-color:#e1e6eb;
  background:linear-gradient(100deg,#f2f4f6,#f8f9fa 68%,#fff);
}
.entity-list-panel .panel-heading h2,.entity-create-panel .panel-heading h2,.admin-list-panel .panel-heading h2,
.admin-create-panel .panel-heading h2,.report-panel .panel-heading h2,.action-panel .panel-heading h2,
.dashboard-flow-panel .panel-heading h2,.dashboard-trend-panel .panel-heading h2,.recent-panel .panel-heading h2,
.quick-approval-panel .panel-heading h2 { color:#304257; }
.entity-list-panel .panel-heading .eyebrow,.entity-create-panel .panel-heading .eyebrow,.admin-list-panel .panel-heading .eyebrow,
.admin-create-panel .panel-heading .eyebrow,.report-panel .panel-heading .eyebrow,.action-panel .panel-heading .eyebrow,
.dashboard-flow-panel .panel-heading .eyebrow,.dashboard-trend-panel .panel-heading .eyebrow,.recent-panel .panel-heading .eyebrow,
.quick-approval-panel .panel-heading .eyebrow { color:#52718f; }
.form-panel-heading {
  color:#304257;
  border-bottom:1px solid #e1e6eb;
  background:linear-gradient(100deg,#f0f3f6,#f8f9fa 68%,#fff);
}
.form-panel-heading h2 { color:#304257; }
.form-panel-heading p { color:#718092; }
.form-panel-heading .eyebrow,.form-panel-heading .required-note { color:#52718f; }
.form-panel-heading .section-heading-icon { color:#fff; border:0; background:linear-gradient(145deg,#4c8abd,#326eaa); box-shadow:0 5px 11px rgba(46,100,149,.16); }
.form-panel-heading .file-limit-chip { color:#42678a; border-color:#d0dce6; background:#eef3f7; }
.create-panel-icon { color:#fff !important; background:linear-gradient(145deg,#4c8abd,#326eaa) !important; }

.filter-bar {
  border-top:2px solid #7aa2c4;
  border-bottom-color:#dce2e8;
  background:linear-gradient(100deg,#f1f3f5,#f7f8f9 64%,#f0f3f5);
}
.search-control,.date-filter,.tracking-cari { border-color:#d3dae1; background:#fff; }
.search-control > .icon { color:#4d80ad; }
.date-filter span { color:#657589; }
.v3-filter-details { border-color:#d4dce4; background:#fff; }
.v3-filter-details summary { color:#496783; }
.v3-filter-details summary::before { color:#4b82ae; }
.v3-filter-advanced-grid { border-top-color:#e0e5ea; background:#f7f8fa; }
.tab-row { border-bottom-color:#d8dfe5; background:#f3f5f7; }
.tab-link { color:#64758a; }
.tab-link:hover { color:#2a6495; background:#e8edf1; }
.tab-link.is-current { color:#fff; border-radius:8px; background:#3b7fb6; box-shadow:0 4px 9px rgba(45,103,153,.16); }
.report-type-tab,.entity-type-tab { color:#536a81; border-color:#d3dbe3; background:#fff; box-shadow:0 2px 5px rgba(30,48,68,.035); }
.report-type-tab.is-active,.entity-type-tab.is-active { color:#fff; border-color:#3979ae; background:#3b7fb6; box-shadow:0 4px 10px rgba(45,103,153,.16); }

.data-table thead { background:#eef1f4 !important; }
.data-table th { color:#596a7d !important; background:#eef1f4 !important; border-top:1px solid #e1e5e9; border-bottom:1px solid #d8dfe5; }
.data-table tbody tr:nth-child(even) td { background:#f6f7f8; }
.data-table tbody tr:hover td { background:#edf3f7 !important; }
.data-table tbody td { color:#45586e; border-bottom-color:#e6eaee; }
.table-toolbar { color:#53677e; border-bottom-color:#dfe4e9; background:#f0f3f5; }
.table-toolbar strong { color:#315f89; }
.pagination-row { border-top-color:#dce2e8; background:#f2f4f6; }
.page-number { color:#536b84; border-color:#d3dbe3; background:#fff; }
.page-number.is-current { color:#fff; border-color:#3a78ad; background:#3b7fb6; box-shadow:0 4px 9px rgba(45,103,153,.16); }

.detail-field-grid .detail-field,.detail-field-grid .detail-field-wide,.detail-stats-row > div,
.quick-list-item,.profile-info-row,.v3-attachment {
  border-color:#e0e5e9;
  background:#fff;
  box-shadow:0 3px 9px rgba(29,46,64,.035);
}
.detail-field-grid .detail-field span,.detail-stats-row span { color:#738196; }
.detail-field-grid .detail-field strong,.detail-stats-row strong { color:#33475e; }
.v3-note { border-color:#d7e0e8; background:#f3f6f8; box-shadow:none; }
.v3-note > span:first-child { color:#fff; background:#4a81ad; }
.upload-dropzone { border-color:#9bb5ca; background:linear-gradient(140deg,#f2f5f7,#f8fafb); box-shadow:none; }
.upload-dropzone:hover,.upload-dropzone.is-dragging { border-color:#5489b2; background:#eaf1f6; box-shadow:0 7px 15px rgba(38,86,126,.08); }
.file-limit-chip,.v3-tag { color:#4a6884; border-color:#d4dfe8; background:#f0f4f7; }
.invoice-edit-guide { border-color:#c7d6e2; background:#f0f4f7; box-shadow:none; }
.invoice-edit-guide-icon { color:#fff; background:#4a81ad; }
.invoice-edit-state.is-open { border-color:#b8d9c8; background:#f0f7f3; }
.invoice-edit-state.is-locked { border-color:#d5dce3; background:#f4f6f8; }

.dashboard-scope-row { border-color:#dce2e8; border-left-color:#4b82ae; background:linear-gradient(100deg,#fff,#f4f6f8); box-shadow:0 4px 11px rgba(30,48,68,.04); }
.dashboard-month-chip { color:#42617c; border-color:#d5dfe7; background:#eff3f6; }
.dashboard-month-chip .icon { color:#3e80af; }
.dashboard-month-chip > strong { color:#315b80; }
@media (max-width:900px) {
  .data-table tbody tr { border-color:#d4dce3; background:#fff; box-shadow:0 6px 14px rgba(29,48,70,.065); }
  .data-table tbody tr::before { width:4px; background:#4a83b3; }
  .data-table tbody tr td::before { color:#577694; }
  .data-table tbody tr:hover { border-color:#9cb6cb; box-shadow:0 9px 17px rgba(30,70,108,.1); }
}
.dashboard-grid .recent-panel .panel-heading,.dashboard-grid .quick-approval-panel .panel-heading { background:linear-gradient(100deg,#f2f4f6,#f8f9fa 68%,#fff); border-bottom-color:#e1e6eb; }
.dashboard-grid .recent-panel .panel-heading h2,.dashboard-grid .quick-approval-panel .panel-heading h2 { color:#304257; }
.dashboard-grid .recent-panel .panel-heading .eyebrow,.dashboard-grid .quick-approval-panel .panel-heading .eyebrow { color:#52718f; }

/* V22: calm down table/list pages — light gray surfaces, blue reserved for actions and key accents */
.page-heading:not(.dashboard-page-heading) {
  color:#2f3f50;
  border-color:#e0e4e7;
  background:linear-gradient(105deg,#fff 0%,#fff 62%,#f7f8f9 100%);
  box-shadow:0 6px 16px rgba(31,45,59,.05);
}
.page-heading:not(.dashboard-page-heading)::before { width:3px; background:#8ba8bd; }
.page-heading:not(.dashboard-page-heading)::after { border-color:rgba(82,110,132,.045); box-shadow:0 0 0 22px rgba(82,110,132,.014),0 0 0 48px rgba(82,110,132,.01); }
.page-heading:not(.dashboard-page-heading) h1 { color:#2b3b4d; }
.page-heading:not(.dashboard-page-heading) p { color:#6d7986; }
.page-heading:not(.dashboard-page-heading) .eyebrow { color:#5d7182; border-color:#e1e6ea; background:#f4f6f7; }
.page-heading:not(.dashboard-page-heading) .eyebrow::before { background:#5f91b4; box-shadow:0 0 0 3px rgba(95,145,180,.10); }
.page-heading:not(.dashboard-page-heading) .page-title-icon {
  color:#39769d;
  border-color:#dce6ec;
  background:#edf3f6;
  box-shadow:none;
}
.list-panel,.entity-list-panel,.admin-list-panel,.report-panel { --panel-accent:#a9bbc8; border-color:#e0e4e7; box-shadow:0 6px 16px rgba(31,45,59,.045); }
.panel-heading { border-bottom-color:#e3e6e9; background:linear-gradient(100deg,#f5f6f7,#fafbfb 70%,#fff); }
.panel-heading h2 { color:#344454; }
.panel-heading p { color:#74808a; }
.panel-heading .eyebrow { color:#657786; }
.panel-heading .section-heading-icon { color:#3d789d; border:1px solid #dce6ec; background:#edf3f6; box-shadow:none; }
.entity-list-panel .panel-heading,.entity-create-panel .panel-heading,.admin-list-panel .panel-heading,
.admin-create-panel .panel-heading,.report-panel .panel-heading,.action-panel .panel-heading,
.dashboard-flow-panel .panel-heading,.dashboard-trend-panel .panel-heading,.recent-panel .panel-heading,
.quick-approval-panel .panel-heading { border-bottom-color:#e3e6e9; background:linear-gradient(100deg,#f5f6f7,#fafbfb 70%,#fff); }
.entity-list-panel .panel-heading h2,.entity-create-panel .panel-heading h2,.admin-list-panel .panel-heading h2,
.admin-create-panel .panel-heading h2,.report-panel .panel-heading h2,.action-panel .panel-heading h2,
.dashboard-flow-panel .panel-heading h2,.dashboard-trend-panel .panel-heading h2,.recent-panel .panel-heading h2,
.quick-approval-panel .panel-heading h2 { color:#344454; }
.entity-list-panel .panel-heading .eyebrow,.entity-create-panel .panel-heading .eyebrow,.admin-list-panel .panel-heading .eyebrow,
.admin-create-panel .panel-heading .eyebrow,.report-panel .panel-heading .eyebrow,.action-panel .panel-heading .eyebrow,
.dashboard-flow-panel .panel-heading .eyebrow,.dashboard-trend-panel .panel-heading .eyebrow,.recent-panel .panel-heading .eyebrow,
.quick-approval-panel .panel-heading .eyebrow { color:#657786; }
.filter-bar { border-top:1px solid #e2e6e9; border-bottom-color:#e0e4e7; background:linear-gradient(100deg,#f7f8f9,#fbfbfc 70%,#f5f6f7); }
.search-control,.date-filter,.tracking-cari { border-color:#dce1e5; background:#fff; }
.search-control > .icon { color:#5b86a5; }
.v3-filter-details { border-color:#dfe4e7; background:#fff; }
.v3-filter-details summary { color:#596c7c; }
.v3-filter-details summary::before { color:#5a86a4; }
.v3-filter-advanced-grid { border-top-color:#e5e8eb; background:#f8f9fa; }
.tab-row { border-bottom-color:#e0e4e7; background:#f6f7f8; }
.tab-link { color:#677582; }
.tab-link:hover { color:#315f7f; background:#eef2f4; }
.tab-link.is-current { color:#2e6386; border-radius:8px; background:#e8f0f5; box-shadow:none; }
.tab-link.is-current::after { display:none; }
.report-type-tab,.entity-type-tab { color:#5c6d7c; border-color:#dfe3e6; background:#fff; box-shadow:0 1px 3px rgba(31,45,59,.025); }
.report-type-tab:hover,.entity-type-tab:hover { color:#315f7f; border-color:#cad7df; background:#f4f7f8; }
.report-type-tab.is-active,.entity-type-tab.is-active { color:#2f6689; border-color:#cbdbe5; background:#eaf2f6; box-shadow:none; }
.data-table thead { background:#f1f3f4 !important; }
.data-table th { color:#596775 !important; background:#f1f3f4 !important; border-top:1px solid #e5e8ea; border-bottom:1px solid #dfe3e6; }
.data-table tbody tr:nth-child(even) td { background:#fafbfb; }
.data-table tbody tr:hover td { background:#f1f4f5 !important; }
.data-table tbody td { color:#4d5d6d; border-bottom-color:#eceef0; }
.table-primary-link { color:#356f95; }
.table-primary-link:hover { color:#255572; }
.table-toolbar { color:#687581; border-bottom-color:#e5e8ea; background:#f7f8f9; }
.table-toolbar strong { color:#455d70; }
.pagination-row { border-top-color:#e3e6e8; background:#f7f8f9; }
.page-number { color:#5b6d7c; border-color:#dce1e5; background:#fff; }
.page-number:hover { color:#315f7f; border-color:#c6d6e0; background:#f0f4f6; }
.page-number.is-current { color:#2f6385; border-color:#c5d7e2; background:#e8f0f5; box-shadow:none; }
.invoice-edit-guide { border-color:#dfe5e8; background:#f7f9fa; box-shadow:none; }
.invoice-edit-guide-icon { color:#39769d; background:#eaf1f5; }
.invoice-edit-guide-copy strong { color:#465b6b; }
.bulk-approval-bar { color:#667581; border-bottom-color:#e5e8ea; background:#f7f8f9; }
.tracking-context { border-bottom-color:#e3e7e9; background:linear-gradient(100deg,#f6f7f8,#fbfbfb); }
.tracking-context-mark { color:#426f8d; border:1px solid #dce5ea; background:#edf3f6; box-shadow:none; }
.note-strip { color:#697784; border-color:#e1e5e8; background:#f8f9fa; }
.note-strip-icon { color:#467392; background:#eaf1f5; }
@media (max-width:900px) {
  .data-table tbody tr { border-color:#dfe4e7; background:#fff; box-shadow:0 5px 12px rgba(31,45,59,.045); }
  .data-table tbody tr::before { background:#a0b8c6; }
  .data-table tbody tr td::before { color:#657988; }
  .data-table tbody tr:hover { border-color:#c4d2da; box-shadow:0 7px 14px rgba(31,58,77,.065); }
}


/* V23: inline form labels with responsive controls, plus safe rich invoice notes */
.form-grid > .form-field,
.stacked-form .form-field {
  display:grid;
  grid-template-columns:minmax(138px,31%) minmax(0,1fr);
  align-items:center;
  column-gap:16px;
  row-gap:7px;
}
.form-grid > .form-field > :first-child,
.stacked-form .form-field > :first-child {
  grid-column:1;
  grid-row:1;
  align-self:center;
}
.form-grid > .form-field > :not(:first-child),
.stacked-form .form-field > :not(:first-child) { grid-column:2; }
.form-grid > .form-field > small,
.stacked-form .form-field > small { grid-row:2; margin-top:-1px; }
.form-grid > .form-field input,
.form-grid > .form-field select,
.form-grid > .form-field textarea,
.form-grid > .form-field .input-suffix,
.stacked-form .form-field input,
.stacked-form .form-field select,
.stacked-form .form-field textarea,
.stacked-form .form-field .input-suffix { min-width:0; }
.form-grid > .form-field:has(textarea) > :first-child,
.stacked-form .form-field:has(textarea) > :first-child { align-self:start; padding-top:12px; }
.detail-rich-text {
  min-width:0;
  max-width:100%;
  overflow-x:auto;
  overflow-wrap:anywhere;
  color:#33475e;
  font-size:12px;
  font-weight:520;
  line-height:1.7;
}
.detail-rich-text p { margin:0 0 9px; }
.detail-rich-text p:last-child { margin-bottom:0; }
.detail-rich-text ul,.detail-rich-text ol { margin:0 0 9px; padding-left:22px; }
.detail-rich-text table { width:100%; border-collapse:collapse; color:inherit; font-size:11px; }
.detail-rich-text th,.detail-rich-text td { padding:7px 9px; border:1px solid #dfe5e9; text-align:left; vertical-align:top; }
.detail-rich-text th { background:#f3f5f6; font-weight:750; }
.detail-rich-text a { color:#356f95; text-decoration:underline; text-underline-offset:2px; }
@media (max-width:760px) {
  .form-grid > .form-field,
  .stacked-form .form-field { grid-template-columns:minmax(112px,32%) minmax(0,1fr); column-gap:12px; }
}
@media (max-width:480px) {
  .form-grid > .form-field,
  .stacked-form .form-field { grid-template-columns:minmax(96px,33%) minmax(0,1fr); column-gap:9px; row-gap:6px; font-size:11px; }
  .form-grid > .form-field input,
  .form-grid > .form-field select,
  .form-grid > .form-field textarea,
  .stacked-form .form-field input,
  .stacked-form .form-field select,
  .stacked-form .form-field textarea { padding-right:9px; padding-left:9px; font-size:11px; }
  .form-grid > .form-field:has(textarea) > :first-child,
  .stacked-form .form-field:has(textarea) > :first-child { padding-top:10px; }
}

/* V24: keep full-width textarea controls aligned with the standard form control column */
.form-grid > .form-field { grid-template-columns:220px minmax(0,1fr); }
.stacked-form .form-field { grid-template-columns:minmax(120px,38%) minmax(0,1fr); }
@media (max-width:1100px) {
  .form-grid > .form-field { grid-template-columns:190px minmax(0,1fr); }
}
@media (max-width:760px) {
  .form-grid > .form-field,
  .stacked-form .form-field { grid-template-columns:minmax(118px,32%) minmax(0,1fr); }
}
@media (max-width:480px) {
  .form-grid > .form-field,
  .stacked-form .form-field { grid-template-columns:minmax(98px,33%) minmax(0,1fr); }
}


/* Table actions: fixed, icon-only controls with consistent spacing */
.button { gap:8px; }
.button > .icon, .button > svg { display:block; flex:0 0 auto; margin:0; vertical-align:middle; }
.table-icon-actions {
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:6px;
  white-space:nowrap;
  vertical-align:middle;
}
.entity-actions .table-icon-actions { width:100%; }
.table-icon-actions > form { display:inline-flex; align-items:center; margin:0; }
.button.table-icon-action,
.table-icon-action {
  display:inline-grid;
  place-items:center;
  flex:0 0 34px;
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  padding:0;
  gap:0;
  line-height:1;
  border-radius:9px;
}
.button.table-icon-action > .icon,
.table-icon-action > .icon,
.table-icon-action > svg {
  display:block;
  width:15px;
  height:15px;
  flex:0 0 auto;
  margin:0;
}
.invoice-inline-update.table-icon-action,
.invoice-inline-lock.table-icon-action {
  display:inline-grid;
  min-width:34px;
  min-height:34px;
  width:34px;
  height:34px;
  padding:0;
  gap:0;
}
.table-icon-action:focus-visible { outline:3px solid rgba(52,123,210,.28); outline-offset:2px; }
.table-icon-action[disabled] { opacity:.5; cursor:not-allowed; }
@media(max-width:760px) {
  .data-table td .table-icon-actions { justify-content:flex-start; flex-wrap:nowrap; gap:6px; }
  .data-table td.entity-actions .table-icon-actions { justify-content:flex-start; }
}
.v3-filter-advanced-grid .form-field {
  display:grid;
  grid-template-columns:minmax(105px,40%) minmax(0,1fr);
  align-items:center;
  column-gap:10px;
  row-gap:6px;
}
.v3-filter-advanced-grid .form-field > span { grid-column:1; grid-row:1; }
.v3-filter-advanced-grid .form-field > :not(span) { grid-column:2; min-width:0; }
.v3-filter-advanced-grid .form-field > small { grid-row:2; }

/* Shared two-column foundations; page-specific rules refine forms, actions, and filters. */
.entity-layout.has-side-panel,
.admin-grid,
.profile-settings-grid,
.detail-layout,
.invoice-list-layout,
.report-list-layout {
  grid-template-columns:minmax(290px,.72fr) minmax(0,1.48fr);
  align-items:start;
}
.entity-layout:not(.has-side-panel) { grid-template-columns:minmax(0,1fr); }
.entity-layout.has-side-panel > .entity-create-panel,
.entity-layout.has-side-panel > .entity-filter-panel,
.admin-grid > .admin-create-panel,
.profile-settings-grid > .profile-password-panel,
.detail-layout > .detail-side-column,
.invoice-list-layout > .invoice-filter-column,
.report-list-layout > .report-filter-column { grid-column:1; grid-row:1; }
.entity-layout.has-side-panel > .entity-list-panel,
.admin-grid > .admin-list-panel,
.profile-settings-grid > .profile-card,
.detail-layout > .detail-main-column,
.invoice-list-layout > .invoice-results-column,
.report-list-layout > .report-results-column { grid-column:2; grid-row:1; }
.entity-layout.has-side-panel > .entity-create-panel,
.entity-layout.has-side-panel > .entity-filter-panel,
.admin-grid > .admin-create-panel,
.admin-grid > .admin-list-panel,
.profile-settings-grid > .profile-password-panel,
.profile-settings-grid > .profile-card,
.detail-layout > .detail-side-column,
.detail-layout > .detail-main-column,
.invoice-list-layout > .invoice-filter-column,
.invoice-list-layout > .invoice-results-column,
.report-list-layout > .report-filter-column,
.report-list-layout > .report-results-column { min-width:0; }

.invoice-list-layout,
.report-list-layout { display:grid; gap:18px; padding:18px; }
.invoice-filter-column,
.report-filter-column { min-width:0; }
.invoice-filter-heading,
.report-filter-heading { padding:16px 17px 14px; }
.invoice-filter-form.filter-bar,
.report-filter-form.filter-bar {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
  gap:11px;
  padding:15px;
  border:1px solid #e0e4e7;
  border-radius:13px;
  background:#f8f9fa;
}
.invoice-filter-form > *,
.report-filter-form > * { width:100%; min-width:0; }
.invoice-filter-form .search-control,
.report-filter-form .search-control { flex:initial; min-width:0; }
.invoice-filter-form .date-filter,
.report-filter-form .date-filter {
  display:grid;
  grid-template-columns:minmax(78px,.68fr) minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-width:0;
}
.invoice-filter-form .date-filter input,
.report-filter-form .date-filter input,
.invoice-filter-form select,
.report-filter-form select { min-width:0; width:100%; max-width:none !important; }
.invoice-filter-form .date-dash,
.report-filter-form .date-dash { display:none; }
.invoice-filter-form .v3-filter-details,
.report-filter-form .v3-filter-details { width:100%; min-width:0; }
.invoice-filter-form .v3-filter-advanced-grid,
.report-filter-form .v3-filter-advanced-grid { grid-template-columns:minmax(0,1fr); }
.invoice-filter-form .filter-icon-submit,
.report-filter-form .filter-icon-submit { justify-self:end; }
  .invoice-results-column,
.report-results-column { display:grid; align-content:start; gap:14px; min-width:0; }
.detail-side-column { grid-template-columns:minmax(0,1fr); }
.entity-layout.has-side-panel .stacked-form,
.admin-grid .stacked-form,
.profile-settings-grid .stacked-form,
.detail-side-column .stacked-form { grid-template-columns:minmax(0,1fr); }
.invoice-results-column .report-metrics,
.report-results-column .report-metrics { margin-top:0 !important; }
.permission-roles-summary { margin-top:18px; padding-top:17px; border-top:1px solid #e7ebef; }
.permission-roles-summary > .permission-roles-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:0 0 13px; }
.permission-roles-heading > div { min-width:0; }
.permission-roles-heading h2 { margin:6px 0 5px; color:#344454; font-size:17px; font-weight:740; letter-spacing:-.035em; }
.permission-roles-heading p { margin:0; color:#74808a; font-size:11px; line-height:1.55; }
.permission-roles-heading .eyebrow { color:#657786; }
.filter-icon-submit {
  display:inline-grid;
  place-items:center;
  flex:0 0 36px;
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  gap:0;
  border-radius:9px;
}
.filter-icon-submit > .icon,
.filter-icon-submit > svg { display:block; width:15px; height:15px; margin:0; }
.button.button-icon-only {
  display:inline-grid;
  place-items:center;
  flex:0 0 42px;
  width:42px;
  min-width:42px;
  height:42px;
  min-height:42px;
  padding:0;
  gap:0;
  border-radius:10px;
  line-height:1;
}
.button.button-icon-only > .icon,
.button.button-icon-only > svg { display:block; width:16px; height:16px; margin:0; }
@media(max-width:640px) {
  .entity-layout.has-side-panel,
  .entity-layout:not(.has-side-panel),
  .admin-grid,
  .profile-settings-grid,
  .detail-layout,
  .invoice-list-layout,
  .report-list-layout { grid-template-columns:minmax(0,1fr); }
  .entity-layout.has-side-panel > .entity-create-panel,
  .entity-layout.has-side-panel > .entity-filter-panel,
  .entity-layout.has-side-panel > .entity-list-panel,
  .admin-grid > .admin-create-panel,
  .admin-grid > .admin-list-panel,
  .profile-settings-grid > .profile-password-panel,
  .profile-settings-grid > .profile-card,
  .detail-layout > .detail-side-column,
  .detail-layout > .detail-main-column,
  .invoice-list-layout > .invoice-filter-column,
  .invoice-list-layout > .invoice-results-column,
  .report-list-layout > .report-filter-column,
  .report-list-layout > .report-results-column { grid-column:auto; grid-row:auto; }
  .entity-create-panel,
  .entity-filter-panel,
  .admin-create-panel,
  .profile-password-panel,
  .detail-side-column,
  .invoice-filter-column,
  .report-filter-column { order:-1; }
}
@media(max-width:760px) {
  .invoice-list-layout,
  .report-list-layout { gap:14px; padding:13px; }
  .detail-side-column { grid-template-columns:minmax(0,1fr); }
  .invoice-filter-form .date-filter,
  .report-filter-form .date-filter { grid-template-columns:minmax(78px,.55fr) minmax(0,1fr); }
  .invoice-filter-form.filter-bar,
  .report-filter-form.filter-bar { padding:12px; }
}

/* Invoice entry: detailed fields left, supporting documents on the right. */
.form-layout {
  grid-template-columns:minmax(0,1.48fr) minmax(280px,.72fr);
  align-items:start;
}
.form-layout > .form-panel { grid-column:1; grid-row:1; min-width:0; }
.form-layout > .attachment-panel { grid-column:2; grid-row:1; min-width:0; }
.form-layout > .form-actions { grid-column:1 / -1; grid-row:2; }
@media(max-width:640px) {
  .form-layout { grid-template-columns:minmax(0,1fr); }
  .form-layout > .form-panel,
  .form-layout > .attachment-panel,
  .form-layout > .form-actions { grid-column:auto; grid-row:auto; }
}

/* Entity pages (all six types share this Blade view): form left, table right. */
.entity-layout.has-side-panel {
  display:grid;
  grid-template-columns:minmax(300px,.72fr) minmax(0,1.48fr);
  grid-template-areas:"entity-form entity-list";
  align-items:start;
}
.entity-layout.has-side-panel > .entity-form-side { grid-area:entity-form; min-width:0; }
.entity-layout.has-side-panel > .entity-list-panel { grid-area:entity-list; min-width:0; }
@media(max-width:640px) {
  .entity-layout.has-side-panel {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"entity-form" "entity-list";
  }
}

/* Search/filter controls stay above their results; only entry forms occupy the left column. */
.invoice-list-layout,
.report-list-layout { grid-template-columns:minmax(0,1fr); gap:0; padding:0; }
.invoice-list-layout > .invoice-filter-column,
.invoice-list-layout > .invoice-results-column,
.report-list-layout > .report-filter-column,
.report-list-layout > .report-results-column { grid-column:1; grid-row:auto; min-width:0; }
.invoice-list-layout > .invoice-filter-column,
.report-list-layout > .report-filter-column { order:0; }
.invoice-list-layout > .invoice-results-column,
.report-list-layout > .report-results-column { order:1; }
.invoice-filter-form.filter-bar,
.report-filter-form.filter-bar {
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:flex-start;
  gap:12px;
  padding:17px 22px;
  border:0;
  border-top:1px solid #e6eaee;
  border-bottom:1px solid #e0e4e7;
  border-radius:0;
  background:linear-gradient(100deg,#f7f8f9,#fbfbfc 70%,#f5f6f7);
}
.invoice-filter-form > *,
.report-filter-form > * { width:auto; min-width:0; }
.invoice-filter-form .search-control,
.report-filter-form .search-control { flex:1 1 240px; width:auto; min-width:200px; }
.invoice-filter-form .date-filter,
.report-filter-form .date-filter {
  display:flex;
  flex:0 1 165px;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  min-width:140px;
}
.invoice-filter-form .date-filter input,
.report-filter-form .date-filter input { width:100%; min-width:0; }
.invoice-filter-form .date-dash,
.report-filter-form .date-dash { display:inline-block; width:auto; align-self:center; }
.invoice-filter-form select,
.report-filter-form select { flex:0 1 auto; width:auto; max-width:220px !important; }
.invoice-filter-form .v3-filter-details,
.report-filter-form .v3-filter-details { flex:1 0 100%; width:100%; min-width:0; }
.invoice-filter-form .v3-filter-advanced-grid,
.report-filter-form .v3-filter-advanced-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.invoice-filter-form .filter-icon-submit,
.report-filter-form .filter-icon-submit { margin-left:auto; }
.invoice-results-column,
.report-results-column { gap:14px; }
.detail-layout { grid-template-columns:minmax(0,1.55fr) minmax(290px,.82fr); }
.detail-layout > .detail-main-column { grid-column:1; grid-row:1; }
.detail-layout > .detail-side-column { grid-column:2; grid-row:1; }

/* Top bar has a contained brand/account row; navigation is a distinct row below. */
.app-header { position:sticky; top:0; z-index:100; display:flex; flex-direction:column; background:rgba(255,255,255,.985); }
.topbar-container { width:100%; border-bottom:1px solid #e4e9f1; background:#fff; }
.topbar-container > .topbar {
  width:min(100%,1600px);
  min-height:76px;
  margin:0 auto;
  padding:0 clamp(20px,4vw,58px);
  box-sizing:border-box;
  border:0;
}
.top-navigation-container { width:100%; border-bottom:1px solid #e4e9f1; background:linear-gradient(90deg,#f8faff,#fff 34%,#fff 72%,#f4fbf8); }
.top-navigation-container > .top-navigation-v1 {
  width:min(100%,1600px);
  min-height:54px;
  margin:0 auto;
  padding:7px clamp(20px,4vw,58px);
  border:0;
  background:transparent;
  justify-content:flex-start;
}
@media(max-width:1100px) {
  .topbar-container > .topbar,
  .top-navigation-container > .top-navigation-v1 { padding-right:24px; padding-left:24px; }
}
@media(max-width:760px) {
  .topbar-container > .topbar { min-height:61px; padding-right:14px; padding-left:14px; }
  .top-navigation-container { border:0; background:transparent; }
  .top-navigation-container > .top-navigation-v1 { width:100%; min-height:0; padding:0; border:0; background:transparent; }
  body.app-body.nav-open .top-navigation-container { border-top:1px solid #e7ebf1; border-bottom:1px solid #e1e7ee; background:#fff; }
}
@media(max-width:640px) {
  .invoice-filter-form.filter-bar,
  .report-filter-form.filter-bar { padding:14px; gap:9px; }
  .invoice-filter-form .search-control,
  .report-filter-form .search-control { flex-basis:100%; }
  .invoice-filter-form .v3-filter-advanced-grid,
  .report-filter-form .v3-filter-advanced-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .detail-layout { grid-template-columns:minmax(0,1fr); }
  .detail-layout > .detail-main-column { grid-column:auto; grid-row:auto; }
  .detail-layout > .detail-side-column { grid-column:auto; grid-row:auto; order:1; }
}
@media(max-width:430px) {
  .invoice-filter-form .v3-filter-advanced-grid,
  .report-filter-form .v3-filter-advanced-grid { grid-template-columns:minmax(0,1fr); }
}

/* Dashboard: keep the recent-invoice grid item and table inside their own column. */
.dashboard-grid > .recent-panel,
.dashboard-grid > .quick-approval-panel { min-width:0; max-width:100%; }
.dashboard-grid .recent-panel .table-wrap { width:100%; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.dashboard-grid .recent-panel .dashboard-recent-table {
  display:table;
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.dashboard-grid .recent-panel .dashboard-recent-table th,
.dashboard-grid .recent-panel .dashboard-recent-table td { padding-right:7px; padding-left:7px; font-size:10px; }
.dashboard-grid .recent-panel .dashboard-recent-table th:first-child,
.dashboard-grid .recent-panel .dashboard-recent-table td:first-child { padding-left:12px; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(1),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(1) { width:17%; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(2),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(2) { width:28%; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(3),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(3) { width:18%; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(4),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(4) { width:15%; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(5),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(5) { width:16%; }
.dashboard-grid .recent-panel .dashboard-recent-table th:nth-child(6),
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(6) { width:6%; text-align:right; }
.dashboard-grid .recent-panel .dashboard-recent-table th { white-space:normal; letter-spacing:.045em; line-height:1.2; }
.dashboard-grid .recent-panel .dashboard-recent-table td { overflow-wrap:anywhere; }
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(1) .table-primary-link { font-size:10px; overflow-wrap:anywhere; word-break:break-word; }
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(3) { font-size:9px; }
.dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(4) { font-size:9px; white-space:nowrap; }
.dashboard-grid .recent-panel .dashboard-recent-table .status-badge { max-width:100%; padding:5px 7px; font-size:9px; line-height:1.25; white-space:normal; }
.dashboard-grid .recent-panel .dashboard-recent-table .status-badge i { flex:0 0 7px; }
.dashboard-grid .recent-panel .dashboard-recent-table .row-action { width:28px; height:28px; }

/* Invoice list: distinct filter and results cards; advanced filters form a separate row. */
.invoice-list-layout { gap:15px; }
.invoice-list-layout > .invoice-filter-column,
.invoice-list-layout > .invoice-results-column { width:100%; min-width:0; }
.invoice-filter-column { overflow:hidden; }
.invoice-results-column { display:block; gap:0; overflow:hidden; }
.invoice-filter-form.filter-bar {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  padding:16px 20px 20px;
  border:0;
  border-radius:0;
  background:transparent;
}
.invoice-primary-filter-row {
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:10px;
  min-width:0;
  padding:13px;
  border:1px solid #e0e5e9;
  border-radius:12px;
  background:#fff;
}
.invoice-filter-form .search-control { flex:1 1 250px; min-width:220px; }
.invoice-filter-form .date-filter { flex:0 1 165px; min-width:145px; }
.invoice-filter-form .tracking-cari { flex:0 1 190px; min-width:160px; }
.invoice-primary-filter-row .filter-submit { margin-left:auto; }
.invoice-primary-filter-row .clear-filter { margin-left:0; }
.invoice-filter-form .v3-filter-details { display:block; width:100%; margin:0; overflow:hidden; border-radius:12px; }
.invoice-filter-form .v3-filter-details summary { min-height:48px; padding:13px 15px; }
.invoice-filter-form .v3-filter-advanced-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.invoice-edit-guide { margin:16px 0 0; }
@media(max-width:900px) {
  .dashboard-grid .recent-panel .dashboard-recent-table { display:block; width:100%; min-width:0; }
  .dashboard-grid .recent-panel .dashboard-recent-table tbody tr td:nth-child(5) { white-space:normal; }
}
@media(max-width:760px) {
  .invoice-list-layout { gap:12px; }
  .invoice-filter-form.filter-bar { padding:14px; gap:10px; }
  .invoice-primary-filter-row { padding:11px; gap:8px; }
  .invoice-primary-filter-row .search-control { flex-basis:100%; }
  .invoice-primary-filter-row .date-filter { flex:1 1 42%; min-width:130px; }
  .invoice-filter-form .v3-filter-advanced-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:430px) {
  .invoice-filter-form .v3-filter-advanced-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:900px) {
  .dashboard-grid .recent-panel .dashboard-recent-table td:nth-child(n) { width:auto; max-width:100%; text-align:left; }
}

@media(max-width:1280px) {
  .dashboard-grid { grid-template-columns:minmax(0,1fr); }
}

/* Legacy dashboard view fallback: a stale seven-column table must still stay in its card. */
.dashboard-grid .recent-panel .table-wrap { overflow-x:hidden; overflow-y:hidden; }
@media(min-width:901px) {
  .dashboard-grid .recent-panel .invoice-table {
    display:table;
    width:100%;
    min-width:0;
    table-layout:fixed;
  }
  .dashboard-grid .recent-panel .invoice-table th,
  .dashboard-grid .recent-panel .invoice-table td { padding-right:7px; padding-left:7px; font-size:10px; }
  .dashboard-grid .recent-panel .invoice-table th:first-child,
  .dashboard-grid .recent-panel .invoice-table td:first-child { padding-left:12px; }
  .dashboard-grid .recent-panel .invoice-table th { white-space:normal; letter-spacing:.04em; line-height:1.2; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(1),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(1) { width:16%; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(2),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(2) { width:22%; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(3),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(3) { width:12%; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(4),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(4) { width:11%; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(5),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(5) { width:13%; white-space:normal; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(6),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(6) { width:19%; }
  .dashboard-grid .recent-panel .invoice-table th:nth-child(7),
  .dashboard-grid .recent-panel .invoice-table td:nth-child(7) { width:7%; text-align:right; }
  .dashboard-grid .recent-panel .invoice-table td { overflow-wrap:anywhere; }
  .dashboard-grid .recent-panel .invoice-table td:nth-child(1) .table-primary-link { font-size:10px; overflow-wrap:anywhere; word-break:break-word; }
  .dashboard-grid .recent-panel .invoice-table .status-badge { max-width:100%; padding:5px 7px; font-size:9px; line-height:1.25; white-space:normal; }
  .dashboard-grid .recent-panel .invoice-table .row-action { width:28px; height:28px; }
}


/* Invoice filters: explicit labels above every primary and advanced control. */
.invoice-primary-filter-row { align-items:end; }
.invoice-primary-field {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  flex:1 1 155px;
  min-width:0;
  color:#526477;
  font-size:10px;
  font-weight:700;
}
.invoice-primary-field > span:first-child { color:#526477; line-height:1.25; }
.invoice-primary-field input,
.invoice-primary-field select {
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:42px;
  padding:0 10px;
  color:#3f546a;
  font-size:11px;
  font-weight:500;
  border:1px solid #d5dee5;
  border-radius:10px;
  background:#fff;
}
.invoice-primary-field input[type="date"] { padding-right:6px; font-size:10px; }
.invoice-primary-field input:focus,
.invoice-primary-field select:focus { outline:2px solid rgba(52,123,210,.17); border-color:#6d9eca; }
.invoice-search-field { flex:1.5 1 250px; }
.invoice-primary-row .search-control,
.invoice-primary-filter-row .invoice-search-field .search-control {
  display:flex;
  align-items:center;
  flex:initial;
  width:100%;
  min-width:0;
  min-height:42px;
  padding:0 10px;
}
.invoice-search-field .search-control input { min-width:0; width:100%; }
.invoice-date-range {
  display:grid;
  grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr);
  align-items:end;
  gap:7px;
  flex:1.35 1 340px;
  min-width:310px;
}
.invoice-date-range .invoice-primary-field { min-width:0; }
.invoice-date-range .invoice-date-separator { align-self:end; padding-bottom:13px; color:#8b98a4; text-align:center; }
.invoice-select-field { flex:1 1 155px; }
.invoice-primary-filter-row .invoice-filter-actions { display:flex; align-items:flex-end; gap:7px; flex:0 0 auto; margin-left:auto; }
.invoice-primary-filter-row .filter-submit,
.invoice-primary-filter-row .clear-filter { margin-left:0; }
.invoice-filter-form .v3-filter-advanced-grid .form-field {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  min-width:0;
}
.invoice-filter-form .v3-filter-advanced-grid .form-field > span { padding:0; }
.invoice-filter-form .v3-filter-advanced-grid .form-field > :not(span) { width:100%; min-width:0; }
.invoice-filter-form .v3-filter-advanced-grid .form-field > small { margin-top:0; }

/* Stack the invoice entry cards vertically: details first, then files/offers, then save actions. */
.form-layout {
  grid-template-columns:minmax(0,1fr);
  gap:16px;
}
.form-layout > .form-panel,
.form-layout > .attachment-panel,
.form-layout > .form-actions { grid-column:1; grid-row:auto; min-width:0; }
.form-layout > .form-actions { justify-content:flex-end; }
@media(max-width:760px) {
  .invoice-primary-filter-row { align-items:stretch; }
  .invoice-search-field { flex-basis:100%; }
  .invoice-date-range { flex:1 1 100%; min-width:0; }
  .invoice-select-field { flex:1 1 42%; min-width:135px; }
  .invoice-primary-filter-row .invoice-filter-actions { margin-left:0; }
  .invoice-filter-form .v3-filter-advanced-grid .form-field { gap:5px; }
}
@media(max-width:430px) {
  .invoice-date-range { grid-template-columns:minmax(0,1fr); gap:9px; }
  .invoice-date-range .invoice-date-separator { display:none; }
  .invoice-select-field { flex-basis:100%; }
}

/* Mobile dashboard invoices: explicit cards keep every field visible and ordered. */
.dashboard-grid .recent-panel .dashboard-recent-cards { display:none; }
@media(max-width:900px) {
  .dashboard-grid .recent-panel .dashboard-recent-table-wrap { display:none !important; }
  .dashboard-grid .recent-panel .dashboard-recent-cards {
    display:grid;
    gap:10px;
    padding:12px 14px 16px;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-card {
    display:grid;
    gap:10px;
    min-width:0;
    padding:12px 13px;
    border:1px solid #e0e7ed;
    border-left:3px solid #a7bdca;
    border-radius:13px;
    background:#fff;
    box-shadow:0 3px 10px rgba(36,56,75,.045);
  }
  .dashboard-grid .recent-panel .dashboard-invoice-card-top {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(112px,auto);
    align-items:start;
    gap:9px;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-field {
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-field > span:first-child {
    color:#71808d;
    font-size:8px;
    font-weight:800;
    letter-spacing:.075em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-field > strong,
  .dashboard-grid .recent-panel .dashboard-invoice-field > a:not(.row-action) {
    color:#344b60;
    font-size:10px;
    font-weight:720;
    line-height:1.4;
    overflow-wrap:anywhere;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-number-field { min-width:0; }
  .dashboard-grid .recent-panel .dashboard-invoice-number {
    display:inline-block;
    max-width:100%;
    color:#245f96;
    font-size:11px;
    font-weight:800;
    line-height:1.35;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-amount { align-items:flex-end; text-align:right; }
  .dashboard-grid .recent-panel .dashboard-invoice-amount strong {
    max-width:100%;
    color:#344b60;
    font-size:10px;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-customer {
    padding-top:9px;
    border-top:1px solid #edf0f3;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-customer strong { font-size:11px; }
  .dashboard-grid .recent-panel .dashboard-invoice-dates {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
    padding:9px 0;
    border-top:1px solid #edf0f3;
    border-bottom:1px solid #edf0f3;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-dates > .dashboard-invoice-field + .dashboard-invoice-field {
    padding-left:10px;
    border-left:1px solid #edf0f3;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-card-bottom {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:10px;
    min-width:0;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-status { flex:1 1 auto; min-width:0; }
  .dashboard-grid .recent-panel .dashboard-invoice-status .status-badge {
    align-self:flex-start;
    max-width:100%;
    padding:5px 7px;
    font-size:9px;
    line-height:1.25;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .dashboard-grid .recent-panel .dashboard-invoice-action { flex:0 0 auto; align-items:flex-end; }
  .dashboard-grid .recent-panel .dashboard-invoice-action .row-action {
    display:grid;
    place-items:center;
    width:30px;
    height:30px;
  }
  /* Give the due-soon title an inset surface instead of pinning it to the card edge. */
  .dashboard-grid .quick-approval-panel > .panel-heading {
    position:static;
    min-height:0;
    margin:12px 12px 4px;
    padding:15px 14px;
    border:1px solid #e4e8ec;
    border-radius:12px;
    background:#f8f9fa;
  }
}
@media(max-width:380px) {
  .dashboard-grid .recent-panel .dashboard-recent-cards { padding-right:10px; padding-left:10px; }
  .dashboard-grid .recent-panel .dashboard-invoice-card { padding:11px 10px; }
  .dashboard-grid .recent-panel .dashboard-invoice-card-top { grid-template-columns:minmax(0,1fr) minmax(98px,auto); gap:7px; }
}

/* Invoice list: clearer color accents and responsive status navigation. */
.invoice-filter-column { border-top-color:#2e93a8; }
.invoice-filter-heading {
  border-bottom-color:#d4e6ee !important;
  background:linear-gradient(110deg,#e5f2ff 0%,#edf8fb 62%,#f2fbf7 100%) !important;
}
.invoice-filter-heading .section-heading-icon {
  color:#fff !important;
  background:linear-gradient(145deg,#3689ce,#249eaa) !important;
  box-shadow:0 6px 13px rgba(40,125,166,.17) !important;
}
.invoice-filter-heading .eyebrow { color:#317896 !important; }
.invoice-primary-filter-row {
  border-color:#d7e5ec;
  background:linear-gradient(120deg,#f5f9ff,#f3fbfa);
}
.invoice-filter-form .v3-filter-details { border-color:#d3e2e9; }
.invoice-filter-form .v3-filter-details summary { background:linear-gradient(100deg,#f3f8fd,#f2faf8); }
.invoice-results-column { border-top-color:#3286a8; }
.invoice-results-column > .table-toolbar {
  border-bottom-color:#d6e5eb;
  background:linear-gradient(100deg,#f0f6fd,#eef9f7);
}
.invoice-status-strip {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  min-width:0;
  padding:7px 9px;
  border-bottom:1px solid #d7e3e9;
  background:linear-gradient(105deg,#eff5fb,#f1f9f8);
}
.invoice-status-tabs {
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:5px;
  width:100%;
  min-width:0;
  overflow-x:auto;
  padding:2px;
  border:0;
  background:transparent;
  scrollbar-width:none;
  scroll-behavior:smooth;
  overscroll-behavior-inline:contain;
}
.invoice-status-tabs::-webkit-scrollbar { display:none; }
.invoice-status-tabs .invoice-status-tab {
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:0 10px;
  color:#4b6275;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  font-size:10px;
  white-space:nowrap;
}
.invoice-status-tabs .invoice-status-tab::before {
  content:"";
  flex:0 0 6px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--invoice-tab-accent,#4c83b4);
}
.invoice-status-tabs .invoice-status-tab::after { display:none; }
.invoice-status-tabs .invoice-status-tab:hover { color:#294f70; background:rgba(255,255,255,.8); }
.invoice-status-tabs .invoice-status-tab.is-current {
  color:#fff !important;
  border-color:var(--invoice-tab-accent,#347bb5) !important;
  background:var(--invoice-tab-accent,#347bb5) !important;
  box-shadow:0 4px 10px rgba(40,85,123,.15);
}
.invoice-status-tabs .invoice-status-tab.is-current::before { background:#fff; }
.invoice-status-all { --invoice-tab-accent:#3476b7; }
.invoice-status-pending { --invoice-tab-accent:#a97516; }
.invoice-status-payment_pending { --invoice-tab-accent:#bd681e; }
.invoice-status-paid,.invoice-status-mine_paid { --invoice-tab-accent:#1b7c5a; }
.invoice-status-realized { --invoice-tab-accent:#147f83; }
.invoice-status-early,.invoice-status-early_queue { --invoice-tab-accent:#6755a7; }
.invoice-status-rejected,.invoice-status-rejected_mine { --invoice-tab-accent:#a84250; }
.invoice-status-mine { --invoice-tab-accent:#4b6f91; }
.invoice-tab-scroll-button {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
  color:#36789a;
  border:1px solid #cbdde5;
  border-radius:9px;
  background:#fff;
  box-shadow:0 2px 5px rgba(30,76,98,.07);
  cursor:pointer;
}
.invoice-tab-scroll-button[hidden] { display:none !important; }
.invoice-tab-scroll-button:hover:not(:disabled) { color:#fff; border-color:#3286a8; background:#3286a8; }
.invoice-tab-scroll-button:disabled { opacity:.38; cursor:default; }
.invoice-tab-scroll-button:focus-visible { outline:3px solid rgba(50,134,168,.25); outline-offset:2px; }
.invoice-results-column .invoice-table thead { background:linear-gradient(100deg,#285d91 0%,#347ea8 58%,#238f92 100%) !important; }
.invoice-results-column .invoice-table th { color:#fff !important; background:transparent !important; border-bottom-color:rgba(255,255,255,.22) !important; }
.invoice-results-column .invoice-table tbody tr:nth-child(even) td { background:#f4f9fb !important; }
.invoice-results-column .invoice-table tbody tr:hover td { background:#e7f4f6 !important; }
.invoice-results-column .invoice-table tbody td { border-bottom-color:#e3ecef; }
.invoice-results-column .invoice-table .table-primary-link { color:#286c91; }
.invoice-results-column .invoice-table .table-primary-link:hover { color:#194b6a; }

.invoice-mobile-cards { display:none; }
@media(max-width:900px) {
  .invoice-desktop-table-wrap { display:none !important; }
  .invoice-mobile-cards {
    display:grid;
    gap:10px;
    padding:11px 12px 14px;
  }
  .invoice-mobile-card {
    display:grid;
    gap:0;
    min-width:0;
    padding:12px 13px 10px;
    border:1px solid #dce6eb;
    border-left:3px solid #a7bdca;
    border-radius:13px;
    background:linear-gradient(145deg,#fff 62%,#f8fbfc);
    box-shadow:0 4px 11px rgba(36,64,82,.05);
  }
  .invoice-mobile-card-header {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:10px;
    min-width:0;
    padding-bottom:10px;
  }
  .invoice-mobile-card-primary { display:flex; align-items:flex-start; gap:8px; min-width:0; }
  .invoice-mobile-select { display:grid; place-items:start center; flex:0 0 18px; padding-top:17px; }
  .invoice-mobile-select input {
    width:16px;
    height:16px;
    margin:0;
    accent-color:#347fa6;
    cursor:pointer;
  }
  .invoice-mobile-identity { display:grid; gap:3px; min-width:0; }
  .invoice-mobile-label {
    color:#71808d;
    font-size:8px;
    font-weight:820;
    letter-spacing:.075em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .invoice-mobile-identity .table-primary-link {
    display:inline-block;
    max-width:100%;
    color:#28688f;
    font-size:11px;
    font-weight:820;
    line-height:1.35;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .invoice-mobile-type,.invoice-mobile-description {
    display:block;
    max-width:100%;
    color:#71808d;
    font-size:9px;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
  .invoice-mobile-description {
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }
  .invoice-mobile-amount { display:grid; justify-items:end; gap:4px; min-width:92px; max-width:140px; text-align:right; }
  .invoice-mobile-amount strong {
    max-width:100%;
    color:#264b62;
    font-size:11px;
    font-weight:850;
    font-variant-numeric:tabular-nums;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
  .invoice-mobile-info-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    min-width:0;
    border-top:1px solid #e8eef1;
    border-bottom:1px solid #e8eef1;
  }
  .invoice-mobile-info-field {
    display:grid;
    align-content:start;
    gap:4px;
    min-width:0;
    padding:8px 7px;
    border:0;
    background:transparent;
  }
  .invoice-mobile-info-field > strong {
    color:#405869;
    font-size:10px;
    font-weight:680;
    line-height:1.4;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .invoice-mobile-customer { grid-column:1 / -1; }
  .invoice-mobile-info-field:nth-child(2),
  .invoice-mobile-info-field:nth-child(3),
  .invoice-mobile-info-field:nth-child(4),
  .invoice-mobile-info-field:nth-child(5) { border-top:1px solid #e8eef1; }
  .invoice-mobile-info-field:nth-child(3),
  .invoice-mobile-info-field:nth-child(5) { border-left:1px solid #e8eef1; }
  .invoice-mobile-card-footer {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:10px;
    min-width:0;
    padding-top:9px;
  }
  .invoice-mobile-status { display:grid; align-content:start; gap:4px; min-width:0; }
  .invoice-mobile-status .status-badge { align-self:start; max-width:100%; white-space:normal; font-size:9px; line-height:1.25; }
  .invoice-mobile-actions { display:grid; justify-items:end; gap:4px; }
  .invoice-mobile-actions .table-icon-actions { justify-content:flex-end; flex-wrap:nowrap; gap:6px; }
  .invoice-mobile-card .invoice-inline-lock[title] { cursor:help; }
}
@media(max-width:380px) {
  .invoice-mobile-cards { padding-right:9px; padding-left:9px; }
  .invoice-mobile-card { padding-right:10px; padding-left:10px; }
  .invoice-mobile-card-header { grid-template-columns:minmax(0,1fr) auto; gap:6px; }
  .invoice-mobile-amount { min-width:82px; max-width:112px; }
  .invoice-mobile-info-field { padding:7px 5px; }
}

/* Invoice list palette refinement: keep the same accents, but return to a lighter, quieter surface. */
.invoice-filter-column { border-top-color:#9ab0bc; }
.invoice-filter-heading {
  border-bottom-color:#e2e8eb !important;
  background:linear-gradient(110deg,#f1f5f7 0%,#f7f9fa 66%,#f7faf9 100%) !important;
}
.invoice-filter-heading .section-heading-icon {
  color:#fff !important;
  background:linear-gradient(145deg,#789aaa,#7eaaa8) !important;
  box-shadow:0 4px 9px rgba(67,105,120,.10) !important;
}
.invoice-filter-heading .eyebrow { color:#617b89 !important; }
.invoice-primary-filter-row {
  border-color:#e2e7ea;
  background:#fbfcfc;
}
.invoice-filter-form .v3-filter-details { border-color:#e1e6e8; }
.invoice-filter-form .v3-filter-details summary { background:#f8fafb; }
.invoice-results-column { border-top-color:#97afb9; }
.invoice-results-column > .table-toolbar {
  border-bottom-color:#e2e7ea;
  background:linear-gradient(100deg,#f7f9fa,#f8fbfa);
}
.invoice-status-strip {
  border-bottom-color:#e2e7ea;
  background:linear-gradient(105deg,#f7f9fa,#f7faf9);
}
.invoice-status-tabs .invoice-status-tab { color:#586d7a; }
.invoice-status-tabs .invoice-status-tab:hover { color:#3f5d6e; background:#fff; }
.invoice-status-tabs .invoice-status-tab.is-current {
  color:#3e5d71 !important;
  border-color:#d9e3e8 !important;
  background:#eaf1f5 !important;
  box-shadow:0 2px 5px rgba(43,74,92,.06);
}
.invoice-status-tabs .invoice-status-tab.is-current::before { background:var(--invoice-tab-accent,#718fa0); }
.invoice-status-all { --invoice-tab-accent:#718fa0; }
.invoice-status-pending { --invoice-tab-accent:#b69a61; }
.invoice-status-payment_pending { --invoice-tab-accent:#bd8d66; }
.invoice-status-paid,.invoice-status-mine_paid { --invoice-tab-accent:#70947f; }
.invoice-status-realized { --invoice-tab-accent:#6e9692; }
.invoice-status-early,.invoice-status-early_queue { --invoice-tab-accent:#8980a9; }
.invoice-status-rejected,.invoice-status-rejected_mine { --invoice-tab-accent:#ae7c83; }
.invoice-status-mine { --invoice-tab-accent:#718b9e; }
.invoice-tab-scroll-button {
  color:#617b89;
  border-color:#dfe6e9;
  background:#fff;
  box-shadow:0 1px 3px rgba(43,74,92,.04);
}
.invoice-tab-scroll-button:hover:not(:disabled) { color:#fff; border-color:#718f9f; background:#718f9f; }
.invoice-results-column .invoice-table thead {
  background:linear-gradient(100deg,#e8eff3 0%,#edf3f5 60%,#eaf3f1 100%) !important;
}
.invoice-results-column .invoice-table th {
  color:#526b78 !important;
  background:transparent !important;
  border-bottom-color:#dce5e8 !important;
}
.invoice-results-column .invoice-table tbody tr:nth-child(even) td { background:#fafcfc !important; }
.invoice-results-column .invoice-table tbody tr:hover td { background:#f1f6f7 !important; }
.invoice-results-column .invoice-table tbody td { border-bottom-color:#e8edef; }
.invoice-results-column .invoice-table .table-primary-link { color:#416f88; }
.invoice-results-column .invoice-table .table-primary-link:hover { color:#2e596f; }

/* Keep the two invoice-list sections on the original light surface. */
.invoice-list-layout .invoice-filter-column,
.invoice-list-layout .invoice-results-column {
  background:#fff !important;
  border-top-color:#b3c1c8;
  box-shadow:0 7px 18px rgba(38,55,67,.045);
}
.invoice-list-layout .invoice-filter-column .invoice-filter-heading {
  background:linear-gradient(100deg,#f5f7f8,#fafbfb) !important;
  border-bottom-color:#e7ebed !important;
}
.invoice-list-layout .invoice-filter-column .invoice-filter-heading .section-heading-icon {
  color:#fff !important;
  background:#87a3b1 !important;
  box-shadow:none !important;
}
.invoice-list-layout .invoice-filter-form .invoice-primary-filter-row {
  background:#fff !important;
  border-color:#e5e9eb;
}
.invoice-list-layout .invoice-filter-form .v3-filter-details { background:#fff !important; }
.invoice-list-layout .invoice-filter-form .v3-filter-details summary { background:#f8f9fa !important; }
.invoice-list-layout .invoice-results-column .invoice-status-strip {
  background:#f7f8f9 !important;
  border-bottom-color:#e5e9eb;
}
.invoice-list-layout .invoice-results-column > .table-toolbar {
  background:#fafbfb !important;
  border-bottom-color:#e5e9eb;
}
.invoice-list-layout .invoice-results-column .invoice-table thead {
  background:#eef1f3 !important;
}
.invoice-list-layout .invoice-results-column .invoice-table th {
  color:#5a6872 !important;
  background:transparent !important;
  border-bottom-color:#dfe4e7 !important;
}
.invoice-list-layout .invoice-results-column .invoice-table tbody tr:nth-child(even) td { background:#fbfcfc !important; }
.invoice-list-layout .invoice-results-column .invoice-table tbody tr:hover td { background:#f3f6f7 !important; }

/* Final low-saturation invoice-list surfaces: remove gradients from the two highlighted panels. */
.invoice-list-layout > .invoice-filter-column,
.invoice-list-layout > .invoice-results-column {
  background-color:#fff !important;
  background-image:none !important;
  border-top-color:#c0ccd1;
  box-shadow:0 6px 16px rgba(38,55,67,.035);
}
.invoice-list-layout .invoice-filter-heading {
  background:#f6f7f8 !important;
  background-image:none !important;
  border-bottom-color:#e5e8ea !important;
}
.invoice-list-layout .invoice-filter-heading .section-heading-icon {
  background:#899ea8 !important;
  box-shadow:none !important;
}
.invoice-list-layout .invoice-primary-filter-row,
.invoice-list-layout .v3-filter-details {
  background:#fff !important;
  background-image:none !important;
}
.invoice-list-layout .invoice-primary-filter-row { border-color:#e4e8ea; }
.invoice-list-layout .v3-filter-details summary { background:#f8f9fa !important; }
.invoice-list-layout .invoice-status-strip,
.invoice-list-layout .invoice-results-column > .table-toolbar {
  background:#f8f9fa !important;
  background-image:none !important;
  border-color:#e5e8ea;
}
.invoice-list-layout .invoice-status-tabs .invoice-status-tab.is-current {
  color:#4b606b !important;
  border-color:#dce3e7 !important;
  background:#eaf0f3 !important;
  background-image:none !important;
  box-shadow:none !important;
}
.invoice-list-layout .invoice-status-tabs .invoice-status-tab.is-current::before { background:#8399a4; }
.invoice-list-layout .invoice-results-column .invoice-table thead,
.invoice-list-layout .invoice-results-column .invoice-table thead tr,
.invoice-list-layout .invoice-results-column .invoice-table th {
  color:#5a6871 !important;
  background:#eef1f3 !important;
  background-image:none !important;
  border-bottom-color:#dfe4e7 !important;
}
.invoice-list-layout .invoice-results-column .invoice-table tbody tr:nth-child(even) td { background:#fafbfb !important; }
.invoice-list-layout .invoice-results-column .invoice-table tbody tr:hover td { background:#f2f5f6 !important; }

/* Invoice filter controls: one search border only, with neutral (not blue) focus treatment. */
.invoice-list-layout .invoice-primary-filter-row .invoice-search-field .search-control {
  border:1px solid #dce2e6;
  border-radius:10px;
  background:#fff;
  box-shadow:none;
}
.invoice-list-layout .invoice-primary-filter-row .invoice-search-field .search-control:focus-within {
  border-color:#bcc9cf;
  box-shadow:0 0 0 2px rgba(120,145,156,.08);
}
.invoice-list-layout .invoice-primary-filter-row .invoice-search-field .search-control > input[type="search"] {
  width:100%;
  min-width:0;
  min-height:0;
  padding:0;
  color:#3f546a;
  border:0 !important;
  border-radius:0;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  appearance:none;
}
.invoice-list-layout .invoice-primary-filter-row .invoice-search-field .search-control > input[type="search"]:focus,
.invoice-list-layout .invoice-primary-filter-row .invoice-search-field .search-control > input[type="search"]:focus-visible {
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
}
.invoice-list-layout .invoice-date-range input[type="date"]:focus {
  border-color:#d5dee2 !important;
  outline:none !important;
  box-shadow:none !important;
}
.invoice-list-layout .invoice-date-range input[type="date"]:focus-visible {
  border-color:#c8d3d8 !important;
  outline:2px solid rgba(139,160,169,.18) !important;
  outline-offset:1px;
  box-shadow:none !important;
}



/* Uniform panel rhythm across pages; action bodies use explicit top padding below. */
.panel > .panel-heading { margin-bottom:12px !important; }
.panel.action-panel {
  padding:0 !important;
  overflow:hidden;
}
.panel.action-panel > .panel-heading {
  min-height:0;
  margin-bottom:0 !important;
  padding:18px 20px 15px !important;
  border-radius:0;
}
.panel.action-panel > .panel-heading h2 { margin:5px 0 4px; line-height:1.3; }
.panel.action-panel > .panel-heading p { margin:0; }

/* ------------------------------------------------------------------
   Fatura formu düzeltmeleri (statik dosya: derlenmiş görünüm eski olsa da geçerli)
   * Kompakt "Teklif dosyaları" alanının gizli dosya girişi, genel "input{width:100%}"
     kuralına takılıp panelin sol boşluğu kadar sağa taşıyordu ve sayfada yatay
     kaydırma çubuğu oluşturuyordu. Giriş, alanın kendi kutusuna hapsedildi.
   * Sayfa düzeyinde de yatay kaydırma kapatılır.
   ------------------------------------------------------------------ */
.upload-dropzone-compact { position: relative; margin: 0; padding: 14px 16px; }
.upload-dropzone-compact input[type="file"] { position: absolute; inset: 0; width: 100%; max-width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-dropzone-compact strong { font-size: 12.5px; }
body.app-body:has(form.form-layout) { overflow-x: clip; }

/* ------------------------------------------------------------------
   Dosya seçme alanları (05.10.2026 · dosya-girisi-tasmasi)
   "genişlik: %100" kuralı gizli dosya girişine uygulanınca kutu, panelin sol
   boşluğu kadar sağa taşıyor ve sayfada sağa-sola kaydırma çubuğu oluşuyordu.
   Dosya girişleri artık bu kuraldan muaftır; yükleme alanlarındaki gizli giriş
   1 piksel boyutunda ve kendi alanına konumlandırılmış olarak durur.
   ------------------------------------------------------------------ */
.form-field input[type="file"] { width: auto; max-width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; }
.upload-dropzone-compact { position: relative; }
.upload-dropzone-compact input[type="file"] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; border: 0; }
