/* CodeNova brand tokens match codenovallc.com/css/craft.css.
   Self-hosted fonts and original hero animation; no CDN or UI framework. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-v1.woff2") format("woff2");
}
@font-face {
  font-family: Tektur;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/tektur-latin-v1.woff2") format("woff2");
}
@layer brand {
  :root {
    color-scheme: dark;
    --bg: #030712;
    --white: #0a1020;
    --ink: #f3f4f6;
    --muted: #9ca3af;
    --line: rgba(156, 163, 175, 0.16);
    --green: #2563eb;
    --deep: #1d4ed8;
    --pale: #111827;
    --surface: #0a1020;
    --surface-raised: #111827;
    --accent: #60a5fa;
    --focus: #7dd3fc;
  }
  body {
    font-family:
      "Instrument Sans",
      ui-sans-serif,
      system-ui,
      -apple-system,
      sans-serif;
    font-size: 15px;
    font-optical-sizing: auto;
  }
  h1,
  h2,
  h3 {
    color: var(--ink);
    font-weight: 600;
  }
  h1 {
    letter-spacing: -0.032em;
  }
  p {
    color: var(--muted);
  }
  ::selection {
    background: #06b6d44d;
    color: #fff;
  }
  :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
  }
  input,
  select,
  textarea {
    background: #080f1e;
    border-color: #5a6675;
    color: var(--ink);
    font-size: 14px;
    border-radius: 8px;
  }
  input::placeholder,
  textarea::placeholder {
    color: #9099ab;
  }
  input:focus,
  select:focus,
  textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px #2563eb26;
  }
  input:disabled {
    background: #111827;
    color: #9ca3af;
  }
  label {
    font-size: 13px;
    color: #d1d5db;
  }
  .button {
    font-size: 13px;
    min-height: 44px;
    border-radius: 8px;
  }
  .button.secondary {
    background: transparent;
    border-color: #9ca3af61;
    color: #f9fafb;
  }
  .button.secondary:hover {
    background: #111827;
  }
  .button.danger {
    background: #35131b;
    color: #fca5a5;
    border-color: #7f3844;
  }
  .text-link,
  .row-arrow {
    color: #60a5fa;
  }
  .text-link {
    font-size: 13px;
  }
  .quiet {
    color: #9ca3af;
    font-size: 12px;
  }
  .eyebrow {
    color: #60a5fa;
    letter-spacing: 0.14em;
    font-size: 10px;
  }
  .notice {
    background: #1c2130;
    border-color: #555e78;
    color: #d1d5db;
  }
  .notice.success {
    background: #0e2c27;
    border-color: #20574c;
    color: #a7f3d0;
  }
  .form-error {
    background: #35131b;
    color: #fecaca;
  }
  .toast {
    background: #111827;
    border: 1px solid #3b82f666;
    color: #f3f4f6;
  }
  .sidebar {
    background: #060b16;
    border-color: var(--line);
  }
  .brand {
    padding: 0 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    letter-spacing: 0;
  }
  .wordmark {
    font-family: Tektur, "Instrument Sans", sans-serif;
    font-weight: 600;
    font-size: 23px;
    letter-spacing: 0.01em;
    color: #f3f4f6;
  }
  .brand-divider {
    width: 1px;
    height: 20px;
    background: var(--line);
  }
  .brand-portal {
    font-family: "Instrument Sans", sans-serif;
    font-size: 11px;
    letter-spacing: 0.03em;
    color: #9ca3af;
  }
  .workspace {
    background: #0a1020;
    border-color: var(--line);
  }
  .workspace-icon {
    background: #11274e;
    color: #93c5fd;
  }
  .workspace strong {
    font-size: 12px;
  }
  .workspace small {
    font-size: 10px;
  }
  .nav-label {
    color: #9099ab;
  }
  .sidebar nav a {
    color: #9ca3af;
    font-size: 13px;
  }
  .sidebar nav a.active {
    background: #112448;
    color: #93c5fd;
  }
  .sidebar nav a:hover {
    background: #111827;
  }
  .active-dot {
    background: #06b6d4;
  }
  .private-note {
    background: #0a1020;
    border-color: var(--line);
  }
  .private-note strong {
    font-size: 11px;
    color: #d1d5db;
  }
  .private-note p {
    font-size: 11px;
  }
  .lock-icon {
    color: #60a5fa;
  }
  .avatar {
    background: #162d50;
    color: #93c5fd;
  }
  .profile strong {
    font-size: 12px;
  }
  .profile small {
    font-size: 11px;
  }
  .topbar {
    background: #030712;
    border-color: var(--line);
  }
  .breadcrumbs {
    color: #9099ab;
    font-size: 12px;
  }
  .breadcrumbs strong {
    color: #d1d5db;
  }
  .breadcrumbs span {
    color: #64748b;
  }
  .private-badge {
    color: #9ca3af;
    font-size: 11px;
  }
  .private-badge > span {
    background: #06b6d4;
  }
  .page-heading p {
    font-size: 14px;
  }
  .greeting-dot {
    color: #93c5fd;
  }
  .overview-label h2 {
    font-size: 15px;
  }
  .date-chip {
    background: #0a1020;
    color: #9ca3af;
    font-size: 11px;
  }
  .date-chip span {
    color: #64748b;
  }
  .stat-card {
    background: #0a1020;
    border-color: var(--line);
  }
  .stat-label {
    font-size: 12px;
    color: #9ca3af;
  }
  .stat-card > strong {
    font-size: 32px;
    font-weight: 600;
    color: #f3f4f6;
  }
  .stat-card strong small {
    color: #9099ab;
  }
  .stat-caption {
    color: #9099ab;
    font-size: 10px;
  }
  .stat-card.featured {
    background: #0d2042;
    border-color: #3b82f666;
  }
  .featured .stat-label {
    color: #bfdbfe;
  }
  .featured .stat-caption {
    color: #93b3de;
  }
  .stat-art {
    color: #3b82f616;
  }
  .green {
    background: #6ee7b7;
  }
  .amber {
    background: #fbbf24;
  }
  .rose {
    background: #fca5a5;
  }
  .summary-strip {
    background: #070e1c;
    border-color: var(--line);
  }
  .summary-strip > div > span:last-child {
    color: #9ca3af;
    font-size: 11px;
  }
  .summary-strip strong {
    color: #e5e7eb;
  }
  .summary-strip strong small {
    color: #9099ab;
  }
  .summary-icon {
    background: #101d33;
    border-color: var(--line);
    color: #93c5fd;
  }
  .panel {
    background: #0a1020;
    border-color: var(--line);
  }
  .panel-heading {
    border-color: var(--line);
  }
  .panel-heading h2 {
    font-size: 16px;
  }
  .panel-heading p {
    font-size: 12px;
  }
  .panel-heading:has(+ .table-wrap) {
    border-bottom: 1px solid var(--line);
  }
  thead {
    background: #080f1d;
  }
  th {
    font-size: 11px;
    color: #9099ab;
    border-color: var(--line);
  }
  td {
    font-size: 12px;
    color: #b6becb;
    border-color: var(--line);
  }
  .invoice-number {
    color: #e5e7eb;
  }
  .document-icon {
    color: #60a5fa;
  }
  .amount {
    color: #e5e7eb;
  }
  tbody tr:hover {
    background: #0e192b;
  }
  .status {
    font-size: 9px;
    background: #1c2435;
    color: #b5becd;
  }
  .status.paid,
  .status.succeeded {
    background: #0e3028;
    color: #86efc0;
  }
  .status.sent {
    background: #12294f;
    color: #93c5fd;
  }
  .status.pending_payment,
  .status.processing,
  .status.creating {
    background: #302811;
    color: #fcd77b;
  }
  .status.overdue,
  .status.failed,
  .status.returned {
    background: #341c25;
    color: #fda4af;
  }
  .status.void,
  .status.refunded {
    background: #292039;
    color: #d8b4fe;
  }
  .empty > span {
    background: #101d33;
    border-color: #243d63;
    color: #60a5fa;
  }
  .empty h3 {
    font-size: 16px;
  }
  .empty p {
    font-size: 13px;
  }
  .payment-list strong {
    font-size: 12px;
  }
  .payment-list small {
    font-size: 11px;
  }
  .payment-circle {
    background: #11274b;
    color: #93c5fd;
  }
  .calm-card {
    background: #08162c;
    border: 1px solid #1e3657;
  }
  .calm-card .eyebrow {
    color: #60a5fa;
    font-size: 9px;
  }
  .calm-card h2 {
    color: #f3f4f6;
  }
  .calm-card p {
    color: #9ca3af;
    font-size: 12px;
  }
  .calm-card .text-link {
    font-size: 12px;
  }
  .calm-art {
    color: #14345a;
  }
  .filters select,
  .search input {
    font-size: 12px;
  }
  .search span {
    color: #9099ab;
  }
  .pagination {
    font-size: 11px;
    color: #9ca3af;
  }
  .pagination a {
    color: #93c5fd;
  }
  .integration strong {
    font-size: 12px;
  }
  .integration small {
    font-size: 11px;
  }
  .integration > span:first-child {
    color: #60a5fa;
  }
  .invoice-preview-total strong,
  .totals .grand-total {
    color: #93c5fd;
  }
  .invoice-paper-top h2 {
    color: #f3f4f6;
  }
  .invoice-notes p {
    color: #b6becb;
  }
  .remove-line {
    color: #fda4af;
  }
  footer {
    font-size: 10px;
    color: #9099ab;
  }
  .menu-button {
    color: #93c5fd;
  }
  .guest {
    background: #030712;
  }
  .guest main#main.auth-shell {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100svh;
    isolation: isolate;
    padding: 0;
    max-width: none;
  }
  .auth-constellation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: #030712;
    pointer-events: none;
  }
  .auth-constellation canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.64;
  }
  .auth-header {
    width: 100%;
    height: 84px;
    padding: 0 clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #9ca3af14;
    background: #030712b3;
  }
  .portal-label {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .portal-label > span {
    width: 5px;
    height: 5px;
    background: #06b6d4;
    border-radius: 50%;
  }
  .auth-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 45px 24px 35px;
    flex: 1;
    justify-content: center;
  }
  .auth-intro {
    text-align: center;
    margin-bottom: 27px;
    max-width: 700px;
  }
  .auth-intro h1 {
    font-size: clamp(30px, 3.1vw, 46px);
    line-height: 1.12;
    font-weight: 600;
    margin: 14px 0;
  }
  .auth-intro h1 > span {
    color: #93c5fd;
  }
  .auth-intro p {
    font-size: 14px;
    color: #9ca3af;
  }
  .auth-intro .eyebrow {
    font-size: 10px;
    color: #60a5fa;
  }
  .auth-panel {
    display: block;
    width: 100%;
    max-width: 440px;
    background: #0a1020f5;
    border: 1px solid #9ca3af38;
    border-radius: 12px;
    padding: 30px 34px;
    box-shadow: 0 20px 60px #0004;
    position: relative;
  }
  .auth-panel:before {
    content: "";
    position: absolute;
    top: -1px;
    left: 34px;
    right: 34px;
    height: 1px;
    background: #3b82f6b3;
  }
  .auth-panel:after {
    content: "";
    position: absolute;
    left: 33px;
    top: -3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #06b6d4;
  }
  .auth-form {
    max-width: none;
  }
  .auth-form h2 {
    font-size: 25px;
    margin: 9px 0;
    color: #f3f4f6;
    letter-spacing: -0.022em;
  }
  .auth-form > p {
    font-size: 13px;
    margin-bottom: 24px;
  }
  .auth-form label {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .auth-form input {
    height: 47px;
  }
  .auth-form .button {
    min-height: 47px;
    font-size: 14px;
  }
  .auth-link {
    color: #93c5fd;
    font-size: 13px;
    margin-top: 19px;
  }
  .invite-note {
    margin-top: 23px;
    padding-top: 20px;
    font-size: 12px;
    color: #d1d5db;
  }
  .invite-note span {
    font-size: 11px;
    color: #9ca3af;
  }
  .security-node {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #06b6d4;
    margin-right: 6px;
  }
  .auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 22px clamp(24px, 5vw, 80px);
    font-size: 11px;
    color: #9099ab;
  }
  .auth-footer a {
    color: #9ca3af;
  }
  @media (max-width: 700px) {
    .auth-header {
      height: 68px;
      padding: 0 22px;
    }
    .auth-header .wordmark {
      font-size: 21px;
    }
    .auth-center {
      padding: 29px 20px 24px;
      justify-content: flex-start;
    }
    .auth-intro {
      margin-bottom: 25px;
    }
    .auth-intro h1 {
      font-size: 32px;
    }
    .auth-intro p {
      font-size: 13px;
      max-width: 310px;
      margin: auto;
    }
    .auth-intro .eyebrow {
      font-size: 9px;
    }
    .auth-panel {
      padding: 25px 23px;
    }
    .auth-form h2 {
      font-size: 23px;
    }
    .auth-footer {
      padding: 18px 22px;
      font-size: 10px;
      flex-wrap: wrap;
    }
    .auth-constellation canvas {
      opacity: 0.56;
    }
    .menu-open .menu-button {
      background: #111827;
      border-color: #334155;
    }
    .stat-card > strong {
      font-size: 27px;
    }
    .stat-label {
      font-size: 11px;
    }
    .stat-caption {
      font-size: 9px;
    }
    .page-heading p {
      font-size: 13px;
    }
    .summary-strip > div > span:last-child {
      font-size: 10px;
    }
    .panel-heading p {
      font-size: 11px;
    }
  }
  @media print {
    body {
      color: #111;
      background: white;
    }
    .invoice-paper,
    .invoice-paper h2,
    .invoice-paper h3,
    .invoice-paper p,
    .invoice-paper td,
    .invoice-paper th,
    .totals > div,
    .totals .grand-total {
      color: #111;
      background: white;
    }
    .auth-constellation {
      display: none;
    }
  }
}
