/* =========================================================
   OSBB VV-17 • Modern Material You Redesign (v14)
   ========================================================= */

:root {
  --bg: #f1f5fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --line: rgba(15, 23, 42, 0.06);
  --accent: #1a56db;
  --accent-hover: #1e40af;
  --accent-soft: #e8f0fe;
  --success: #15803d;
  --danger: #dc2626;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18), 0 4px 16px rgba(15, 23, 42, 0.06);
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  background: transparent !important;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header (Sticky Glassmorphic only on Desktop >= 900px) ---------- */
@media (min-width: 900px) {
  header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(241, 245, 251, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.brand-mark svg {
  width: 20px !important;
  height: 20px !important;
}

header h1 {
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* ---------- Navigation Pill Bar ---------- */
@media (min-width: 900px) {
  header .bottom-nav {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 4px !important;
    border-radius: 999px !important;
    gap: 2px !important;
  }

  header .bottom-nav .nav-item {
    border-radius: 999px !important;
    padding: 7px 14px !important;
    transition: all 0.18s ease !important;
  }

  header .bottom-nav .nav-item:hover:not(.active) {
    background: rgba(15, 23, 42, 0.04) !important;
    color: var(--text) !important;
  }

  header .bottom-nav .nav-item.active {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
  }
}

/* ---------- Top-Right Personal Cabinet Trigger ---------- */
.cabinet-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid rgba(26, 86, 219, 0.18);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
  font-family: inherit;
  max-width: 240px;
}

.cabinet-trigger-btn:hover {
  border-color: rgba(26, 86, 219, 0.42);
  box-shadow: 0 6px 16px rgba(26, 86, 219, 0.12);
  transform: translateY(-1px);
}

.cabinet-trigger-btn:active {
  transform: translateY(0);
}

.cab-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #dbeafe;
}

.cab-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cab-trigger-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.cab-trigger-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.cab-trigger-sub {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cab-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
}

.cab-dot.paid { background: #16a34a; }
.cab-dot.partial { background: #d97706; }
.cab-dot.unpaid { background: #dc2626; }

.cabinet-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.cabinet-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.36);
}

@media (max-width: 520px) {
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .cab-trigger-sub { display: none; }
  .cabinet-trigger-btn { padding: 4px 10px 4px 4px; gap: 6px; }
  .cabinet-login-btn { padding: 7px 12px; font-size: 12.5px; }
}

/* ---------- Floating Personal Cabinet Window (Top-Right Drawer) ---------- */
.cabinet-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px;
}

.cabinet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cabinet-window {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  background: #f8fafd;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(28px) scale(0.98);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.cabinet-overlay.open .cabinet-window {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.cabinet-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cabinet-window-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-window-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cabinet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.cabinet-close-btn:hover {
  background: #e2e8f0;
}

.cabinet-window-body {
  padding: 14px 16px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .cabinet-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .cabinet-window {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(32px);
  }
  .cabinet-overlay.open .cabinet-window {
    transform: translateY(0);
  }
}

/* Ensure standard modals always sit above the Personal Cabinet window */
.modal-overlay {
  z-index: 1050 !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal {
  border-radius: 24px !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
}

/* ---------- Cards, Panels & Bento Surfaces ---------- */
.panel,
.cat-box,
.ann-card,
.home-acc,
.hero-card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-card {
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%) !important;
  border-color: rgba(37, 99, 235, 0.14) !important;
  padding: 18px !important;
}

.hero-bal {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.ann-card {
  background: #ffffff !important;
  padding: 16px 18px !important;
}

.ann-card:hover {
  box-shadow: var(--shadow-md) !important;
}

.block-title {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: #475569 !important;
}

/* ---------- Upgraded Inverter Telemetry Card ---------- */
.inv-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  margin-top: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

/* ---------- Simple Power Status Card for Residents ---------- */
.power-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.power-card.power-on {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 65%);
  border-color: rgba(22, 163, 74, 0.25);
}

.power-card.power-off {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 65%);
  border-color: rgba(220, 38, 38, 0.25);
}

.power-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.power-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.power-card.power-on .power-icon-wrap {
  background: #dcfce7;
  color: #15803d;
}

.power-card.power-off .power-icon-wrap {
  background: #fee2e2;
  color: #dc2626;
}

.power-card.power-unknown .power-icon-wrap {
  background: #f1f5f9;
  color: #64748b;
}

.power-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.power-card.power-on .power-title { color: #15803d; }
.power-card.power-off .power-title { color: #dc2626; }
.power-card.power-unknown .power-title { color: var(--text); }

.power-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.inv-card.is-grid {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.04) 0%, #ffffff 42%);
  border-color: rgba(22, 163, 74, 0.18);
}

.inv-card.is-battery {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.045) 0%, #ffffff 42%);
  border-color: rgba(220, 38, 38, 0.18);
}

.inv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.inv-title {
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.inv-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-bar-track {
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.inv-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.inv-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.inv-stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 9px 6px;
  text-align: center;
}

.inv-stat-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

.inv-stat-val {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Fix History Table Clipping ---------- */
.hist-head,
.hist-row {
  display: grid !important;
  grid-template-columns: minmax(76px, 1.15fr) repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 9px 14px !important;
  align-items: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.hist-head span:not(:first-child),
.hist-row > *:not(:first-child) {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
}

.hist-row:hover {
  background: #f8fafc;
}

/* ---------- Buttons & Contacts Polish ---------- */
.btn-primary {
  border-radius: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(26, 86, 219, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(26, 86, 219, 0.3);
}

.btn-secondary,
.small-btn {
  border-radius: 12px !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}

.contact-btn {
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  background: #f8fafc !important;
  transition: all 0.16s ease !important;
}

.contact-btn:hover {
  background: #ffffff !important;
  border-color: rgba(26, 86, 219, 0.28) !important;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}


/* =========================================================
   OSBB VV-17 • Smooth Micro-Animations & Native Feel (v101)
   ========================================================= */

@keyframes osbbTabIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes osbbModalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes osbbModalSheetIn {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes osbbModalPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes osbbAccOpen {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes osbbNavPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes osbbPulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.28); }
  50%      { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
}

@keyframes osbbPulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.30); }
  50%      { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
}

@keyframes osbbBarGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes osbbShimmer {
  0%   { transform: translateX(-100%) skewX(-18deg); }
  100% { transform: translateX(260%) skewX(-18deg); }
}

/* 1. Плавна поява при перемиканні вкладок */
.tab-content.active {
  animation: osbbTabIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 2. Плавне відкриття модальних вікон */
.modal-overlay.open {
  animation: osbbModalBackdropIn 0.2s ease both;
}

.modal-overlay.open .modal {
  animation: osbbModalSheetIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (min-width: 600px) {
  .modal-overlay.open .modal {
    animation: osbbModalPopIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* 3. М'яке розкриття спойлерів (Нарахування, Історія, Контакти, Фасад) */
details.home-acc[open] > .home-acc-body {
  animation: osbbAccOpen 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 4. Тактильний відгук при натисканні кнопок та навігації */
.btn-primary:active,
.btn-secondary:active,
.small-btn:active,
.sec-pill:active,
.rep-pill:active,
.contact-btn:active,
.nav-item:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease !important;
}

.nav-item .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item.active .nav-icon {
  animation: osbbNavPop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sec-pill,
.rep-pill {
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease !important;
}

/* 5. Живе «дихання» індикаторів світла */
.power-card.power-on .power-icon-wrap {
  animation: osbbPulseGreen 2.8s ease-in-out infinite;
}

.power-card.power-off .power-icon-wrap {
  animation: osbbPulseRed 1.9s ease-in-out infinite;
}

/* 6. Плавне заповнення прогрес-барів */
.bar-fill,
.inv-bar-fill {
  transform-origin: left center;
  animation: osbbBarGrow 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* 7. Делікатний світловий блік на головній картці балансу */
.total-box {
  position: relative;
  overflow: hidden;
}

.total-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
  animation: osbbShimmer 5.5s ease-in-out infinite;
}

/* 8. Плитки квартир на фасаді та інтерактивні картки */
.win {
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s ease, filter 0.15s ease !important;
}

.win:active {
  transform: scale(0.92) !important;
}

.tx-item,
.rep-slide,
.flow-cell {
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, border-color 0.18s ease !important;
}

@media (hover: hover) {
  .win:not(.empty):hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    z-index: 2;
    position: relative;
  }

  .tx-item:hover {
    border-color: rgba(26, 86, 219, 0.22);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  }

  .board-tool-card:hover {
    transform: translateY(-2px);
  }
}

/* 9. Автоматичне вимкнення анімацій, якщо в системі увімкнено зменшення руху */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   OSBB VV-17 • Max Animations Pack (v102)
   ========================================================= */

@keyframes osbbCardRise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes osbbGateWave {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70%  { box-shadow: 0 0 0 18px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes osbbGateSweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes osbbToastIn {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.94); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes osbbToastOut {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, 14px) scale(0.94); }
}

@keyframes osbbRipple {
  to { transform: scale(2.8); opacity: 0; }
}

/* Каскадна поява карток при відкритті вкладки */
.tab-content.active .hero-card,
.tab-content.active .panel,
.tab-content.active .cat-box,
.tab-content.active .home-acc,
.tab-content.active .board-tool-card,
.tab-content.active .section-box {
  animation: osbbCardRise 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-content.active .desktop-col > *:nth-child(1) { animation-delay: 0.02s; }
.tab-content.active .desktop-col > *:nth-child(2) { animation-delay: 0.06s; }
.tab-content.active .desktop-col > *:nth-child(3) { animation-delay: 0.10s; }
.tab-content.active .desktop-col > *:nth-child(4) { animation-delay: 0.14s; }
.tab-content.active .desktop-col > *:nth-child(5) { animation-delay: 0.18s; }
.tab-content.active .desktop-col > *:nth-child(6) { animation-delay: 0.22s; }

.board-grid-2 .board-tool-card:nth-child(2) { animation-delay: 0.05s; }
.board-grid-2 .board-tool-card:nth-child(3) { animation-delay: 0.10s; }
.board-grid-2 .board-tool-card:nth-child(4) { animation-delay: 0.15s; }
.board-grid-2 .board-tool-card:nth-child(5) { animation-delay: 0.20s; }

/* Анімація шлагбаума (стріла піднімається на 72 градуси) */
.gate-svg-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  overflow: visible;
}

.gate-svg-arm {
  transform-origin: 5px 15px;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gate-card-box {
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease !important;
}

.gate-card-box.is-opening {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.gate-card-box.is-opened {
  border-color: #34d399 !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%) !important;
  animation: osbbGateWave 0.9s ease-out;
}

.gate-card-box.is-opened .gate-svg-arm {
  transform: rotate(-72deg);
}

.gate-card-box.is-opened::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.16), transparent);
  pointer-events: none;
  animation: osbbGateSweep 0.75s ease-out;
}

.gate-btn-opened {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

/* Хвильовий Ripple-ефект при натисканні на основні кнопки */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.osbb-ripple-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
  transform: scale(0);
  pointer-events: none;
  animation: osbbRipple 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.btn-secondary .osbb-ripple-dot {
  background: rgba(26, 86, 219, 0.14);
}

/* Живий тост-індикатор знизу екрана */
.osbb-toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  animation: osbbToastIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.osbb-toast.ok {
  background: rgba(6, 95, 70, 0.95);
}

.osbb-toast.err {
  background: rgba(153, 27, 27, 0.95);
}

.osbb-toast.hiding {
  animation: osbbToastOut 0.22s ease forwards;
}

@media (min-width: 900px) {
  .osbb-toast {
    bottom: 28px;
  }
}


/* =========================================================
   OSBB VV-17 • Shimmer Skeleton Loaders (v105)
   ========================================================= */

@keyframes osbbSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: osbbSkelShimmer 1.45s ease-in-out infinite;
  border-radius: 8px;
}

.skel-card {
  background: #ffffff;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 18px;
  padding: 15px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.skel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.skel-line { height: 13px; border-radius: 6px; }
.skel-line.lg { height: 26px; border-radius: 8px; }
.skel-line.sm { height: 10px; border-radius: 5px; }
.skel-btn { height: 40px; border-radius: 12px; flex: 1; }
.skel-pill { height: 32px; width: 96px; border-radius: 999px; flex: 0 0 auto; }

.skel-gate-wrap { display: none; }
html[data-has-gate="1"] .skel-gate-wrap { display: block; }
