.navbar-home {
  display: flex !important;
  align-items: center !important;
  min-width: 210px !important;
}

.mine-core-navbar-logo {
  display: block !important;
  height: 42px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  background: transparent !important;
}

.mine-core-login-logo {
  display: block !important;
  width: auto !important;
  max-width: 360px !important;
  max-height: 240px !important;
  object-fit: contain !important;
  margin: 0 auto 18px auto !important;
}

.mine-core-splash-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #ffffff;
}

.mine-core-splash-logo {
  display: block !important;
  width: min(68vw, 960px) !important;
  max-width: 960px !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: contain !important;
  margin: 0 auto 12px auto !important;
}

.mine-core-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mine-core-loader-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mine-core-loader-svg {
  width: min(70vw, 520px);
  height: auto;
}

.mine-core-loader-svg .mc-ground rect,
.mine-core-loader-svg .mc-excavator rect,
.mine-core-loader-svg .mc-excavator circle,
.mine-core-loader-svg .mc-excavator path,
.mine-core-loader-svg .mc-adt rect,
.mine-core-loader-svg .mc-adt circle,
.mine-core-loader-svg .mc-adt polygon {
  fill: #2d2d2d;
}

.mine-core-loader-svg .mc-load-group circle {
  fill: #4e4e4e;
}

.mine-core-loader-text {
  font-size: 14px;
  color: #4a4a4a;
  text-align: center;
}

.mc-arm-group {
  transform-origin: 112px 89px;
  animation: mc-arm-swing 2.4s ease-in-out infinite;
}

.mc-stick-group {
  transform-origin: 170px 84px;
  animation: mc-stick-swing 2.4s ease-in-out infinite;
}

.mc-bucket-group {
  transform-origin: 220px 88px;
  animation: mc-bucket-tip 2.4s ease-in-out infinite;
}

.mc-load-group {
  transform-origin: 232px 98px;
  animation: mc-load-drop 2.4s linear infinite;
}

@keyframes mc-arm-swing {
  0%, 100% { transform: rotate(-8deg); }
  25% { transform: rotate(18deg); }
  55% { transform: rotate(10deg); }
  75% { transform: rotate(-4deg); }
}

@keyframes mc-stick-swing {
  0%, 100% { transform: rotate(10deg); }
  25% { transform: rotate(-16deg); }
  55% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

@keyframes mc-bucket-tip {
  0%, 15%, 100% { transform: rotate(0deg); }
  35%, 55% { transform: rotate(38deg); }
  70% { transform: rotate(8deg); }
}

@keyframes mc-load-drop {
  0%, 28% {
    opacity: 0;
    transform: translate(0px, 0px);
  }
  35% {
    opacity: 1;
    transform: translate(0px, 0px);
  }
  60% {
    opacity: 1;
    transform: translate(105px, 18px);
  }
  75%, 100% {
    opacity: 0;
    transform: translate(112px, 26px);
  }
}

.mine-core-freeze-overlay {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(2px);
}

.mine-core-freeze-overlay .spinner-border,
.mine-core-freeze-overlay .freeze-message-container img,
.mine-core-freeze-overlay .freeze-message-container .loading-indicator {
  display: none !important;
}

.mine-core-freeze-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 20px 24px;
  z-index: 100000;
  min-width: 340px;
  max-width: 92vw;
}

.mine-core-freeze-panel .mine-core-loader-svg {
  width: min(60vw, 360px);
}

.mine-core-freeze-panel .mine-core-loader-text {
  margin-top: 6px;
}

#toolbar-help a[href*="frappe.io"],
#toolbar-help a[href*="frappeframework.com"],
#toolbar-help a[href*="discuss.frappe.io"],
#toolbar-help a[href*="github.com/frappe"] {
  display: none !important;
}

/* Mine Core server-rendered navbar logo */
.navbar-home img.app-logo,
.navbar-home img.mine-core-navbar-logo {
  display: block !important;
  height: 42px !important;
  width: auto !important;
  max-width: 220px !important;
  max-height: 42px !important;
  object-fit: contain !important;
}

/* Large Mine Core startup splash */
.splash img,
.splash img.mine-core-splash-logo {
  width: min(80vw, 1040px) !important;
  max-width: 1040px !important;
  height: auto !important;
  max-height: 336px !important;
  object-fit: contain !important;
}

/* Hide Frappe About entry if still supplied by Navbar Settings */
#toolbar-user [onclick*="frappe.ui.misc.about"] {
  display: none !important;
}


/* =========================================================
   MINE CORE BULK TIMESHEET LOADER
   ========================================================= */

.mc-timesheet-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1035;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(247, 249, 244, 0.94);
  backdrop-filter: blur(2px);
}

.mc-timesheet-loader-overlay.is-visible {
  display: flex;
}

.mc-timesheet-loader-card {
  width: min(680px, calc(100vw - 48px));
  padding: 28px 36px 26px;
  border: 1px solid #d7e1cf;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(24, 48, 28, 0.14);
  text-align: center;
}

.mc-timesheet-loader-svg {
  display: block;
  width: min(600px, 82vw);
  height: auto;
  margin: 0 auto 8px;
  overflow: visible;
}

.mc-loader-ground {
  stroke: #24432b;
  stroke-width: 7;
  stroke-linecap: round;
}

.mc-loader-excavator rect,
.mc-loader-excavator path,
.mc-loader-excavator circle,
.mc-loader-adt rect,
.mc-loader-adt path,
.mc-loader-adt circle {
  fill: #24432b;
}

.mc-loader-boom {
  transform-box: fill-box;
  transform-origin: left center;
  animation: mc-timesheet-boom 3.2s ease-in-out infinite;
}

.mc-loader-stick {
  transform-box: fill-box;
  transform-origin: left center;
  animation: mc-timesheet-stick 3.2s ease-in-out infinite;
}

.mc-loader-bucket {
  transform-box: fill-box;
  transform-origin: left center;
  animation: mc-timesheet-bucket 3.2s ease-in-out infinite;
}

.mc-loader-material {
  fill: #93af56;
  animation: mc-timesheet-material 3.2s ease-in-out infinite;
}

@keyframes mc-timesheet-boom {
  0%,
  100% {
    transform: rotate(-8deg);
  }

  30% {
    transform: rotate(20deg);
  }

  58% {
    transform: rotate(14deg);
  }

  82% {
    transform: rotate(-5deg);
  }
}

@keyframes mc-timesheet-stick {
  0%,
  100% {
    transform: rotate(12deg);
  }

  30% {
    transform: rotate(-18deg);
  }

  58% {
    transform: rotate(-10deg);
  }

  82% {
    transform: rotate(8deg);
  }
}

@keyframes mc-timesheet-bucket {
  0%,
  24%,
  100% {
    transform: rotate(0deg);
  }

  42%,
  58% {
    transform: rotate(52deg);
  }

  75% {
    transform: rotate(8deg);
  }
}

@keyframes mc-timesheet-material {
  0%,
  31% {
    opacity: 0;
    transform: translate(0, 0);
  }

  38% {
    opacity: 1;
    transform: translate(0, 0);
  }

  64% {
    opacity: 1;
    transform: translate(118px, 33px);
  }

  74%,
  100% {
    opacity: 0;
    transform: translate(128px, 44px);
  }
}

.mc-timesheet-loader-message {
  margin-top: 4px;
  color: #24432b;
  font-size: 17px;
  font-weight: 600;
}

.mc-timesheet-loader-note {
  margin-top: 5px;
  color: #687669;
  font-size: 13px;
}


/* =========================================================
   MINE CORE DESK PALETTE
   ========================================================= */

:root {
  --mine-core-green: #24432b;
  --mine-core-green-mid: #365e3d;
  --mine-core-accent: #93af56;
  --mine-core-pale: #f1f5ec;
  --mine-core-border: #d7e1cf;
  --mine-core-white: #ffffff;
}


/* Top header */

body .navbar.navbar-expand,
body .sticky-top > .navbar {
  background: var(--mine-core-pale) !important;
  border-bottom: 1px solid var(--mine-core-border) !important;
}

body .navbar .container {
  background: transparent !important;
}

body .navbar .nav-link,
body .navbar .btn-reset,
body .navbar #navbar-breadcrumbs,
body .navbar #navbar-breadcrumbs a {
  color: var(--mine-core-green) !important;
}

body .navbar .vertical-bar {
  border-color: var(--mine-core-border) !important;
}

body #navbar-search {
  background: var(--mine-core-white) !important;
  border: 1px solid var(--mine-core-border) !important;
}

body #navbar-search:focus {
  border-color: var(--mine-core-accent) !important;
  box-shadow: 0 0 0 2px rgba(147, 175, 86, 0.18) !important;
}


/* Desk / Workspace left sidebar */

body .layout-side-section {
  background: var(--mine-core-green) !important;
  border-radius: 0 14px 14px 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

body .layout-side-section .standard-sidebar,
body .layout-side-section .desk-sidebar {
  background: transparent !important;
}

body .layout-side-section .sidebar-label,
body .layout-side-section .sidebar-item-label,
body .layout-side-section .standard-sidebar-item,
body .layout-side-section .standard-sidebar-item a,
body .layout-side-section .desk-sidebar-item,
body .layout-side-section .desk-sidebar-item a {
  color: rgba(255, 255, 255, 0.92) !important;
}

body .layout-side-section svg {
  color: rgba(255, 255, 255, 0.88) !important;
  stroke: currentColor !important;
}

body .layout-side-section .standard-sidebar-item,
body .layout-side-section .desk-sidebar-item,
body .layout-side-section .sidebar-item-container {
  border-radius: 8px !important;
}

body .layout-side-section .standard-sidebar-item:hover,
body .layout-side-section .desk-sidebar-item:hover,
body .layout-side-section .sidebar-item-container:hover {
  background: rgba(255, 255, 255, 0.10) !important;
}

body .layout-side-section .standard-sidebar-item.selected,
body .layout-side-section .desk-sidebar-item.selected,
body .layout-side-section .sidebar-item-container.selected {
  background: var(--mine-core-accent) !important;
}

body .layout-side-section .standard-sidebar-item.selected *,
body .layout-side-section .desk-sidebar-item.selected *,
body .layout-side-section .sidebar-item-container.selected * {
  color: #17301d !important;
}


/* General Mine Core focus / primary touches */

body .btn-primary {
  background: var(--mine-core-green) !important;
  border-color: var(--mine-core-green) !important;
}

body .btn-primary:hover {
  background: var(--mine-core-green-mid) !important;
  border-color: var(--mine-core-green-mid) !important;
}

body a {
  accent-color: var(--mine-core-green);
}


/* =========================================================
   MINE CORE DESK COLOURS - DIRECT FRAPPE V15 TARGETS
   ========================================================= */

body header.navbar,
body header.navbar.navbar-expand,
body .sticky-top > header.navbar {
  background-color: #f1f5ec !important;
  border-bottom: 1px solid #d3dfca !important;
}

body header.navbar .nav-link,
body header.navbar .btn-reset,
body header.navbar #navbar-breadcrumbs a,
body header.navbar #navbar-breadcrumbs {
  color: #24432b !important;
}

body .page-head {
  background-color: #f7f9f4 !important;
  border-bottom-color: #d7e1cf !important;
}

body .page-head .title-text,
body .page-head .page-title {
  color: #24432b !important;
}

body .desk-sidebar,
body .standard-sidebar {
  background-color: #24432b !important;
  color: #ffffff !important;
}

body .desk-sidebar .sidebar-label,
body .desk-sidebar .sidebar-item-label,
body .desk-sidebar a,
body .standard-sidebar .sidebar-label,
body .standard-sidebar .sidebar-item-label,
body .standard-sidebar a {
  color: rgba(255, 255, 255, 0.92) !important;
}

body .desk-sidebar svg,
body .standard-sidebar svg {
  color: rgba(255, 255, 255, 0.90) !important;
  stroke: currentColor !important;
}

body .desk-sidebar .sidebar-item-container,
body .desk-sidebar .desk-sidebar-item,
body .standard-sidebar .sidebar-item-container,
body .standard-sidebar .standard-sidebar-item {
  border-radius: 8px !important;
}

body .desk-sidebar .sidebar-item-container:hover,
body .desk-sidebar .desk-sidebar-item:hover,
body .standard-sidebar .sidebar-item-container:hover,
body .standard-sidebar .standard-sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.10) !important;
}

body .desk-sidebar .selected,
body .standard-sidebar .selected {
  background-color: #93af56 !important;
}

body .desk-sidebar .selected *,
body .standard-sidebar .selected * {
  color: #17301d !important;
}


/* =========================================================
   MINE CORE WORKSPACE SHORTCUT TILES
   ========================================================= */

.shortcut-widget-box {
  position: relative !important;
  min-height: 112px !important;
  padding: 20px 22px 20px 26px !important;
  overflow: hidden !important;

  background: #ffffff !important;
  border: 1px solid #d7e1cf !important;
  border-radius: 16px !important;

  box-shadow:
    0 3px 10px rgba(36, 67, 43, 0.06),
    0 1px 2px rgba(36, 67, 43, 0.04) !important;

  cursor: pointer !important;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease !important;
}


/* Green Mine Core accent strip */

.shortcut-widget-box::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  width: 6px;

  background: #93af56;
}


/* Main internal layout */

.shortcut-widget-box .widget-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  min-height: 70px !important;
  margin: 0 !important;
  gap: 14px !important;
}


/* Shortcut title */

.shortcut-widget-box .widget-label {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.shortcut-widget-box .widget-title {
  margin: 0 !important;

  color: #24432b !important;

  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

.shortcut-widget-box .widget-title span {
  color: #24432b !important;
}


/* Optional subtitle support */

.shortcut-widget-box .widget-subtitle {
  margin-top: 7px !important;

  color: #6b786c !important;

  font-size: 12px !important;
  line-height: 1.4 !important;
}


/* Right-hand arrow / count */

.shortcut-widget-box .widget-control {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;

  flex: 0 0 auto !important;

  color: #24432b !important;
}

.shortcut-widget-box .widget-control svg {
  width: 17px !important;
  height: 17px !important;

  color: #24432b !important;
  stroke: currentColor !important;
}


/* Record count pill */

.shortcut-widget-box .indicator-pill {
  border: 0 !important;

  background: #eef4e8 !important;
  color: #365e3d !important;

  font-size: 11px !important;
  font-weight: 600 !important;
}


/* Hover */

.shortcut-widget-box:hover {
  transform: translateY(-3px) !important;

  background: #f9fbf7 !important;
  border-color: #93af56 !important;

  box-shadow:
    0 10px 24px rgba(36, 67, 43, 0.12),
    0 2px 5px rgba(36, 67, 43, 0.06) !important;
}

.shortcut-widget-box:hover::before {
  background: #6f913f;
}


/* Keyboard accessibility */

.shortcut-widget-box:focus-visible {
  outline: 3px solid rgba(147, 175, 86, 0.30) !important;
  outline-offset: 2px !important;

  border-color: #93af56 !important;
}


/* Pressed feel */

.shortcut-widget-box:active {
  transform: translateY(-1px) !important;

  box-shadow:
    0 4px 10px rgba(36, 67, 43, 0.10) !important;
}


/* Slightly tighter layout on smaller screens */

@media (max-width: 767px) {
  .shortcut-widget-box {
    min-height: 88px !important;

    padding: 16px 18px 16px 22px !important;

    border-radius: 13px !important;
  }

  .shortcut-widget-box .widget-head {
    min-height: 54px !important;
  }

  .shortcut-widget-box .widget-title {
    font-size: 15px !important;
  }
}


/* =========================================================
   MINE CORE EXCAVATOR GIF LOADER
   ========================================================= */

.mc-timesheet-loader-gif {
  display: block !important;
  width: min(78vw, 820px) !important;
  height: auto !important;
  max-height: 65vh !important;
  object-fit: contain !important;
  margin: 0 auto 12px !important;
}

.mine-core-loader-gif {
  display: block !important;
  width: min(70vw, 760px) !important;
  height: auto !important;
  max-height: 58vh !important;
  object-fit: contain !important;
  margin: 4px auto 10px !important;
}

.mc-timesheet-loader-card {
  width: min(920px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 40px) !important;
  overflow: hidden !important;
}


/* =========================================================
   MINE CORE DARK SIDEBAR CONTRAST
   Keep all text/icons readable on LOTUS green sidebars.
   ========================================================= */

body .layout-side-section,
body .form-sidebar {
    color: #eef5ec !important;
}

/* Main sidebar labels and links */
body .layout-side-section .sidebar-label,
body .layout-side-section .sidebar-menu a,
body .layout-side-section .form-sidebar a,
body .layout-side-section .form-sidebar .ellipsis,
body .layout-side-section .form-sidebar .form-sidebar-items,
body .layout-side-section .form-sidebar .form-sidebar-stats,
body .layout-side-section .form-sidebar .form-follow,
body .layout-side-section .form-sidebar .form-viewers,
body .layout-side-section .form-sidebar .form-assignments,
body .layout-side-section .form-sidebar .form-attachments,
body .layout-side-section .form-sidebar .form-shared,
body .layout-side-section .form-sidebar .form-tags {
    color: #eef5ec !important;
}

/* Frappe normally makes this text grey/dark — brighten it */
body .layout-side-section .text-muted,
body .layout-side-section small,
body .layout-side-section .modified-by,
body .layout-side-section .form-sidebar .text-muted {
    color: #c5d5c2 !important;
}

/* Sidebar icons */
body .layout-side-section .icon,
body .layout-side-section svg,
body .form-sidebar .icon,
body .form-sidebar svg {
    color: #e4efe1 !important;
}

/* Stronger hover / clickable state */
body .layout-side-section a:hover,
body .layout-side-section .sidebar-menu a:hover,
body .form-sidebar a:hover {
    color: #ffffff !important;
}

/* Counts / small secondary indicators */
body .layout-side-section .badge,
body .layout-side-section .count {
    color: #dce9d9 !important;
}

/*
   Do NOT turn filter inputs/buttons white-on-white.
   Inputs and normal controls remain dark text on a light surface.
*/
body .layout-side-section input,
body .layout-side-section textarea,
body .layout-side-section select,
body .layout-side-section .form-control,
body .layout-side-section .control-input,
body .layout-side-section .awesomplete > input {
    color: #24432b !important;
}

/* Light buttons/chips inside dark sidebar */
body .layout-side-section .btn-default {
    color: #24432b !important;
}

/* Mine Core 0.10.9: preserve the supplied logo proportions on each surface. */
.page-card-head img.app-logo,
.login-content img.app-logo,
.mine-core-login-logo {
  width: min(280px, 75vw) !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 240px !important;
  object-fit: contain !important;
}
.splash img.mine-core-splash-logo,
.mine-core-splash-logo {
  width: min(440px, 80vw) !important;
  max-width: 440px !important;
  height: auto !important;
  max-height: 336px !important;
  object-fit: contain !important;
}

/* Keep the horizontal logo clear of mobile navigation controls. */
@media (max-width: 575.98px) {
  .navbar-home {
    min-width: 0 !important;
  }
  .mine-core-navbar-logo {
    height: 32px !important;
    max-width: 160px !important;
  }
}
