/* NeurodiverCity client area, on Perfex's customer theme. Loaded after Perfex's CSS and perfex-colours.css.
   The brand guidelines v1: Lexend headings, Atkinson Hyperlegible text at 18px, navy and purple, blue links,
   borders not shadows, one purple button a view, visible focus, reading options. */

@font-face { font-family: "Lexend"; font-weight: 300; font-display: swap; src: url("../fonts/Lexend-Light.ttf") format("truetype"); }
@font-face { font-family: "Lexend"; font-weight: 400; font-display: swap; src: url("../fonts/Lexend-Regular.ttf") format("truetype"); }
@font-face { font-family: "Lexend"; font-weight: 500 700; font-display: swap; src: url("../fonts/Lexend-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("../fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("../fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); }

:root { --navy: #14213D; --purple: #662D91; --purple-dark: #52237A; --purple-tint: #EFE8F5; --blue: #1E6FB5;
        --off: #F7F4F4; --slate: #4A5568; --line: #DDE3E1; --zoom: 1; }

/* Type: 18px everywhere text is read; labels may be smaller. */
body.customers { font-family: "Atkinson Hyperlegible", Arial, system-ui, sans-serif; font-size: 18px; line-height: 1.6;
                 color: var(--navy); background: #FFFFFF; zoom: var(--zoom); }
body.customers > * { font-size: 18px; }
body.customers button, body.customers input, body.customers select, body.customers textarea, body.customers .btn,
body.customers .form-control, body.customers .table, body.customers .dropdown-menu, body.customers label,
body.customers .tw-text-sm, body.customers .tw-text-base, body.customers .text-muted { font-family: inherit; font-size: 18px; }
body.customers h1, body.customers h2, body.customers h3, body.customers h4, body.customers .section-heading,
body.customers .panel-title, body.customers .customer-heading-profile, body.customers .tw-font-semibold.tw-text-lg {
  font-family: "Lexend", Arial, system-ui, sans-serif; font-weight: 600; color: var(--navy); letter-spacing: -0.005em;
}
body.customers .text-muted, body.customers .help-block { color: var(--slate); }
body.customers a { color: var(--blue); text-underline-offset: 3px; }
body.customers a:hover { color: var(--navy); }

/* Focus you can always see. */
body.customers a:focus-visible, body.customers button:focus-visible, body.customers .btn:focus-visible,
body.customers input:focus-visible, body.customers select:focus-visible, body.customers textarea:focus-visible,
body.customers .form-control:focus { outline: 3px solid var(--blue) !important; outline-offset: 2px; box-shadow: none; }
.ndc-skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: #FFFFFF; padding: 10px 16px; }
.ndc-skip:focus { left: 16px; }

/* Reading options bar, as on neurodiver.city: slim on desktop, one button on phones. */
.ndc-rb { background: var(--navy); color: #E8ECF4; font-size: 15px; }
.ndc-rb .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.ndc-rb-label { display: inline-flex; align-items: center; gap: 8px; }
.ndc-rb-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ndc-rb button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #3A4A6B; background: transparent; color: #E8ECF4; font-size: 15px; cursor: pointer; }
.ndc-rb button[aria-pressed="true"] { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; font-weight: 700; }
.ndc-rb-toggle { display: none !important; }
@media (max-width: 720px) {
  .ndc-rb-label { display: none; }
  .ndc-rb-toggle { display: inline-flex !important; align-items: center; }
  .ndc-rb-opts { display: none; width: 100%; padding-bottom: 8px; }
  .ndc-rb.open .ndc-rb-opts { display: flex; }
}
html[data-font="lexend"] body.customers, html[data-font="lexend"] body.customers * { font-family: "Lexend", Arial, sans-serif !important; letter-spacing: .01em; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before { transition: none !important; animation: none !important; }
html[data-contrast="high"] body.customers .text-muted, html[data-contrast="high"] body.customers .help-block { color: var(--navy) !important; }
html[data-contrast="high"] body.customers .panel_s, html[data-contrast="high"] body.customers .panel { border: 2px solid var(--navy) !important; }
html[data-contrast="high"] body.customers p a { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Header */
body.customers .navbar.header { background: #FFFFFF; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 80px; margin-bottom: 0; }
body.customers .navbar.header .ndc-logo { display: flex; align-items: center; height: 80px; padding-top: 0; padding-bottom: 0; }
body.customers .navbar.header .ndc-logo img { width: 200px; height: auto; display: block; }
body.customers .navbar.header .navbar-nav > li > a { color: var(--navy); font-size: 17px; line-height: 30px; padding-top: 25px; padding-bottom: 22px; border-bottom: 3px solid transparent; }
body.customers .navbar.header .navbar-nav > li.active > a, body.customers .navbar.header .navbar-nav > li > a:hover { background: transparent; color: var(--navy); border-bottom-color: var(--purple); }
body.customers .navbar.header .navbar-nav > li.active > a { font-weight: 700; }

/* Content */
body.customers #wrapper { background: var(--off); padding-top: 32px; padding-bottom: 64px; }
body.customers .panel_s, body.customers .panel { border: 1px solid var(--line); border-radius: 20px; box-shadow: none; }
body.customers .panel_s .panel-body { padding: 28px; }
body.customers .submenu.customer-top-submenu a { color: var(--navy); }
body.customers .table > thead > tr > th { color: var(--slate); font-weight: 700; }

/* Buttons: purple for the main action, navy outline for the rest, 48px tall. */
body.customers .btn { min-height: 48px; border-radius: 12px; font-weight: 700; padding-left: 22px; padding-right: 22px; }
body.customers .btn-xs, body.customers .btn-sm { min-height: 36px; padding-left: 14px; padding-right: 14px; }
body.customers .btn-primary, body.customers .btn-primary:focus { background: var(--purple); border-color: var(--purple); color: #FFFFFF; }
body.customers .btn-primary:hover, body.customers .btn-primary:active { background: var(--purple-dark); border-color: var(--purple-dark); color: #FFFFFF; }
body.customers .btn-default { background: #FFFFFF; border: 2px solid var(--navy); color: var(--navy); }
body.customers .btn-default:hover { background: var(--navy); color: #FFFFFF; }
body.customers .form-control { min-height: 48px; border-radius: 10px; border-color: #9AA4B5; }

/* Sign in and register: one calm card on off-white. */
body.customers.customers_login #wrapper, body.customers.register #wrapper { padding-top: 56px; }

/* Footer */
/* Perfex gives every footer a fixed 50px height, which cut ours off after the colour band. */
.ndc-footer { background: var(--navy) !important; color: #C3CBDB; font-size: 17px; padding: 0 0 32px !important; margin-top: 0; border: 0; height: auto; }
/* Light, underlined links on navy; the general link colour (brand blue) is too dark here. */
/* Perfex's Tailwind build removes every link underline with !important. */
body.customers .ndc-footer a, body.customers .ndc-footer a:visited { color: #E8ECF4; text-decoration: underline !important; text-underline-offset: 3px; }
body.customers .ndc-footer a:hover { color: #FFFFFF; }
.ndc-band { display: flex; height: 6px; margin-bottom: 48px; }
.ndc-band span { flex: 1; }
.ndc-band span:nth-child(1) { background: #662D91; } .ndc-band span:nth-child(2) { background: #1E6FB5; } .ndc-band span:nth-child(3) { background: #39B54A; }
.ndc-band span:nth-child(4) { background: #F9A61A; } .ndc-band span:nth-child(5) { background: #D83B91; }
.ndc-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; text-align: left; }
.ndc-footer-logo { width: 200px; height: auto; margin-bottom: 12px; }
.ndc-tag { color: #FFFFFF; margin: 0; }
body.customers .ndc-tag strong { color: #C9A8E6; font-weight: 400; }
.ndc-footer-head { color: #FFFFFF; font-weight: 700; margin: 0 0 10px; }
.ndc-footer p { margin: 0; }
.ndc-legal { margin-top: 32px !important; padding-top: 20px; border-top: 1px solid #2A3858; font-size: 15px; color: #A9B3C7; }

/* ---------- Rewritten pieces: header, sign in, dashboard ---------- */
body.customers .navbar.header { display: none; } /* Perfex's old header, if a view still prints one */
.ndc-head { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.ndc-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 80px; padding-top: 12px; padding-bottom: 12px; }
.ndc-head-row::before, .ndc-head-row::after { display: none; } /* Bootstrap's clearfix on .container */
.ndc-logo { display: block; line-height: 0; }
.ndc-logo img { width: 200px; height: auto; }
.ndc-menu-btn { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--navy); background: #FFFFFF; color: var(--navy); font-weight: 700; font-size: 17px; }
.ndc-nav.collapse { display: block !important; height: auto !important; padding: 0; border: 0; box-shadow: none; }
.ndc-nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.ndc-nav-list > li > a { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-size: 17px; text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; }
.ndc-nav-list > li > a:hover, .ndc-nav-list > li.active > a { border-bottom-color: var(--purple); color: var(--navy); background: transparent; }
.ndc-nav-list > li.active > a { font-weight: 700; }
.ndc-nav-list > li.ndc-nav-cta > a { border: 2px solid var(--navy); border-radius: 12px; padding: 8px 18px; font-weight: 700; }
.ndc-nav-list > li.ndc-nav-cta > a:hover { background: var(--navy); color: #FFFFFF; }
.ndc-profile .client-profile-image-small { width: 32px; height: 32px; border-radius: 50%; }
.ndc-profile .dropdown-menu { border-radius: 12px; border-color: var(--line); box-shadow: 0 8px 24px rgba(20, 33, 61, .12); padding: 8px 0; min-width: 240px; }
.ndc-profile .dropdown-menu > li > a { padding: 10px 18px; color: var(--navy); }
.ndc-profile .dropdown-header { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
@media (max-width: 860px) {
  .ndc-menu-btn { display: inline-flex; }
  .ndc-nav.collapse { display: none !important; width: 100%; }
  .ndc-nav.collapse.in { display: block !important; }
  .ndc-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .ndc-nav-list > li > a { width: 100%; padding: 14px 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .ndc-nav-list > li.ndc-nav-cta > a { justify-content: center; margin: 10px 0; }
  .ndc-profile .dropdown-menu { position: static; float: none; box-shadow: none; border: 0; }
}

.ndc-eyebrow { font-size: 14px !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); margin: 0 0 10px; }

/* Sign in: a welcome panel beside the form. */
.ndc-auth { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; max-width: 1040px; margin: 24px auto 0; }
.ndc-auth-intro { flex: 1 1 380px; min-width: 0; padding-top: 12px; }
.ndc-auth-intro h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin: 0 0 16px; }
.ndc-auth-intro > p { color: var(--slate); max-width: 52ch; }
.ndc-auth-list { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; }
.ndc-auth-list li { position: relative; padding-left: 30px; }
.ndc-auth-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--purple-tint); box-shadow: inset 0 0 0 6px var(--purple-tint), inset 0 0 0 9px var(--purple); }
.ndc-auth-help { margin-top: 20px; padding: 16px 20px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); color: var(--navy) !important; }
.ndc-auth-card { flex: 1 1 380px; min-width: 0; max-width: 460px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.ndc-auth-heading { font-size: 24px; margin: 0 0 20px; }
.ndc-auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 16px 0 0; }
.ndc-auth-language { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Dashboard: greeting and the main places as cards. */
.ndc-welcome { margin: 8px 0 24px; }
.ndc-greeting { font-size: clamp(30px, 3.6vw, 40px); margin: 0 0 8px; }
.ndc-welcome-lead { color: var(--slate); margin: 0; }
.ndc-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.ndc-place { display: block; padding: 20px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); color: var(--navy) !important; text-decoration: none !important; border-top: 4px solid var(--purple); }
.ndc-place:nth-child(2) { border-top-color: var(--blue); } .ndc-place:nth-child(3) { border-top-color: #39B54A; }
.ndc-place:nth-child(4) { border-top-color: #F9A61A; } .ndc-place:nth-child(5) { border-top-color: #D83B91; }
.ndc-place:hover { border-color: var(--navy); }
.ndc-place strong { display: block; font-family: "Lexend", Arial, sans-serif; font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.ndc-place span { display: block; color: var(--slate); }

/* Dashboard: "Your support requests" (NeurodiverCity SupportPal module) */
.ndc-request-list { list-style: none; margin: 0 0 16px; padding: 0; }
.ndc-request-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.ndc-request-list li:first-child { border-top: 0; padding-top: 0; }
.ndc-request-list a { display: block; min-width: 0; flex: 1 1 260px; text-decoration: none; }
.ndc-request-subject { display: block; font-weight: 700; color: var(--navy); }
.ndc-request-list a:hover .ndc-request-subject, .ndc-request-list a:focus .ndc-request-subject { text-decoration: underline; }
.ndc-request-meta { display: block; color: var(--slate); font-size: 16px; }
.ndc-request-status { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-size: 16px; white-space: nowrap; }
.ndc-request-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Page and section headings on Perfex's own screens: Lexend, larger, navy. */
body.customers .section-heading, body.customers h4.tw-text-lg, body.customers h3.tw-text-lg {
  font-family: "Lexend", Arial, sans-serif !important; font-size: 30px !important; font-weight: 600 !important; color: var(--navy) !important; margin-bottom: 16px !important;
}
body.customers .section-heading a { font-size: 18px; font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-weight: 700; margin-left: 12px; }
body.customers .panel_s .panel-body { box-shadow: none; }

/* ======================================================================================================
   Components for the rewritten screens (see ../../DESIGN.md). Every rewritten view builds from these.
   ====================================================================================================== */
/* Page header: eyebrow, title, a line of help, and the page's actions on the right. */
.ndc-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 8px 0 24px; }
.ndc-page-head h1 { font-size: clamp(30px, 3.4vw, 40px); margin: 0; }
.ndc-page-head .ndc-lead { color: var(--slate); margin: 6px 0 0; max-width: 62ch; }
.ndc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ndc-actions form { margin: 0; }

/* Cards: white, bordered, rounded; a card has an optional head row. */
.ndc-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 24px; }
.ndc-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: -4px 0 16px; }
.ndc-card-head h2 { font-size: 22px; margin: 0; }

/* Summary tiles: a big figure and a label; a coloured top bar says which status. */
.ndc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.ndc-stat { display: block; background: #FFFFFF; border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 16px; padding: 16px 18px; color: var(--navy) !important; text-decoration: none !important; }
a.ndc-stat:hover { border-color: var(--navy); }
.ndc-stat-label { display: block; color: var(--slate); }
.ndc-stat-figure { display: block; font-family: "Lexend", Arial, sans-serif; font-weight: 600; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ndc-stat.is-due { border-top-color: #1E6FB5; } .ndc-stat.is-paid { border-top-color: #39B54A; } .ndc-stat.is-late { border-top-color: #D83B91; }
.ndc-stat.is-part { border-top-color: #F9A61A; } .ndc-stat.is-neutral { border-top-color: var(--purple); }

/* Status pills: Perfex prints .label label-*; these make them readable everywhere. */
body.customers .label { display: inline-block; font-size: 15px !important; font-weight: 700; padding: 4px 12px; border-radius: 999px; line-height: 1.4; border: 0; }
.ndc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--purple-tint); color: var(--purple); }

/* Tables inside cards: roomy rows, no outer border, headers in slate. */
.ndc-table-card .table { margin-bottom: 0; }
.ndc-table-card .table > thead > tr > th { border-bottom: 1px solid var(--line); background: transparent; font-size: 16px; text-transform: none; padding: 12px 14px; }
.ndc-table-card .table > tbody > tr > td { padding: 16px 14px; vertical-align: middle; border-top: 1px solid #EEF1F0; }
.ndc-table-card .table > tbody > tr:hover > td { background: #FAF8FB; }
.ndc-table-card .dataTables_wrapper .dataTables_length, .ndc-table-card .dataTables_wrapper .dataTables_filter { margin-bottom: 12px; }
.ndc-table-card a.ndc-row-link { font-weight: 700; }

/* Empty states: say what will appear and how. */
.ndc-empty { text-align: center; padding: 40px 16px; color: var(--slate); }
.ndc-empty strong { display: block; font-family: "Lexend", Arial, sans-serif; font-weight: 600; font-size: 22px; color: var(--navy); margin-bottom: 6px; }

/* Documents (invoice, quote, proposal, contract): a sticky action bar and a summary beside the sheet. */
.ndc-doc-bar { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.ndc-doc-bar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 16px; padding-bottom: 16px; }
.ndc-doc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ndc-doc-title h1 { font-size: 26px; margin: 0; }
.ndc-doc-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 24px; }
.ndc-doc-sheet { flex: 999 1 620px; min-width: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 40px); }
.ndc-doc-side { flex: 1 1 280px; min-width: 0; display: grid; gap: 16px; position: sticky; top: 16px; }
.ndc-summary { background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.ndc-summary dl { margin: 0; display: grid; gap: 12px; }
.ndc-summary dt { color: var(--slate); font-weight: 400; }
.ndc-summary dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ndc-summary .ndc-due { font-family: "Lexend", Arial, sans-serif; font-size: 32px; font-weight: 600; line-height: 1.1; }
.ndc-summary .btn { width: 100%; margin-top: 16px; }
.ndc-note { padding: 14px 16px; border-radius: 14px; background: var(--purple-tint); color: var(--navy); }
.ndc-note.is-warn { background: #FBE7F1; }

/* Document head (invoice, quote, proposal, contract): logo, title with status, actions. */
.ndc-doc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 8px 0 8px; }
.ndc-doc-logo { flex: 0 0 100%; line-height: 0; margin-bottom: 8px; }
.ndc-doc-logo img { width: 190px; height: auto; }
.ndc-doc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ndc-doc-title .ndc-eyebrow { flex: 0 0 100%; margin: 0; }
.ndc-doc-title h1 { font-size: clamp(28px, 3vw, 36px); margin: 0; }
.ndc-doc-body > .row { margin-left: 0; margin-right: 0; }
.ndc-doc-body .table-responsive { border: 0; }
.ndc-doc-body hr { border-color: var(--line); }
.ndc-pay { font-size: 18px; }
/* Text inside Perfex's document bodies at the brand's size. */
.ndc-doc-body address, .ndc-doc-body p, .ndc-doc-body h5, .ndc-doc-body .tw-text-normal, .ndc-doc-body .tw-text-sm { font-size: 18px !important; }
.ndc-summary dt { font-size: 17px; }
