/* ===== PVZ TEAM v36.2 brand layer. Loaded last so it wins the cascade. ===== */
html, html[data-theme="dark"], html[data-theme="light"] {
  color-scheme: dark !important;
  --bg: #05070d;
  --bg2: #0a0e18;
  --bg3: #121826;
  --card: #121826;
  --panel: #121826;
  --panel-2: #171f30;
  --surface: #121826;
  --surface-raised: #171f30;
  --surface-2: #1c2538;
  --line: rgba(78, 214, 255, .16);
  --line2: rgba(139, 124, 255, .28);
  --text: #f4f7ff;
  --text-2: #c5d0e6;
  --text-secondary: #c5d0e6;
  --mute: #9aabc6;
  --mute2: #7384a3;
  --muted: #9aabc6;
  --accent: #2ad4ff;
  --accent2: #9b8cff;
  --accent-dim: rgba(42, 212, 255, .14);
  --ok: #3ee0a2;
  --success: #3ee0a2;
  --warn: #ffc14d;
  --warning: #ffc14d;
  --danger: #ff6b86;
  --shadow: 0 18px 40px rgba(0, 0, 0, .42);
  --radius: 16px;
}
html body {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(42,212,255,.16), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(139,124,255,.14), transparent 55%),
    #05070d !important;
  color: #f4f7ff !important;
}
html body .shell,
html body .main,
html body .main-shell {
  background: transparent !important;
  color: #f4f7ff !important;
}

/* Sidebar */
html body .side {
  width: 268px;
  background: linear-gradient(180deg, #0c1220 0%, #070a12 100%) !important;
  border-right: 1px solid rgba(42,212,255,.18) !important;
  box-shadow: inset -1px 0 0 rgba(139,124,255,.12);
}
html body .side-brand {
  min-height: 72px;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(42,212,255,.14) !important;
  background: rgba(42,212,255,.04);
}
html body .side-nav { padding: 10px 12px 18px !important; }
html body .nav-group { margin: 0 0 8px !important; padding: 0 0 8px !important; border-top: 0 !important; }
html body .nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,.05) !important; padding-top: 8px !important; }
html body .nav-group-title {
  color: #7f90ad !important;
  font-size: 11px !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  padding: 8px 10px 6px !important;
}
html body .nav-btn {
  min-height: 42px !important;
  margin: 2px 0 !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  color: #c9d5ea !important;
  font-size: 14px !important;
  border: 1px solid transparent !important;
}
html body .nav-btn:hover {
  background: rgba(42,212,255,.08) !important;
  color: #fff !important;
}
html body .nav-btn.active {
  background: linear-gradient(90deg, rgba(42,212,255,.18), rgba(139,124,255,.12)) !important;
  color: #fff !important;
  border-color: rgba(42,212,255,.35) !important;
  box-shadow: inset 3px 0 0 #2ad4ff;
}
html body .nav-icon, html body .nav-btn.active .nav-icon { color: #2ad4ff !important; }

/* Topbar */
html body .app-topbar {
  height: 68px !important;
  background: rgba(7,10,18,.88) !important;
  border-bottom: 1px solid rgba(42,212,255,.16) !important;
  backdrop-filter: blur(16px);
}
html body .topbar-context-label,
html body .master-topbar-date,
html body .topbar-user-info { color: #d5e0f4 !important; }
html body .topbar-bell,
html body .topbar-avatar {
  background: #151c2c !important;
  border: 1px solid rgba(42,212,255,.22) !important;
  color: #2ad4ff !important;
}
html body .topbar-theme { display: none !important; }

/* Shared cards */
html body .panel,
html body .card,
html body .home-panel,
html body .hq-card,
html body .master-panel,
html body .master-hero,
html body .master-kpi,
html body .ceo-v33-panel,
html body .ceo-v33-kpi,
html body .ceo-v33-focus-card,
html body .ceo-v33-market-item,
html body .esign-card,
html body .shift-card,
html body .pvz-card,
html body .news-card,
html body .note-card,
html body .help-card,
html body .team-group,
html body .att-card,
html body .finance-kpi,
html body .hub-hero,
html body .contract-flow-section,
html body .contract-flow-card,
html body .contract-pvz-row,
html body .login-card,
html body .modal,
html body .day-detail,
html body .cal-panel {
  background: linear-gradient(180deg, rgba(23,31,48,.96), rgba(14,19,32,.96)) !important;
  border: 1px solid rgba(78,214,255,.16) !important;
  border-radius: 16px !important;
  color: #f4f7ff !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.28) !important;
}
html body .contract-flow-card,
html body .esign-card,
html body .shift-card,
html body .pvz-card,
html body .master-kpi,
html body .ceo-v33-kpi {
  border-left: 3px solid #2ad4ff !important;
}
html body .contract-flow-card[data-status="cancelled"],
html body .contract-flow-card[data-status="expired"] {
  opacity: 1 !important;
  border-left-color: #ff6b86 !important;
  background: linear-gradient(180deg, rgba(40,18,28,.92), rgba(16,12,20,.96)) !important;
}
html body .contract-flow-card[data-status="signed"] { border-left-color: #3ee0a2 !important; }
html body .contract-flow-card h3,
html body .esign-card h3,
html body .shift-card b,
html body .panel h1,
html body .panel h2,
html body .master-panel h2,
html body .ceo-v33-panel h2,
html body .contract-flow-header h2 {
  color: #fff !important;
}
html body .contract-flow-meta,
html body .contract-flow-expiry,
html body .contract-flow-header p,
html body .esign-meta,
html body .shift-card small {
  color: #9aabc6 !important;
}
html body .contract-flow-number { color: #2ad4ff !important; letter-spacing: .08em; }
html body .contract-flow-list { display: grid; gap: 14px; }
html body .contract-flow-main { padding: 16px 16px 14px; }
html body .contract-flow-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
html body .contract-flow-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
html body .contract-flow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
html body .esign-status {
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-weight: 750 !important;
}
html body .esign-status.success { background: rgba(62,224,162,.16) !important; color: #3ee0a2 !important; }
html body .esign-status.danger { background: rgba(255,107,134,.16) !important; color: #ff8aa0 !important; }
html body .esign-status.pending,
html body .esign-status.warning { background: rgba(255,193,77,.16) !important; color: #ffc14d !important; }
html body .esign-status.info { background: rgba(42,212,255,.16) !important; color: #7ae7ff !important; }

/* Buttons */
html body .btn-primary {
  background: linear-gradient(135deg, #2ad4ff, #7c6cff) !important;
  color: #061018 !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-weight: 750 !important;
  box-shadow: 0 8px 22px rgba(42,212,255,.22) !important;
}
html body .btn-ghost {
  background: transparent !important;
  color: #d5e2f6 !important;
  border: 1px solid rgba(42,212,255,.28) !important;
  border-radius: 12px !important;
}
html body .btn-ghost:hover { background: rgba(42,212,255,.1) !important; }

html body input,
html body select,
html body textarea {
  background: #0c121e !important;
  color: #f4f7ff !important;
  border: 1px solid rgba(42,212,255,.22) !important;
  border-radius: 12px !important;
}
html body input:focus,
html body select:focus,
html body textarea:focus {
  border-color: #2ad4ff !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,212,255,.16);
}

/* Mobile */
@media (max-width: 980px) {
  html body .mobile-toggle { display: inline-flex !important; }
  html body .main { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)) !important; }
  html body .app-topbar { margin: 0 !important; padding: 0 12px 0 56px !important; height: 60px !important; }
  html body .bottom-nav {
    display: grid !important;
    position: fixed !important;
    left: 0; right: 0; bottom: 0;
    z-index: 220 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom)) !important;
    background: rgba(6,9,16,.96) !important;
    border-top: 1px solid rgba(42,212,255,.2) !important;
    backdrop-filter: blur(18px);
  }
  html body .bottom-nav .bn-item {
    min-height: 50px !important;
    border-radius: 12px !important;
    color: #8ea0be !important;
    background: transparent !important;
    font-size: 11px !important;
  }
  html body .bottom-nav .bn-item.active {
    color: #061018 !important;
    background: linear-gradient(135deg, #2ad4ff, #8b7cff) !important;
    border-color: transparent !important;
  }
  html body .contract-flow-section { padding: 14px !important; }
  html body .contract-flow-top { flex-direction: column !important; }
  html body .contract-flow-meta { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px 10px !important; }
  html body .contract-flow-actions .btn { flex: 1 1 140px; }
  html body .master-kpi-grid,
  html body .ceo-v33-kpis { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px) {
  html body .contract-flow-meta,
  html body .master-kpi-grid,
  html body .ceo-v33-kpis,
  html body .contract-flow-form-grid { grid-template-columns: 1fr !important; }
  html body .contract-flow-actions { flex-direction: column; }
  html body .contract-flow-actions .btn { width: 100%; }
}
@media (min-width: 981px) {
  html body .bottom-nav,
  html body .mobile-toggle { display: none !important; }
}
