* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #07111f;
  color: #f4f7fb;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #0b1728;
  border-right: 1px solid #1d3048;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.brand {
  padding: 0 10px 25px;
  border-bottom: 1px solid #1d3048;
  margin-bottom: 20px;
}

.brand h2 {
  margin: 0;
  font-size: 22px;
}

.brand small {
  opacity: .65;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

nav a {
  color: #cbd7e6;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
}

nav a:hover,
nav a.active {
  background: #172a42;
  color: white;
}

main {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 30px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

header h1 {
  margin: 0 0 5px;
}

header p {
  margin: 0;
  opacity: .65;
}

.language button {
  background: #172a42;
  color: white;
  border: 1px solid #29425f;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.card,
.panel {
  background: #0e1c2f;
  border: 1px solid #1c3049;
  border-radius: 12px;
}

.card {
  padding: 20px;
}

.card span {
  display: block;
  opacity: .7;
  margin-bottom: 10px;
}

.card strong {
  font-size: 30px;
}

.workspace {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title h2 {
  margin: 0 0 18px;
}

.panel-title span {
  font-size: 13px;
  opacity: .6;
}

.map-placeholder {
  min-height: 420px;
  border: 1px dashed #38516e;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #091624;
}

.map-placeholder h3 {
  margin-bottom: 5px;
}

.map-placeholder p {
  opacity: .65;
  max-width: 450px;
}

@media (max-width: 900px) {
  .sidebar {
    width: 200px;
  }

  main {
    margin-left: 200px;
    width: calc(100% - 200px);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  body {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
  }

  main {
    margin-left: 0;
    width: 100%;
    padding: 18px;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

/* VHF TECH - Expanded Manager Map */
#view-dashboard:has(.map-panel:not([style*="display: none"])) .workspace {
  grid-template-columns: minmax(0, 1fr);
}

#view-dashboard:has(.map-panel:not([style*="display: none"])) #vhf-map {
  height: 650px !important;
}

@media (max-width: 768px) {
  #view-dashboard:has(.map-panel:not([style*="display: none"])) #vhf-map {
    height: 450px !important;
  }
}

/* Hide GPS map on Technician Dashboard landing page only */
body:has(main header h1) #view-dashboard:has(.map-panel) {
  /* Map remains available through Map & Navigation */
}

body:has(main header h1) #view-dashboard .map-panel {
  /* Visibility will be controlled by the active technician view */
}


/* VHF CUSTOMER PAYMENTS 3D BUTTONS V1 */
#customer-payments-panel .pay-method {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 112px;
  max-width: 180px;
  min-height: 44px;
  padding: 11px 20px !important;
  margin: 5px;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  color: #fff !important;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 5px 0 #14233b, 0 9px 16px rgba(0,0,0,.35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

#customer-payments-panel #customer-pay-zelle {
  background: linear-gradient(180deg,#5188f0,#194ca7) !important;
}

#customer-payments-panel #customer-pay-cashapp {
  background: linear-gradient(180deg,#32d779,#087b3d) !important;
}

#customer-payments-panel #customer-pay-card {
  background: linear-gradient(180deg,#687b98,#30405b) !important;
}

#customer-payments-panel .pay-method:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 7px 0 #14233b, 0 12px 18px rgba(0,0,0,.4);
}

#customer-payments-panel .pay-method:not(:disabled):active,
#customer-payments-panel .pay-method.selected {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #14233b, 0 3px 8px rgba(0,0,0,.35);
}

#customer-payments-panel .pay-method:disabled {
  opacity: .55;
  cursor: not-allowed;
}

#customer-payments-panel button[id*="pay-now"] {
  width: auto !important;
  min-width: 140px;
  padding: 12px 25px !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg,#5298ff,#1750b5) !important;
  color: white !important;
  font-weight: 800;
  box-shadow: 0 5px 0 #10377b, 0 9px 16px rgba(0,0,0,.3);
}


/* VHF COMPACT 3D PAYMENT BUTTONS V2 */
.pay-method {
  width: 125px !important;
  height: 52px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 125px !important;
  padding: 10px 14px !important;
  margin: 4px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  text-align: center !important;
  white-space: nowrap;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 #12243e,
              0 9px 14px rgba(0,0,0,.32) !important;
}

.pay-method:not(:disabled):active,
.pay-method.selected {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #12243e,
              0 3px 7px rgba(0,0,0,.3) !important;
}


/* Manager Dashboard sidebar: allow all menu items to remain accessible */
body:has(#menu-reports) .sidebar {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}


/* VHF CONNECT BLUE AURORA V1 */

/* Windows 11 inspired dashboard background */
body:has(.sidebar) {
  background:
    radial-gradient(ellipse 58% 48% at 83% 18%,
      rgba(0,160,255,.37),transparent 75%),
    radial-gradient(ellipse 55% 60% at 12% 78%,
      rgba(24,95,245,.38),transparent 78%),
    linear-gradient(135deg,
      #061b39 0%,#093d70 45%,#082b58 75%,#04162f 100%)
    !important;
  background-attachment:fixed!important;
}

/* Aurora light waves */
body:has(.sidebar) main {
  position:relative;
  isolation:isolate;
  background:transparent!important;
}

body:has(.sidebar) main::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(ellipse 38% 24% at 73% 30%,
      rgba(57,195,255,.23),transparent 80%),
    radial-gradient(ellipse 30% 35% at 43% 82%,
      rgba(30,110,255,.20),transparent 80%);
  animation:vhfAuroraFlow 16s ease-in-out infinite alternate;
}

@keyframes vhfAuroraFlow {
  from {transform:translate3d(-2%,1%,0) scale(1);}
  to {transform:translate3d(2%,-2%,0) scale(1.07);}
}

@media (prefers-reduced-motion:reduce) {
  body:has(.sidebar) main::before {
    animation:none!important;
  }
}


/* VHF CONNECT PREMIUM 3D V1 */

/* Elegant three-dimensional dashboard cards */
body:has(.sidebar) .card,
body:has(.sidebar) .panel {
  border:1px solid rgba(108,193,255,.48);
  border-radius:16px;
  box-shadow:
    inset 0 1px 0 rgba(210,240,255,.22),
    inset 0 -2px 0 rgba(0,18,55,.38),
    0 5px 0 rgba(3,28,66,.60),
    0 13px 26px rgba(0,13,43,.30);
  transition:
    box-shadow .25s ease,
    transform .25s ease,
    border-color .25s ease;
}

@media (hover:hover) {
  body:has(.sidebar) .card:hover,
  body:has(.sidebar) .panel:hover {
    transform:translateY(-2px);
    border-color:rgba(120,215,255,.75);
    box-shadow:
      inset 0 1px 0 rgba(220,245,255,.32),
      0 7px 0 rgba(3,28,66,.50),
      0 17px 30px rgba(0,13,43,.36),
      0 0 16px rgba(0,145,255,.12);
  }
}

/* Premium 3D divider for the left navigation */
body:has(.sidebar) .sidebar {
  border-right:2px solid rgba(100,195,255,.58);
  box-shadow:
    inset -1px 0 0 rgba(210,240,255,.14),
    3px 0 0 rgba(0,30,75,.65),
    8px 0 22px rgba(0,12,42,.34);
}

/* Respect accessibility motion preferences */
@media (prefers-reduced-motion:reduce) {
  body:has(.sidebar) .card,
  body:has(.sidebar) .panel {
    transition:none!important;
  }
}


/* VHF CONNECT SOFT BLUE PANELS V1 */

/* Lighter left navigation */
body:has(.sidebar) .sidebar {
  background:linear-gradient(
    180deg,#164B7B 0%,#123D68 55%,#0D3156 100%
  )!important;
}

/* Lighter dashboard cards and panels */
body:has(.sidebar) .card,
body:has(.sidebar) .panel {
  background:linear-gradient(
    145deg,#195486 0%,#164A78 55%,#103C67 100%
  )!important;
  color:#f5faff;
}

/* Keep titles and values readable */
body:has(.sidebar) .card strong,
body:has(.sidebar) .panel h2 {
  color:#ffffff;
}
