:root {
  --invoice-blue: #1677ff;
  --invoice-blue-dark: #0b4fb3;
  --invoice-navy: #08172f;
  --invoice-orange: #ff8a1f;
  --invoice-gold: #ffc642;
  --invoice-green: #2bbd78;
  --invoice-blue-soft: #eef5ff;
  --invoice-line: #dce6f1;
  --blue: var(--invoice-blue);
  --orange: var(--invoice-orange);
  --green: var(--invoice-blue);
  --green-dark: var(--invoice-blue-dark);
  --navy: var(--invoice-navy);
  --brand-blue: var(--invoice-blue);
  --brand-orange: var(--invoice-orange);
  --brand-green: var(--invoice-green);
  --brand-green-dark: #158756;
  --brand-navy: var(--invoice-navy);
}

body { accent-color: var(--tenant-primary, var(--invoice-blue)); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline-color: rgba(22,119,255,.28); }

/* Application entry and tenant authentication */
.auth-intro { background: radial-gradient(circle at 8% 10%, rgba(22,119,255,.14), transparent 29%), radial-gradient(circle at 87% 12%, rgba(255,138,31,.13), transparent 25%), linear-gradient(135deg, #f4f9ff, #fff 48%, #f7faff); }
.auth-intro::after { border-color: rgba(22,119,255,.11); }
.auth-shell .eyebrow, .tenant-label { color: var(--tenant-primary, var(--invoice-blue)) !important; }
.auth-message h1 span { color: var(--tenant-primary, var(--invoice-blue)); }
.assurance-grid article > span, .app-symbol, .workspace-identity > span { background: linear-gradient(135deg, var(--tenant-primary, var(--invoice-blue)), var(--invoice-blue-dark)); }
.form-panel input:focus, .recovery-form input:not([type=hidden]):focus { border-color: var(--tenant-primary, var(--invoice-blue)); box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.primary-button, .login-button, .admin-form > button, .inline-form button, .audit-search button { background: linear-gradient(135deg, var(--tenant-primary, var(--invoice-blue)), var(--invoice-blue-dark)) !important; box-shadow: 0 9px 22px rgba(22,119,255,.2); }
.primary-button:hover, .login-button:hover { box-shadow: 0 12px 28px rgba(22,119,255,.27); }
.auth-note { border-color: #cfe0fa; color: #365f96; background: var(--invoice-blue-soft); }
.back-link:hover, .support-row a, .tenant-login .form-row a, .recovery-card .return-link:hover { color: #0755bd; }

/* Tenant workspace */
.tenant-sidebar { color: #dce8fb; background: radial-gradient(circle at 100% 0, rgba(22,119,255,.3), transparent 31%), linear-gradient(180deg, #0d2e63, var(--invoice-navy)); }
.tenant-brand { border-bottom-color: rgba(255,255,255,.14); }
.tenant-brand img { height: 70px; padding: 0; border-radius: 0; background: transparent; object-fit: contain; object-position: left center; }
.tenant-brand span { color: #a9bfdf; }
.tenant-sidebar nav p { color: #7f9cc5; }
.tenant-sidebar nav a { align-items: center; color: #d6e3f5; }
.tenant-sidebar nav a:hover, .tenant-sidebar nav a.active { color: #fff; background: linear-gradient(90deg, rgba(22,119,255,.4), rgba(22,119,255,.18)); box-shadow: inset 3px 0 var(--invoice-blue); }
.tenant-user button { border-color: #cfdded; color: #0b4fa9; background: var(--invoice-blue-soft); }
.welcome h1, .foundation-card h2, .foundation-grid strong { color: var(--invoice-navy); }

/* Standalone operations surfaces */
.platform-login { --green: var(--invoice-blue); --green-dark: var(--invoice-blue-dark); --navy: var(--invoice-navy); }
.platform-login .login-brand-panel { background: radial-gradient(circle at 15% 18%, rgba(22,119,255,.3), transparent 28%), radial-gradient(circle at 85% 82%, rgba(255,138,31,.2), transparent 32%), linear-gradient(145deg, var(--invoice-navy), #0d3268 62%, #0b4fb3); }
.platform-login .eyebrow { color: var(--invoice-gold); }
.platform-login .login-message h1 span { color: #77aaff; }
.platform-login .platform-mark, .platform-login .login-message li > span { background: linear-gradient(135deg, var(--invoice-blue), var(--invoice-blue-dark)); }
.admin-sidebar { background: linear-gradient(180deg, #0d2e63, var(--invoice-navy)); }

/* Public product surface: blue is primary; green remains a status accent. */
.navlinks a.active, .navlinks a:hover, .site-navlinks a:hover, .site-navlinks a.active { color: var(--invoice-blue); border-color: var(--invoice-blue); }
.site-navlinks a::after { background: var(--invoice-blue); }
h1 .green { color: var(--invoice-blue); }
.btn-primary, .site-demo, .btn-light { border-color: var(--invoice-blue); color: #fff; background: linear-gradient(135deg, var(--invoice-blue), var(--invoice-blue-dark)); box-shadow: 0 10px 24px rgba(22,119,255,.2); }
.cta-band { background: radial-gradient(circle at 20% -90%, rgba(255,255,255,.16), transparent 44%), radial-gradient(circle at 82% 170%, rgba(255,138,31,.16), transparent 42%), linear-gradient(110deg, var(--invoice-navy), #0d3268 58%, #0b4fb3); }
.public-footer { color: #dce8fb; border-top-color: var(--invoice-blue); background: linear-gradient(135deg, var(--invoice-navy), #0d3268); }
.public-footer a, .public-footer-grid > div:last-child p, .public-footer-brand > span:last-child, .public-footer-bottom { color: #b9cbea; }

@media (max-width: 700px) {
  .tenant-brand img { height: 46px; object-position: center; }
  .tenant-sidebar nav a { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-button:hover, .login-button:hover { transform: none; }
}
