/* MERIDIAN premium layer: loaded last on every page so it restyles the existing buttons and accents.
   Navy and gold from the deck; animated buttons stop for visitors who ask for reduced motion. */

:root {
  --pm-navy: #0d141c;
  --pm-navy-2: #1b2836;
  --pm-gold: #c9a24c;
  --pm-gold-2: #e8c877;
  --pm-gold-3: #f7e3a8;
  --pm-gold-grad: linear-gradient(115deg, #b98d34 0%, #e8c877 38%, #f7e3a8 50%, #e8c877 62%, #b98d34 100%);
  --pm-navy-grad: linear-gradient(135deg, #0d141c 0%, #1b2836 55%, #0d141c 100%);
  --pm-glow: 0 0 0 1px rgba(201, 162, 76, .45), 0 8px 28px rgba(201, 162, 76, .35);
  --pm-ease: cubic-bezier(.2, .8, .2, 1);
}

/* Workspace uses its own palette; bring it onto navy and gold. */
.app {
  --green: #0d141c;
  --green-soft: #f6efdd;
  --orange: #b98d34;
  --orange-soft: #f6efdd;
  --yellow: #e8c877;
  --blue: #1b2836;
}

/* Every button style the pages use. */
.btn,
.button-primary,
.button-secondary,
.button-quiet,
.desk-submit,
.preset,
.logout,
#joinForm button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: transform .25s var(--pm-ease), box-shadow .3s var(--pm-ease), background-position .6s var(--pm-ease), color .2s, border-color .2s;
  will-change: transform;
}

/* Light sweep that runs across a button. */
.btn::after,
.button-primary::after,
.button-secondary::after,
.desk-submit::after,
#joinForm button::after {
  content: "";
  position: absolute;
  inset: -2px auto -2px -60%;
  width: 45%;
  z-index: -1;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
}

/* Primary: navy with a gold edge, sweep and lift on hover. */
.btn,
.button-primary,
.desk-submit,
#joinForm button {
  background: var(--pm-navy-grad);
  background-size: 200% 100%;
  border: 1px solid rgba(201, 162, 76, .55);
  color: #fff;
  box-shadow: 0 6px 18px rgba(13, 20, 28, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.btn:hover,
.button-primary:hover,
.desk-submit:hover,
#joinForm button:hover {
  background: var(--pm-gold-grad);
  background-size: 220% 100%;
  background-position: 100% 0;
  border-color: var(--pm-gold-2);
  color: var(--pm-navy);
  transform: translateY(-2px);
  box-shadow: var(--pm-glow);
}

.btn:hover::after,
.button-primary:hover::after,
.button-secondary:hover::after,
.desk-submit:hover::after,
#joinForm button:hover::after {
  animation: pm-sweep .9s var(--pm-ease);
}

/* Gold call-to-action: always shimmering and breathing. */
.btn.gold,
.page-heading .button-primary,
.vacancy-controls .button-primary,
.btn[type="submit"],
.button-primary[type="submit"],
#joinForm button {
  background: var(--pm-gold-grad);
  background-size: 220% 100%;
  border-color: var(--pm-gold-2);
  color: var(--pm-navy);
  animation: pm-shimmer 4.5s linear infinite, pm-pulse 2.6s ease-in-out infinite;
}

.btn.gold::after,
.page-heading .button-primary::after,
.vacancy-controls .button-primary::after,
.btn[type="submit"]::after,
.button-primary[type="submit"]::after,
#joinForm button::after {
  animation: pm-sweep 3.2s var(--pm-ease) infinite;
}

.btn.gold:hover,
.page-heading .button-primary:hover,
.vacancy-controls .button-primary:hover,
.btn[type="submit"]:hover,
.button-primary[type="submit"]:hover,
#joinForm button:hover {
  background: var(--pm-navy-grad);
  color: var(--pm-gold-3);
  border-color: var(--pm-gold);
}

/* Ghost and secondary: hairline that lights up gold. */
.btn.ghost,
.button-secondary,
.button-quiet,
.preset,
.logout {
  background: rgba(255, 255, 255, .6);
  color: var(--pm-navy);
  border: 1px solid rgba(201, 162, 76, .35);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.btn.ghost:hover,
.button-secondary:hover,
.button-quiet:hover,
.preset:hover,
.logout:hover {
  background: #fffaf0;
  color: var(--pm-navy);
  border-color: var(--pm-gold);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(201, 162, 76, .18), 0 6px 18px rgba(201, 162, 76, .22);
}

.btn.ghost::after {
  background: linear-gradient(100deg, transparent 0%, rgba(232, 200, 119, .45) 50%, transparent 100%);
}

.btn:active,
.button-primary:active,
.button-secondary:active,
.button-quiet:active,
.desk-submit:active,
.preset:active,
.logout:active,
#joinForm button:active {
  transform: translateY(0) scale(.97);
  transition-duration: .08s;
}

.btn:focus-visible,
.button-primary:focus-visible,
.button-secondary:focus-visible,
.button-quiet:focus-visible,
.desk-submit:focus-visible,
.preset:focus-visible,
#joinForm button:focus-visible {
  outline: 2px solid var(--pm-gold-2);
  outline-offset: 3px;
}

.btn:disabled,
.button-primary:disabled,
.button-secondary:disabled,
.desk-submit:disabled,
#joinForm button:disabled {
  animation: none;
  transform: none;
  box-shadow: none;
  filter: grayscale(.4);
}

.btn:disabled::after,
.button-primary:disabled::after,
.button-secondary:disabled::after,
.desk-submit:disabled::after,
#joinForm button:disabled::after {
  animation: none;
}

/* Premium surfaces: gold hairline and soft depth on cards and inputs. */
.stat-card,
.agent-card,
.card,
.panel {
  transition: transform .3s var(--pm-ease), box-shadow .3s var(--pm-ease), border-color .3s;
}

.stat-card:hover,
.agent-card:hover,
.card:hover,
.panel:hover {
  border-color: rgba(201, 162, 76, .55);
  box-shadow: 0 14px 38px rgba(13, 20, 28, .1), 0 0 0 1px rgba(201, 162, 76, .25);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--pm-gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 162, 76, .2) !important;
  outline: none;
}

::selection {
  background: var(--pm-gold-3);
  color: var(--pm-navy);
}

@keyframes pm-sweep {
  from { left: -60%; }
  to { left: 130%; }
}

@keyframes pm-shimmer {
  from { background-position: 0% 0; }
  to { background-position: 220% 0; }
}

@keyframes pm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 76, .5), 0 6px 18px rgba(201, 162, 76, .25); }
  50% { box-shadow: 0 0 0 6px rgba(201, 162, 76, 0), 0 10px 30px rgba(201, 162, 76, .45); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
