/* Batrixa Africa skin for the Invoice Ninja React app (drata-bx-in).
 * Injected by nginx (sub_filter) into every HTML page, so no Invoice Ninja file
 * is modified and image upgrades keep it. Same selectors as Crystal's
 * invoiceninja/branding/branding.css (5.13.x markup) — if an upgrade changes
 * the markup, re-check both.
 * Brand: orange #FF4908, charcoal #1F1F1F, red #DC100D (Moto/brand/BRAND.md).
 */
:root {
  --bx-orange: #FF4908;
  --bx-orange-dark: #D93A02;
  --bx-ink: #1F1F1F;
  --bx-ink-2: #2B2B2B;
  --bx-muted: #6B7280;
  --bx-page: #F4F4F4;
  --bx-glass-edge: rgba(255, 255, 255, .14);
  --bx-glass-fill: rgba(255, 255, 255, .07);
}

/* ---------- Auth screens (login, password reset, register) ---------- */
.App > .min-h-screen.flex.flex-col.items-center.justify-center {
  background:
    linear-gradient(165deg, var(--bx-ink-2) 0%, var(--bx-ink) 100%) top / 100% 46% no-repeat,
    var(--bx-page) !important;
  position: relative;
}

/* orange rule where the charcoal band ends */
.App > .min-h-screen.flex.flex-col.items-center.justify-center::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 4px;
  background: var(--bx-orange);
}

/* Logo: Batrixa's instead of Invoice Ninja's, on a white panel */
.App > .min-h-screen img[alt="Invoice Ninja Logo"] {
  content: url("/batrixa/batrixa-logo-notag.png");
  height: 64px !important;
  width: auto;
}
.App > .min-h-screen > .flex.justify-center:first-child > a {
  background: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  display: inline-block;
}

/* Card */
.App > .min-h-screen .max-w-md.rounded {
  position: relative;
  z-index: 1;
  border: 0 !important;
  border-top: 5px solid var(--bx-orange) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18) !important;
}
.App > .min-h-screen .max-w-md h2 {
  color: var(--bx-ink) !important;
  font-weight: 700;
  letter-spacing: -.01em;
}
.App > .min-h-screen .max-w-md h2::after {
  content: "Batrixa Africa invoicing";
  display: block;
  font-size: .8rem;
  font-weight: 400;
  color: var(--bx-muted);
  margin-top: 2px;
}

/* Inputs */
.App > .min-h-screen .max-w-md input {
  border-color: #D1D5DB !important;
}
.App > .min-h-screen .max-w-md input:focus {
  border-color: var(--bx-orange) !important;
  box-shadow: 0 0 0 3px rgba(255, 73, 8, .15) !important;
}

/* Primary button */
.App > .min-h-screen .max-w-md button[type="submit"] {
  background-color: var(--bx-orange) !important;
  border-color: var(--bx-orange) !important;
  color: #fff !important;
  font-weight: 600;
  transition: background-color .15s;
}
.App > .min-h-screen .max-w-md button[type="submit"]:hover:not(:disabled) {
  background-color: var(--bx-orange-dark) !important;
}

/* Links on auth screens */
.App > .min-h-screen .max-w-md a,
.App > .min-h-screen .max-w-md + * a {
  color: var(--bx-orange-dark) !important;
}

/* Version line under the card */
.App > .min-h-screen p.mt-4.text-xs {
  position: relative;
  z-index: 1;
  color: var(--bx-muted);
}
.App > .min-h-screen p.mt-4.text-xs::after {
  content: " · batrixafrica.com";
}

/* ---------- Inside the app: the sidebar ----------
 * Charcoal panel with a faint orange glow at the bottom; the active item is an
 * orange bar with a light top edge. Selectors as in Crystal's skin. */
div:has(> div > nav[data-cy="navigationBar"]),
div:has(> nav[data-cy="navigationBar"]) {
  background:
    radial-gradient(130% 55% at 0% 0%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 60%),
    radial-gradient(120% 45% at 50% 105%, rgba(255, 73, 8, .25), rgba(255, 73, 8, 0) 65%),
    linear-gradient(180deg, #2E2E2E 0%, #1F1F1F 45%, #161616 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, .10) !important;
}

/* company switcher (top-left): the B mark instead of the round thumbnail */
img[alt="Company logo"] {
  content: url("/batrixa/batrixa-mark-white.png");
  border: 0 !important;
  border-radius: 0 !important;
  width: 2.1rem !important;
  object-fit: contain !important;
}
button[data-cy="companyDropdown"] span { color: #fff !important; font-weight: 600; }
button[data-cy="companyDropdown"] > div:hover { background: var(--bx-glass-fill) !important; }
div:has(> button[data-cy="companyDropdown"]) { border-color: var(--bx-glass-edge) !important; }

nav[data-cy="navigationBar"] a,
nav[data-cy="navigationBar"] svg {
  color: #fff !important;
}
nav[data-cy="navigationBar"] > div > div.text-gray-300 {
  background: transparent !important;
  border-left-color: transparent !important;
  transition: background-color .18s ease;
}
nav[data-cy="navigationBar"] > div > div.text-gray-300 a { opacity: .88; }
nav[data-cy="navigationBar"] > div > div.text-gray-300:hover { background: var(--bx-glass-fill) !important; }
nav[data-cy="navigationBar"] > div > div.text-gray-300:hover a { opacity: 1; }

nav[data-cy="navigationBar"] > div > div.text-white {
  background: linear-gradient(180deg, #FF6A33 0%, #FF4908 55%, #E63F05 100%) !important;
  border-left: 4px solid #fff !important;
  border-radius: 0 8px 8px 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 20px -8px rgba(255, 73, 8, .8);
}

/* Sidebar footer icons 1-3 point to Invoice Ninja's own support channels */
nav.border-t.justify-around > div.cursor-pointer:nth-child(-n+3) {
  display: none !important;
}
nav.border-t.justify-around {
  border-color: var(--bx-glass-edge) !important;
  justify-content: space-evenly !important;
}

@media (max-width: 480px) {
  .App > .min-h-screen .max-w-md { margin: 0 16px; width: auto; }
  .App > .min-h-screen img[alt="Invoice Ninja Logo"] { height: 48px !important; }
}
