/* ── Decorative background blob — new-brand accent ── */
.bg-blob {
  position: fixed;
  top: -300px;
  right: -300px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(26,86,168,.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Theme toggle button (sidebar footer) ── */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  color: var(--t3);
  font-size: 13px;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--fb);
  transition: color .12s, background .12s;
}
.theme-toggle-btn:hover { color: var(--t2); background: rgba(255,255,255,.04); }

/* ── App shell ── */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--sb);
  border-right: 1px solid rgba(26,86,168,.10);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--bd);
}
.ekimaks-logo {
  display: block;
  cursor: pointer;
  transform-origin: left center;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), filter .5s ease;
}
.ekimaks-logo:hover {
  transform: scale(1.07);
  animation: ek-shimmer 2.4s ease-in-out infinite;
}
@keyframes ek-shimmer {
  0%   { filter: saturate(1.4) brightness(1.1)  hue-rotate(0deg)   drop-shadow(0 0 10px rgba(201,162,39,.40)); }
  35%  { filter: saturate(1.9) brightness(1.2)  hue-rotate(30deg)  drop-shadow(0 0 20px rgba(255,185,60,.65)); }
  65%  { filter: saturate(1.8) brightness(1.16) hue-rotate(-22deg) drop-shadow(0 0 16px rgba(78,144,217,.60)); }
  100% { filter: saturate(1.4) brightness(1.1)  hue-rotate(0deg)   drop-shadow(0 0 10px rgba(201,162,39,.40)); }
}
@keyframes ek-burst {
  0%   { transform: scale(1);    filter: none; }
  25%  { transform: scale(1.11); filter: saturate(2.2) brightness(1.3) hue-rotate(15deg) drop-shadow(0 0 20px rgba(255,200,60,.8)); }
  70%  { transform: scale(.97);  filter: saturate(1.2) brightness(1.05); }
  100% { transform: scale(1);    filter: none; }
}
.ekimaks-logo.logo-burst { animation: ek-burst .6s cubic-bezier(.34,1.56,.64,1) both; }
@media (prefers-reduced-motion: reduce) {
  .ekimaks-logo { transition: none; }
  .ekimaks-logo:hover { animation: none; filter: saturate(1.5) brightness(1.1); }
  .ekimaks-logo.logo-burst { animation: none; }
}
.sidebar-logo-sub {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 3px;
}
.sidebar-version {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 6px;
  background: var(--acc-d);
  color: var(--acc-t);
  font-family: var(--fm);
}

/* ── Nav ── */
.nav { flex: 1; padding: 8px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  color: var(--t3);
  font-size: 13px;
  transition: color .12s, background .12s;
  position: relative;
}
.nav-item:hover { color: var(--t2); background: rgba(255,255,255,.04); }
.nav-item.active {
  color: var(--t1);
  background: var(--acc-d);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--acc);
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 8px var(--acc-glow);
}
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  border-radius: 10px;
  padding: 1px 7px;
  font-family: var(--fm);
}
.badge-green { background: var(--acc-d); color: var(--acc-t); }
.badge-gold  { background: var(--gold-d); color: var(--gold); }
.badge-blue  { background: var(--blu-d);  color: var(--blu);  }
.nav-divider { height: 1px; background: var(--bd); margin: 6px 12px; }
.nav-label {
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--t3);
  padding: 8px 16px 4px;
}
.sidebar-foot { border-top: 1px solid var(--bd); padding: 6px 0; }

/* ── Main area ── */
.main { display: flex; flex-direction: column; overflow: hidden; }
.main-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--bd);
}
.page-title {
  font-family: var(--fh);
  font-size: 18px;
  color: var(--t1);
  margin-bottom: 10px;
}
.main-body { flex: 1; padding: 16px 20px; overflow-y: auto; }

/* ── Filter bar ── */
.filter-bar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }

/* ── Bulk action bar ── */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-bottom: 10px;
  background: var(--acc-d);
  border: 1px solid rgba(26,86,168,.25);
  border-radius: var(--radius);
}
.bulk-text { font-size: 12px; color: var(--acc-t); flex: 1; }

/* ── Master-detail layout ── */
.master-detail { display: grid; grid-template-columns: 1fr; gap: 10px; }
.master-detail.open { grid-template-columns: 1fr 1.1fr; }

/* ── Detail panel ── */
.detail-panel {
  background: var(--sf);
  border: 1px solid rgba(26,86,168,.2);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(26,86,168,.08);
  padding: 16px;
  display: none; flex-direction: column; gap: 12px;
  overflow-y: auto; max-height: calc(100vh - 220px);
}
.detail-panel.open { display: flex; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ── Mobile header (logo bar — shown only on mobile) ── */
.mobile-header {
  display: none;
}
.mobile-brand {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 300;
  color: var(--t1);
  letter-spacing: -.4px;
}
.mobile-brand-eki {
  font-weight: 800;
  color: var(--gold);
}
.mobile-brand-sub {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-left: 8px;
  align-self: flex-end;
  padding-bottom: 2px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 10px;
    background: var(--sb);
    border-bottom: 1px solid var(--bd);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .main { padding-bottom: 60px; }
  .mobile-nav {
    display: flex; position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--sb); border-top: 1px solid var(--bd);
    z-index: 100;
  }
  .mob-ni {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; padding: 10px 4px 8px;
    color: var(--t3); font-size: 10px; gap: 4px;
    transition: color .12s;
  }
  .mob-ni.active { color: var(--acc-t); }
}
@media (min-width: 769px) { .mobile-nav { display: none; } }
