/* QESTIT brand theme for Frappe HR v16 (desk + website/login pages).
   Brand: red #d50032 (hover #ad0028), navy #000811, grey #f7f7f7, font Poppins.
   Loaded through app_include_css / web_include_css in hooks.py. Rebuild the image after editing. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* html:root / html[data-theme] outrank Frappe's own :root rules, which load after this file */
html:root, html[data-theme=light], html[data-theme=dark] {
  --q-red: #d50032;
  --q-red-dark: #ad0028;
  --q-navy: #000811;
  --q-navy-2: #0a1424;
  --q-grey: #f7f7f7;

  --primary: var(--q-red);
  --btn-primary: var(--q-red);
  --font-stack: 'Poppins', "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --focus-default: 0 0 0 2px rgba(213, 0, 50, .35);
}
html[data-theme=light] { --sidebar-select-color: #fbe5ea; }
html[data-theme=dark]  { --sidebar-select-color: rgba(213, 0, 50, .25); }

body { font-family: var(--font-stack); }

/* Primary buttons: QESTIT red with white text, in light and dark mode */
.btn-primary, .btn.btn-primary, .btn-primary:not(:disabled):not(.disabled) {
  background-color: var(--q-red) !important;
  border-color: var(--q-red) !important;
  color: #fff !important;
  --icon-stroke: #fff;
  --icon-fill-bg: var(--q-red);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--q-red-dark) !important;
  border-color: var(--q-red-dark) !important;
  color: #fff !important;
}

/* v16 "espresso" buttons (login page, dialogs, new UI): solid variant in QESTIT red.
   Red/danger-themed buttons keep their own colours. */
.es-button:not([data-theme]):not(.btn-danger) {
  --bt-solid-bg: var(--q-red);
  --bt-solid-bg-hover: var(--q-red-dark);
  --bt-solid-bg-active: var(--q-red-dark);
  --bt-solid-fg: #fff;
}

/* Inputs: red focus ring */
.form-control:focus, .frappe-control input:focus, .frappe-control select:focus, .frappe-control textarea:focus {
  box-shadow: var(--focus-default) !important;
}
input[type=checkbox]:checked { background-color: var(--q-red); border-color: var(--q-red); }

/* Sidebar: red marker on the selected item */
.standard-sidebar-item.selected, .standard-sidebar-item.active-sidebar {
  box-shadow: inset 3px 0 0 var(--q-red);
}
.standard-sidebar-item.selected .item-anchor, .standard-sidebar-item.selected .sidebar-item-label {
  color: var(--q-red) !important;
}
[data-theme=dark] .standard-sidebar-item.selected .item-anchor,
[data-theme=dark] .standard-sidebar-item.selected .sidebar-item-label { color: #fff !important; }

/* Links inside content */
.ql-editor a, .markdown a, .web-page-content a, .page-card a:not(.btn) { color: var(--q-red); }

/* Website header (pages outside the desk) */
.navbar.navbar-light, .web-header .navbar { border-bottom: 3px solid var(--q-red); }

/* Login / signup / reset-password pages: QESTIT navy background with the brand shapes */
body[data-path="login"], body[data-path="update-password"], body[data-path="signup"] {
  background: var(--q-navy) url('/assets/qestit_branding/images/login-bg.svg') center / cover no-repeat fixed !important;
}
body[data-path="login"] .page-card, body[data-path="update-password"] .page-card {
  border-top: 4px solid var(--q-red);
}
body[data-path="login"] .page-card .app-logo, body[data-path="login"] .page-card-head img {
  content: url('/assets/qestit_branding/images/qestit-logo.svg');
  width: 220px !important; height: auto !important; max-height: none !important;
}
body[data-path="login"] .page-card-head h4 { color: var(--q-navy); font-weight: 600; }
[data-theme=dark] body[data-path="login"] .page-card-head h4 { color: #fff; }
@media (max-width: 576px) {
  body[data-path="login"] .page-card { border-top: 0; box-shadow: none; }
}
