/* ════════════════════════════════════════════════════════════════════
 * 📝 ICC Note (2026-04-26) — Спроба уніфікації "module top crown"
 * Була ідея винести спільний рецепт верхньої декоративної підсвітки
 * (drop-shadow на .hero-title-text.module-active + тонка горизонтальна
 * лінія + glow при .neon-active першої панелі) у main-style-adc.css
 * з var(--accent-*), щоб усі 7 модулів отримали однаковий ефект у
 * власному кольорі. Після кількох ітерацій з селекторами (:first-of-
 * type, > .adc-title + .adc-panel, .adc-card > .adc-panel:first-child)
 * та оновленням cache-bust ?v=… декоративна лінія так і не проявилась
 * на жодному з модулів. Прийнято рішення відкотити зміни і залишити
 * поточну реалізацію (sapphire shimmer animation Paymaster залишається
 * у цьому файлі без змін).
 * Деталі плану: C:\Users\shala\.claude\plans\breezy-discovering-lynx.md
 * ════════════════════════════════════════════════════════════════════ */

/* ============================================================
   PAYMASTER MODULE STYLES v2.0 / Sapphire
   Sapphire accent (#082567) on canonical purple-black theme
   Panels inherit from .adc-panel (main-style-adc.css)
   ============================================================ */


/* ============================================================
   1. MODULE ROOT VARIABLES — Paymaster Sapphire
   ============================================================ */

.module-paymaster {
  /* Sapphire accent */
  --module-accent:        #1a4d9a;
  --module-accent-light:  #2e6bc4;
  --module-accent-deep:   #082567;
  --module-accent-glow:   rgba(26, 77, 154, 0.4);
  --module-accent-soft:   rgba(26, 77, 154, 0.08);
  --module-accent-border: rgba(26, 77, 154, 0.18);
  --module-accent-hover:  rgba(26, 77, 154, 0.35);
  --module-accent-text:   #7ba3d9;

  /* Gold for financial amounts */
  --module-gold:          #FFD700;
  --module-gold-glow:     rgba(255, 215, 0, 0.25);
  --module-gold-soft:     rgba(255, 215, 0, 0.10);
  --module-gold-text:     rgba(255, 215, 0, 0.85);

  /* Status — use --color-success/warning/error from main */
}


/* ============================================================
   2. ACTIVE MENU ITEM — Sapphire
   ============================================================ */

.adc-sidebar .menu-item.active[data-module="paymaster"] {
  border-color: rgba(26, 77, 154, 0.7) !important;
  background: linear-gradient(180deg, rgba(26, 77, 154, 0.12), rgba(26, 77, 154, 0.04)) !important;
  box-shadow:
    0 4px 11px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(26, 77, 154, 0.35),
    inset 0 0 20px rgba(26, 77, 154, 0.12),
    inset 0 2px 0 rgba(26, 77, 154, 0.25) !important;
}

.adc-sidebar .menu-item.active[data-module="paymaster"]::before {
  background: linear-gradient(180deg, #1a4d9a, #082567) !important;
  box-shadow:
    0 0 12px #1a4d9a,
    0 0 20px rgba(26, 77, 154, 0.5) !important;
}

.adc-sidebar .menu-item.active[data-module="paymaster"] .menu-icon {
  filter:
    drop-shadow(0 0 1px rgba(26, 77, 154, 0.3))
    drop-shadow(0 0 3px rgba(26, 77, 154, 0.8)) !important;
}

.adc-sidebar .menu-item.active[data-module="paymaster"] .menu-text {
  color: #fff !important;
  text-shadow: 0 0 4px rgba(26, 77, 154, 0.7) !important;
}

/* SVG in sidebar menu */
.adc-sidebar .menu-item .menu-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}


/* ============================================================
   3. HERO SECTION — Sapphire Diamond
   ============================================================ */

/* Hero — no custom overrides, inherits from main-style-adc.css */

/* Title gradient */
.module-paymaster .hero-title-text.module-active {
  background: linear-gradient(
    90deg,
    #1a4d9a 0%,
    #2e6bc4 15%,
    #7ba3d9 30%,
    #e8c8f5 50%,
    #be86e6 70%,
    #9444d7 85%,
    #862ed2 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 16px rgba(26, 77, 154, 0.3));
  animation: hero-title-shimmer 4s ease-in-out infinite;
}

@keyframes hero-title-shimmer {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(26, 77, 154, 0.25)); }
  50%       { filter: drop-shadow(0 0 28px rgba(26, 77, 154, 0.5)); }
}

/* Module dimmed (вимкнений модуль) */
.paymaster-panel.module-dimmed {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.4);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Version badge */
.module-paymaster .hero-version-badge.neon-active {
  border-color: var(--module-accent);
  color: var(--module-accent-text);
  box-shadow:
    0 0 6px var(--module-accent-glow),
    inset 0 0 6px rgba(26, 77, 154, 0.06);
  background: rgba(26, 77, 154, 0.08);
}

/* Hero diamond icon */
.hero-icon.paymaster-diamond {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
  overflow: visible;
}

/* Sapphire glow base */
.hero-icon.paymaster-diamond::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(74, 158, 255, 0.9) 0%,
    rgba(26, 92, 173, 0.7) 30%,
    rgba(26, 77, 154, 0.3) 60%,
    transparent 80%
  );
  opacity: 0.25;
  filter: blur(18px);
  box-shadow: 0 0 40px rgba(74, 158, 255, 0.4);
  transition: all 0.6s ease;
  z-index: 0;
  pointer-events: none;
}

/* Active glow */
.hero-icon.paymaster-diamond:not(.module-off)::before {
  opacity: 0.65;
  width: 120px;
  height: 120px;
  filter: blur(25px);
  box-shadow:
    0 0 60px rgba(74, 158, 255, 0.7),
    0 0 100px rgba(26, 92, 173, 0.4),
    0 0 140px rgba(8, 37, 103, 0.25);
  animation: paymaster-sapphire-pulse 3s ease-in-out infinite;
}

@keyframes paymaster-sapphire-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

/* SVG diamond float */
.hero-icon.paymaster-diamond svg {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
  animation: diamond-float 3s ease-in-out infinite;
}

@keyframes diamond-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}


/* ============================================================
   4. SECTION HEADER ACCENT — Sapphire left border
   ============================================================ */

.module-paymaster .section-header-accent {
  background: linear-gradient(180deg, var(--module-accent-light), var(--module-accent));
  box-shadow: 0 0 8px var(--module-accent-glow);
}

.module-paymaster .section-icon {
  color: var(--module-accent);
  filter: drop-shadow(0 0 3px rgba(26, 77, 154, 0.3));
}

.paymaster-panel:hover .section-header-accent {
  box-shadow: 0 0 12px var(--module-accent-glow), 0 0 4px var(--module-accent);
  transition: box-shadow 0.3s ease;
}


/* ============================================================
   5. PAYMASTER-PANEL — Inherits .adc-panel + sapphire accents
   ============================================================ */

.paymaster-panel {
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  transition:
    border-color 0.3s ease,
    box-shadow 0.35s ease;
}

/* Top sapphire glint on hover */
.paymaster-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 10%,
    rgba(26, 77, 154, 0.25) 40%,
    rgba(46, 107, 196, 0.4) 50%,
    rgba(26, 77, 154, 0.25) 60%,
    transparent 90%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.paymaster-panel:hover {
  border-color: var(--module-accent-hover);
}

.paymaster-panel:hover::before {
  opacity: 1;
}

/* Config panel — neon ON (module enabled) */
#panel-config.neon-active {
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 3px 0 rgba(26, 77, 154, 0.9),
    0 -5px 20px rgba(26, 77, 154, 0.3);
}


/* ============================================================
   6. PM-CATEGORY-CHIP — Subtle sapphire category labels
   ============================================================ */

.pm-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
  user-select: none;
}

.pm-category-chip:hover {
  transform: translateY(-1px);
}

/* All chips use sapphire base, functional colors only for special types */

.pm-chip--channels {
  color: var(--module-accent-text);
  background: var(--module-accent-soft);
  box-shadow: 0 0 6px rgba(26, 77, 154, 0.15);
}
.pm-chip--channels:hover {
  box-shadow: 0 0 12px rgba(26, 77, 154, 0.3);
}

.pm-chip--taxes {
  color: #e07070;
  background: rgba(224, 112, 112, 0.08);
  box-shadow: 0 0 6px rgba(224, 112, 112, 0.12);
}
.pm-chip--taxes:hover {
  box-shadow: 0 0 12px rgba(224, 112, 112, 0.25);
}

.pm-chip--priorities {
  color: #d4a545;
  background: rgba(212, 165, 69, 0.08);
  box-shadow: 0 0 6px rgba(212, 165, 69, 0.12);
}
.pm-chip--priorities:hover {
  box-shadow: 0 0 12px rgba(212, 165, 69, 0.25);
}

.pm-chip--directions {
  color: var(--module-accent-text);
  background: var(--module-accent-soft);
  box-shadow: 0 0 6px rgba(26, 77, 154, 0.15);
}
.pm-chip--directions:hover {
  box-shadow: 0 0 12px rgba(26, 77, 154, 0.3);
}

.pm-chip--modifiers {
  color: #6db88a;
  background: rgba(109, 184, 138, 0.08);
  box-shadow: 0 0 6px rgba(109, 184, 138, 0.12);
}
.pm-chip--modifiers:hover {
  box-shadow: 0 0 12px rgba(109, 184, 138, 0.25);
}

.pm-chip--bonus {
  color: #c87a8a;
  background: rgba(200, 122, 138, 0.08);
  box-shadow: 0 0 6px rgba(200, 122, 138, 0.12);
}
.pm-chip--bonus:hover {
  box-shadow: 0 0 12px rgba(200, 122, 138, 0.25);
}

.pm-chip--thresholds {
  color: #c4b060;
  background: rgba(196, 176, 96, 0.08);
  box-shadow: 0 0 6px rgba(196, 176, 96, 0.12);
}
.pm-chip--thresholds:hover {
  box-shadow: 0 0 12px rgba(196, 176, 96, 0.25);
}

.pm-chip--audit {
  color: #9890c8;
  background: rgba(152, 144, 200, 0.08);
  box-shadow: 0 0 6px rgba(152, 144, 200, 0.12);
}
.pm-chip--audit:hover {
  box-shadow: 0 0 12px rgba(152, 144, 200, 0.25);
}


/* ============================================================
   7. TAXES GRID — Muted red cards
   ============================================================ */

.taxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tax-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(224, 112, 112, 0.1);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tax-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(224, 112, 112, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tax-card:hover {
  border-color: rgba(224, 112, 112, 0.25);
  background: rgba(224, 112, 112, 0.03);
  box-shadow:
    0 0 12px rgba(224, 112, 112, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.tax-card:hover::before {
  opacity: 1;
}

.tax-card.disabled {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.tax-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tax-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e07070;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tax-amount {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--module-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.tax-daily {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.03em;
}


/* ============================================================
   8. PRIORITIES LIST — Muted amber rows
   ============================================================ */

.priorities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.priority-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(212, 165, 69, 0.03);
  border: 1px solid rgba(212, 165, 69, 0.08);
  border-radius: 9px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease;
  position: relative;
}

.priority-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: rgba(212, 165, 69, 0.25);
  border-radius: 0 3px 3px 0;
  transition: height 0.2s ease, background 0.2s ease;
}

.priority-row:hover {
  background: rgba(212, 165, 69, 0.06);
  border-color: rgba(212, 165, 69, 0.2);
  box-shadow: 0 0 10px rgba(212, 165, 69, 0.08), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.priority-row:hover::before {
  background: rgba(212, 165, 69, 0.55);
  height: 75%;
}

.priority-row.disabled {
  opacity: 0.45;
}

.priority-name {
  flex: 1;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
}

.priority-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--module-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  min-width: 90px;
  text-align: right;
}

.priority-deadline {
  font-size: 0.75rem;
  color: rgba(212, 165, 69, 0.5);
  min-width: 80px;
}


/* ============================================================
   9. DIRECTIONS — Sapphire rows
   ============================================================ */

.directions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.direction-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(26, 77, 154, 0.03);
  border: 1px solid rgba(26, 77, 154, 0.08);
  border-radius: 9px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease;
}

.direction-row:hover {
  background: rgba(26, 77, 154, 0.06);
  border-color: rgba(26, 77, 154, 0.2);
  box-shadow: 0 0 10px rgba(26, 77, 154, 0.08), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.direction-row.disabled {
  opacity: 0.45;
}

.direction-name {
  flex: 1;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
}

.direction-percent-input {
  width: 70px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(26, 77, 154, 0.18);
  border-radius: 7px;
  color: var(--module-gold);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  padding: 5px 8px;
  outline: none;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.direction-percent-input:focus {
  border-color: rgba(26, 77, 154, 0.5);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 6px rgba(26, 77, 154, 0.15);
}

/* Balance indicator */
.directions-balance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 9px;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.directions-balance.valid {
  background: rgba(46, 204, 113, 0.06);
  border: 1px solid rgba(46, 204, 113, 0.2);
  color: var(--color-success); /* task-086: SSOT замість #2ecc71 */
}

.directions-balance.invalid {
  background: rgba(255, 77, 79, 0.06);
  border: 1px solid rgba(255, 77, 79, 0.2);
  color: var(--color-error); /* task-086: SSOT замість #ff4d4f */
}


/* ============================================================
   10. MODIFIERS TABLE — Sapphire
   ============================================================ */

/* 2-колонковий layout для модифікаторів */
.mod-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.mod-col {
  min-width: 0;
}

.mod-section-compact {
  max-width: 600px;
}

.mod-block {
  margin-top: 16px;
}

.mod-block:first-child {
  margin-top: 0;
}

.mod-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mod-toggle-label {
  font-size: 0.8rem;
  color: var(--module-accent-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mod-difficulty-cells {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mod-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

.modifiers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.modifiers-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--module-accent-text);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-bottom: 1px solid rgba(26, 77, 154, 0.12);
  background: rgba(26, 77, 154, 0.04);
}

.modifiers-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.modifiers-table tr:last-child td {
  border-bottom: none;
}

.modifiers-table tr:hover td {
  background: rgba(26, 77, 154, 0.03);
}

.modifier-value-input {
  width: 80px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(109, 184, 138, 0.18);
  border-radius: 7px;
  color: var(--module-gold);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: center;
  padding: 5px 8px;
  outline: none;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.modifier-value-input:focus {
  border-color: rgba(109, 184, 138, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 6px rgba(109, 184, 138, 0.15);
}

/* Rank modifier grid */
.rank-modifiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.rank-modifier-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: rgba(26, 77, 154, 0.03);
  border: 1px solid rgba(26, 77, 154, 0.08);
  border-radius: 9px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.rank-modifier-cell:hover {
  border-color: rgba(26, 77, 154, 0.2);
  background: rgba(26, 77, 154, 0.06);
  box-shadow: 0 0 8px rgba(26, 77, 154, 0.08);
}

.rank-label {
  font-size: 0.7rem;
  color: var(--module-accent-text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}


/* ============================================================
   11. BONUS WEEK
   ============================================================ */

/* 🔧 pay-109: .bonus-week-grid видалено — клас не використовується в HTML (мертвий CSS) */

.bonus-week-active {
  border-color: rgba(200, 122, 138, 0.35) !important;
  background: rgba(200, 122, 138, 0.04) !important;
  box-shadow:
    0 0 15px rgba(200, 122, 138, 0.1),
    inset 0 1px 0 rgba(200, 122, 138, 0.06) !important;
}

#panel-bonus-week.bonus-week-active {
  border-color: rgba(200, 122, 138, 0.3) !important;
  box-shadow:
    0 0 20px rgba(200, 122, 138, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.45) !important;
}


/* ============================================================
   12. AUDIT LOG TABLE
   ============================================================ */

.audit-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid rgba(152, 144, 200, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.audit-table th {
  padding: 9px 14px;
  background: rgba(152, 144, 200, 0.05);
  color: #9890c8;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  text-align: left;
  border-bottom: 1px solid rgba(152, 144, 200, 0.1);
  white-space: nowrap;
}

.audit-table td {
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.audit-table tr:last-child td {
  border-bottom: none;
}

.audit-table tr:hover td {
  background: rgba(152, 144, 200, 0.04);
}

/* Audit action badges */
.audit-action-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
}

.audit-action-badge.taxes_paid {
  color: #6db88a;
  background: rgba(109, 184, 138, 0.08);
}

.audit-action-badge.direction_confirmed {
  color: var(--module-accent-text);
  background: var(--module-accent-soft);
}

.audit-action-badge.direction_skipped {
  color: #d4a545;
  background: rgba(212, 165, 69, 0.08);
}

.audit-action-badge.payment_notified {
  color: #9890c8;
  background: rgba(152, 144, 200, 0.08);
}

.audit-action-badge.report_published {
  color: var(--module-gold-text);
  background: var(--module-gold-soft);
}

.audit-action-badge.week_closed {
  color: #e07070;
  background: rgba(224, 112, 112, 0.08);
}

/* Audit pagination */
.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}


/* ============================================================
   13. AUDIT FILTERS — Sapphire inputs
   ============================================================ */

.audit-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
}

.audit-filter-select,
.audit-filter-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(26, 77, 154, 0.18);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.audit-filter-select:focus,
.audit-filter-input:focus {
  border-color: rgba(26, 77, 154, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 6px rgba(26, 77, 154, 0.12);
}

.audit-filter-select option {
  background: var(--bg-panel, #0d0b11);
  color: rgba(255, 255, 255, 0.85);
}


/* ============================================================
   14. ADD ITEM FORM — Dashed sapphire border
   ============================================================ */

.add-item-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 14px;
  background: rgba(26, 77, 154, 0.02);
  border: 1px dashed rgba(26, 77, 154, 0.15);
  border-radius: 9px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.add-item-form:hover {
  border-color: rgba(26, 77, 154, 0.28);
  background: rgba(26, 77, 154, 0.04);
}

.add-item-form .form-input {
  flex: 1;
  min-width: 120px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(26, 77, 154, 0.15);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 7px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.add-item-form .form-input:focus {
  border-color: rgba(26, 77, 154, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 6px rgba(26, 77, 154, 0.12);
}

.add-item-form .form-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}


/* ============================================================
   15. BTN-SAPPHIRE — Primary button
   ============================================================ */

.btn-sapphire {
  background: linear-gradient(135deg, #1a4d9a 0%, #082567 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition:
    opacity 0.15s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.btn-sapphire::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.4s ease;
}

.btn-sapphire:hover {
  box-shadow:
    0 0 14px rgba(26, 77, 154, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn-sapphire:hover::before {
  left: 100%;
}

.btn-sapphire:active {
  opacity: 0.82;
  transform: translateY(0);
  box-shadow: 0 0 6px rgba(26, 77, 154, 0.25);
}

.btn-sapphire:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ============================================================
   16. BTN-REMOVE — Red danger button
   ============================================================ */

.btn-remove {
  background: rgba(224, 112, 112, 0.06);
  border: 1px solid rgba(224, 112, 112, 0.2);
  border-radius: 7px;
  color: #e07070;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 4px 10px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  flex-shrink: 0;
}

.btn-remove:hover {
  background: rgba(224, 112, 112, 0.12);
  border-color: rgba(224, 112, 112, 0.4);
  box-shadow: 0 0 6px rgba(224, 112, 112, 0.15);
}

.btn-remove:active {
  background: rgba(224, 112, 112, 0.2);
}


/* ============================================================
   17. FORM ELEMENTS — Canonical inputs
   ============================================================ */

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.77rem;
  color: var(--module-accent-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.form-control {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(26, 77, 154, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-control:focus {
  border-color: rgba(26, 77, 154, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(26, 77, 154, 0.12);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-control option {
  background: var(--bg-panel, #0d0b11);
  color: rgba(255, 255, 255, 0.88);
}

/* Helper text */
.form-group > span {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.4;
}


/* ============================================================
   18. SAVE ROW — Bottom action row
   ============================================================ */

.save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(26, 77, 154, 0.08);
}


/* ============================================================
   19. STATS ROW — Stat chips
   ============================================================ */

.pm-stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  background: rgba(26, 77, 154, 0.04);
  border: 1px solid rgba(26, 77, 154, 0.1);
  border-radius: 10px;
  min-width: 100px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.stat-chip:hover {
  border-color: rgba(26, 77, 154, 0.22);
  box-shadow: 0 0 8px rgba(26, 77, 154, 0.08);
}

.stat-chip-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--module-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
  line-height: 1.2;
}

.stat-chip-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}


/* ============================================================
   20. TAXES TOTALS ROW — Gold summary bar
   ============================================================ */

.taxes-totals-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--module-gold-soft);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 9px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.taxes-totals-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.taxes-total-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.taxes-total-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.taxes-total-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--module-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}


/* ============================================================
   21. TOGGLE SWITCH — Sapphire ON state
   ============================================================ */

.module-paymaster .toggle-track {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.module-paymaster input:checked + .toggle-track {
  background: var(--module-accent);
  box-shadow:
    0 0 8px rgba(26, 77, 154, 0.5),
    0 0 16px rgba(26, 77, 154, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}


/* ============================================================
   22. LATE JOIN TIERS
   ============================================================ */

.tiers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(26, 77, 154, 0.02);
  border: 1px solid rgba(26, 77, 154, 0.06);
  border-radius: 7px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.68);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tier-row:hover {
  border-color: rgba(26, 77, 154, 0.15);
  background: rgba(26, 77, 154, 0.05);
}

.tier-row .tier-label {
  flex: 1;
}

.tier-row .tier-badge {
  background: rgba(224, 112, 112, 0.08);
  color: #e07070;
  border: 1px solid rgba(224, 112, 112, 0.18);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
}


/* ============================================================
   23. SECTION TITLE
   ============================================================ */

.module-paymaster .adc-section-title {
  color: rgba(255, 255, 255, 0.92);
}

.module-paymaster .adc-section-title .section-icon {
  color: var(--module-accent);
}


/* ============================================================
   24. SCROLLBAR & MONO FONTS
   ============================================================ */

.audit-table-wrap::-webkit-scrollbar {
  height: 4px;
}

.audit-table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.audit-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(26, 77, 154, 0.25);
  border-radius: 2px;
}

.audit-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 77, 154, 0.45);
}

/* Mono for numbers */
.priority-amount,
.tax-amount,
.taxes-total-value,
.stat-chip-value {
  font-family: var(--font-mono);
}

.direction-percent-input,
.modifier-value-input {
  font-family: var(--font-mono);
}


/* ============================================================
   24b. SMART-FIELD — Discord entity resolve (Sapphire)
   ============================================================ */

.module-paymaster .smart-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.module-paymaster .smart-field-label {
  font-size: 0.78rem;
  color: var(--module-accent-text);
  white-space: nowrap;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(26, 77, 154, 0.15);
}

.module-paymaster .smart-field-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.module-paymaster .smart-field-input::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  margin-right: 8px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.module-paymaster .smart-field.valid .smart-field-input::before {
  background: var(--color-success, #2ecc71); /* 🔧 pay-192: SSOT замість hardcoded */
  box-shadow: 0 0 8px var(--color-success, #2ecc71);
}

.module-paymaster .smart-field.invalid .smart-field-input::before {
  background: var(--color-error, #ff4d4f); /* 🔧 pay-192: SSOT замість hardcoded */
  box-shadow: 0 0 8px var(--color-error, #ff4d4f);
  animation: pm-led-error 1s ease-in-out infinite;
}

.module-paymaster .smart-field.loading .smart-field-input::before {
  background: var(--color-warning, #f59e0b); /* 🔧 pay-192: SSOT замість hardcoded */
  box-shadow: 0 0 6px var(--color-warning, #f59e0b);
  animation: pm-led-loading 0.8s ease-in-out infinite;
}

@keyframes pm-led-error {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pm-led-loading {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.module-paymaster .smart-field-input input {
  flex: 1;
  padding: 10px 12px;
  padding-right: 150px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(26, 77, 154, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.module-paymaster .smart-field-input input:focus {
  border-color: rgba(26, 77, 154, 0.5);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(26, 77, 154, 0.15);
}

.module-paymaster .smart-field-input input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-family: inherit;
}

.module-paymaster .smart-field-result {
  position: absolute;
  right: 10px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(26, 77, 154, 0.2), rgba(26, 77, 154, 0.08));
  border-radius: 6px;
  border: 1px solid rgba(26, 77, 154, 0.3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--module-accent-text);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(26, 77, 154, 0.15);
}

.module-paymaster .smart-field.valid .smart-field-result {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.22), rgba(46, 204, 113, 0.12));
  border-color: rgba(46, 204, 113, 0.4);
  color: #6ee7b7;
  box-shadow: 0 2px 12px rgba(46, 204, 113, 0.2);
}

.module-paymaster .smart-field.invalid .smart-field-result {
  background: linear-gradient(135deg, rgba(255, 77, 79, 0.22), rgba(255, 77, 79, 0.12));
  border-color: rgba(255, 77, 79, 0.4);
  color: #ff9b9d;
  box-shadow: 0 2px 12px rgba(255, 77, 79, 0.2);
}

.module-paymaster .smart-field.loading .smart-field-result {
  opacity: 0.6;
  animation: pm-field-pulse 1.5s ease-in-out infinite;
}

@keyframes pm-field-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.module-paymaster .smart-field-input input:focus + .smart-field-result {
  opacity: 0.3;
  transform: translateX(5px);
}

/* Channel fields — sapphire accent */
.module-paymaster #field-finance .smart-field-result,
.module-paymaster #field-treasury .smart-field-result {
  background: linear-gradient(135deg, rgba(26, 77, 154, 0.22), rgba(26, 77, 154, 0.1));
  border-color: rgba(26, 77, 154, 0.35);
  color: var(--module-accent-text);
}

/* Role field — purple accent */
.module-paymaster #field-treasurer .smart-field-result {
  background: linear-gradient(135deg, rgba(155, 92, 255, 0.18), rgba(155, 92, 255, 0.08));
  border-color: rgba(155, 92, 255, 0.3);
  color: #d4b8ff;
}

/* Empty state */
.module-paymaster .smart-field.empty .smart-field-result {
  background: linear-gradient(135deg, rgba(120, 120, 120, 0.12), rgba(120, 120, 120, 0.06));
  border-color: rgba(120, 120, 120, 0.25);
  color: rgba(180, 180, 180, 0.7);
}


/* ============================================================
   24c. CONFIG TABS (Sapphire)
   ============================================================ */

.paymaster-panel > .config-tabs,
.paymaster-panel > .config-tab-content,
.paymaster-panel > .config-save-row,
.paymaster-panel > .save-row {
  margin-left: 26px;
  margin-right: 26px;
}

.paymaster-panel > *:last-child {
  margin-bottom: 26px;
}

.paymaster-panel .config-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  flex-wrap: wrap;
}

.paymaster-panel .config-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 0;
}

.paymaster-panel .config-tab .tab-icon {
  font-size: 17px;
  flex-shrink: 0;
}

.paymaster-panel .config-tab .tab-text {
  font-size: 12.5px;
}

.paymaster-panel .config-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.paymaster-panel .config-tab.active {
  background: rgba(26, 77, 154, 0.2);
  border-color: rgba(74, 158, 255, 0.3);
  color: var(--module-accent-text, #7ba3d9);
}

.paymaster-panel .config-tab.active .tab-icon {
  color: var(--module-accent, #4a9eff);
}

.paymaster-panel .config-tab-content {
  position: relative;
}

.paymaster-panel .tab-pane {
  display: none;
}

.paymaster-panel .tab-pane.active {
  display: block;
}


/* ============================================================
   25. EMBED PREVIEW
   ============================================================ */

.embed-preview-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 700;
}

.embed-preview-card {
  background: rgba(0, 0, 0, 0.3);
  border-left: 4px solid #1a4d9a;
  border-radius: 4px;
  padding: 14px 16px;
  max-width: 460px;
  transition: border-color 0.2s ease;
}

.embed-preview-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 6px;
}

.embed-preview-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  line-height: 1.5;
}

.embed-preview-footer {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}


/* ============================================================
   26. TREASURY BUTTONS LIST
   ============================================================ */

.treasury-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.treasury-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(26, 77, 154, 0.03);
  border: 1px solid rgba(26, 77, 154, 0.08);
  border-radius: 9px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.treasury-btn-row:hover {
  border-color: rgba(26, 77, 154, 0.18);
  background: rgba(26, 77, 154, 0.06);
}

.treasury-btn-label {
  flex: 1;
  font-size: 0.85rem !important;
  padding: 6px 10px !important;
}

.treasury-btn-key {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-mono);
  min-width: 140px;
  text-align: right;
}


/* ============================================================
   27. ANALYTICS — Top Recipients
   ============================================================ */

.analytics-recipient-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.analytics-recipient-rank {
  font-size: 0.75rem;
  color: var(--module-accent-text);
  font-weight: 700;
  min-width: 28px;
}

.analytics-recipient-name {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  min-width: 120px;
}

.analytics-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(26, 77, 154, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.analytics-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--module-accent), var(--module-accent-light));
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(26, 77, 154, 0.3);
}

.analytics-recipient-amount {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--module-gold);
  font-family: var(--font-mono);
  min-width: 90px;
  text-align: right;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}


/* ============================================================
   28. RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .mod-two-columns {
    grid-template-columns: 1fr;
  }

  .taxes-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .rank-modifiers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* .bonus-week-grid видалено — pay-109 */

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .audit-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-filter-select,
  .audit-filter-input {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .paymaster-panel {
    padding: 16px;
  }

  .taxes-grid {
    grid-template-columns: 1fr;
  }

  .rank-modifiers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .add-item-form {
    flex-direction: column;
    align-items: stretch;
  }

  .add-item-form .form-input {
    width: 100%;
  }

  .pm-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .taxes-totals-row {
    flex-direction: column;
    gap: 10px;
  }

  .priority-row,
  .direction-row {
    flex-wrap: wrap;
  }

  .priority-amount {
    min-width: auto;
  }
}


/* ============================================================
   НОВІ СЕКЦІЇ: Поточний тиждень, Архів, User Lookup,
                Influence Levels, Калькулятор, Форматування сум
   ============================================================ */

/* --- Week ID badge у заголовку --- */
.module-paymaster .pm-week-id-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(26, 77, 154, 0.25);
  border: 1px solid rgba(26, 77, 154, 0.4);
  font-size: 0.75rem;
  color: var(--module-accent-text);
  font-weight: 600;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* --- Summary картки поточного тижня --- */
.module-paymaster .cw-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 14px;
}

.module-paymaster .cw-stat-card {
  flex: 1;
  min-width: 120px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(26, 77, 154, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-paymaster .cw-stat-label {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-paymaster .cw-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.module-paymaster .cw-stat-value.gold {
  color: var(--module-gold);
}

.module-paymaster .cw-taxes-status.paid .cw-stat-value   { color: #4cdb8f; }
.module-paymaster .cw-taxes-status.unpaid .cw-stat-value { color: rgba(255, 200, 60, 0.9); }

/* --- Попередження --- */
.module-paymaster .cw-warning-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.25);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 0.83rem;
  color: rgba(255, 200, 80, 0.9);
  margin-bottom: 6px;
}

/* --- Блок-заголовок підсекцій --- */
.module-paymaster .cw-block-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--module-accent-text);
  margin: 4px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-paymaster .cw-participants-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* --- Напрямки --- */
.module-paymaster .cw-directions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-paymaster .cw-direction-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(26, 77, 154, 0.15);
  border-radius: 8px;
  flex-wrap: wrap;
}

.module-paymaster .cw-dir-name    { flex: 1; font-size: 0.88rem; font-weight: 600; }
.module-paymaster .cw-dir-percent { font-size: 0.78rem; color: rgba(255,255,255,0.45); min-width: 36px; }
.module-paymaster .cw-dir-amount  { font-size: 0.88rem; font-weight: 700; color: var(--module-gold); min-width: 90px; }

.module-paymaster .cw-dir-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.module-paymaster .status-pending   { background: rgba(255,170,0,0.15); color: rgba(255,200,60,0.9); }
.module-paymaster .status-confirmed { background: rgba(76,219,143,0.15); color: #4cdb8f; }
.module-paymaster .status-skipped   { background: rgba(255,100,100,0.12); color: rgba(255,120,120,0.85); }

.module-paymaster .cw-dir-confirmed-by {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
}

.module-paymaster .cw-dir-btn {
  padding: 4px 8px;
  font-size: 0.8rem;
  line-height: 1;
}

/* --- Таблиця учасників --- */
.module-paymaster .cw-participants-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(26, 77, 154, 0.15);
}

.module-paymaster .cw-participants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.module-paymaster .cw-participants-table th {
  background: rgba(0,0,0,0.3);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(26,77,154,0.2);
}

.module-paymaster .cw-participants-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
}

.module-paymaster .cw-participant-id {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}

.module-paymaster .cw-amount { font-weight: 700; }
.module-paymaster td.gold    { color: var(--module-gold); }
.module-paymaster .cw-empty  { text-align: center; padding: 16px; color: rgba(255,255,255,0.3); font-size: 0.85rem; }

/* --- Завдання тижня --- */
.module-paymaster .cw-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.module-paymaster .cw-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  font-size: 0.82rem;
}

.module-paymaster .cw-task-name { flex: 1; color: rgba(255,255,255,0.75); }
.module-paymaster .cw-task-date { font-size: 0.73rem; color: rgba(255,255,255,0.3); }
.module-paymaster .cw-task-amount { font-weight: 700; color: var(--module-gold); }

.module-paymaster .cw-task-cat {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 700;
}
.module-paymaster .cat-easy   { background: rgba(76,219,143,0.15); color: #4cdb8f; }
.module-paymaster .cat-medium { background: rgba(255,170,0,0.15);  color: rgba(255,190,50,0.9); }
.module-paymaster .cat-hard   { background: rgba(255,80,80,0.15);  color: rgba(255,120,100,0.9); }

/* --- Кнопки дій скарбника --- */
.module-paymaster .cw-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(26,77,154,0.15);
}

.module-paymaster .cw-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
}

.module-paymaster .cw-action-btn.disabled-action {
  opacity: 0.4;
  pointer-events: none;
}

.module-paymaster .btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 80, 80, 0.4);
  border-radius: 8px;
  background: rgba(255, 60, 60, 0.1);
  color: rgba(255, 130, 130, 0.9);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.module-paymaster .btn-danger:hover {
  background: rgba(255, 60, 60, 0.2);
  border-color: rgba(255, 80, 80, 0.6);
}

/* ============================================================
   АРХІВ ТИЖНІВ
   ============================================================ */

.module-paymaster .history-week-card {
  border: 1px solid rgba(26, 77, 154, 0.18);
  border-radius: 10px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.module-paymaster .history-week-card:hover { border-color: rgba(26, 77, 154, 0.4); }

.module-paymaster .history-week-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(0,0,0,0.18);
  flex-wrap: wrap;
}

.module-paymaster .history-chevron {
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  transition: transform 0.2s;
}

.module-paymaster .history-week-id {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--module-accent-text);
  min-width: 80px;
}

.module-paymaster .history-week-income {
  font-weight: 700;
  font-size: 0.9rem;
}

.module-paymaster .history-week-tasks,
.module-paymaster .history-week-participants {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.module-paymaster .history-week-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.module-paymaster .history-week-details {
  padding: 0 14px 12px;
  background: rgba(0,0,0,0.12);
  border-top: 1px solid rgba(26,77,154,0.1);
}

.module-paymaster .history-details-inner { padding-top: 10px; }

.module-paymaster .history-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.83rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
}
.module-paymaster .history-detail-row span:first-child { color: rgba(255,255,255,0.4); }

/* ============================================================
   ПРОФІЛЬ УЧАСНИКА
   ============================================================ */

.module-paymaster .user-lookup-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

.module-paymaster .user-lookup-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.module-paymaster .user-stat-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(26,77,154,0.2);
  border-radius: 9px;
  min-width: 110px;
}
.module-paymaster .user-stat-chip span { font-size: 1rem; font-weight: 700; color: var(--module-gold); }
.module-paymaster .user-stat-chip small { font-size: 0.7rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.05em; }

.module-paymaster .user-history-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 0.83rem;
}

/* ============================================================
   INFLUENCE LEVELS
   ============================================================ */

.module-paymaster .influence-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 10px;
}

/* ============================================================
   КАЛЬКУЛЯТОР
   ============================================================ */

.module-paymaster .calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .module-paymaster .calc-layout { grid-template-columns: 1fr; }
}

.module-paymaster .calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-paymaster .calc-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
}

.module-paymaster .calc-result {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(26,77,154,0.2);
  border-radius: 10px;
  padding: 16px;
  min-height: 150px;
  display: flex;
  align-items: flex-start;
}

.module-paymaster .calc-result-empty {
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
  align-self: center;
}

.module-paymaster .calc-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.module-paymaster .calc-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.module-paymaster .calc-step-label { flex: 1; color: rgba(255,255,255,0.5); }
.module-paymaster .calc-step-val   { font-weight: 600; color: rgba(255,255,255,0.85); }
.module-paymaster .calc-step-hint  { font-size: 0.72rem; color: rgba(255,255,255,0.3); }

.module-paymaster .calc-final-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}
.module-paymaster .calc-final-amount { font-size: 1.2rem; }

/* ============================================================
   ФОРМАТУВАННЯ СУМ — amount-hint
   ============================================================ */

.module-paymaster .amount-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--module-gold);
  opacity: 0.75;
  margin-top: 2px;
  min-height: 14px;
  letter-spacing: 0.03em;
}
