/* TIM-OE Admin Vibiz-style theme
   Inspired by the provided clean blue/white dashboard reference.
   Scope: admin side only (not worker-login / worker pages). */

body.timoe-vibiz-admin {
  --vibiz-bg: #edf5ff;
  --vibiz-surface: rgba(255,255,255,.78);
  --vibiz-surface-strong: #ffffff;
  --vibiz-text: #0f172a;
  --vibiz-muted: #64748b;
  --vibiz-border: rgba(148,163,184,.18);
  --vibiz-shadow: 0 24px 80px rgba(15,23,42,.10);
  --vibiz-soft-shadow: 0 14px 34px rgba(15,23,42,.08);
  --vibiz-blue: #4aa8ff;
  --vibiz-blue-strong: #1d8fff;
  --vibiz-cyan: #86d9ff;
  --vibiz-dark: #121826;
  --vibiz-dark-2: #0f1728;
}

body.timoe-vibiz-admin,
body.timoe-vibiz-admin::before {
  background:
    radial-gradient(circle at 8% 78%, rgba(80,175,255,.22), transparent 24%),
    radial-gradient(circle at 66% 0%, rgba(49,149,255,.18), transparent 22%),
    radial-gradient(circle at 100% 20%, rgba(98,198,255,.17), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 40%, #ebf4ff 100%) !important;
}

body.timoe-vibiz-admin main > div {
  max-width: 1760px !important;
}

/* Main shell */
body.timoe-vibiz-admin [data-timoe-shell="vibiz"] {
  gap: 18px;
}

body.timoe-vibiz-admin [data-timoe-main="vibiz"] > div {
  padding-top: 16px;
}

body.timoe-vibiz-admin [data-timoe-main="vibiz"] > div > div[class*="px-3"] > div[class*="rounded-[30px]"] {
  border: 1px solid rgba(255,255,255,.75) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.62)) !important;
  box-shadow: var(--vibiz-shadow) !important;
  backdrop-filter: blur(18px) !important;
  border-radius: 34px !important;
  padding: 10px !important;
}

body.timoe-vibiz-admin [data-timoe-main="vibiz"] > div > div[class*="px-3"] > div[class*="rounded-[30px]"] > div {
  border-radius: 28px !important;
}

/* Sidebar */
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div {
  margin: 14px 0 14px 14px;
  min-height: calc(100vh - 28px) !important;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, #0e1a31 0%, #0b1730 55%, #091329 100%) !important;
  box-shadow: 0 26px 58px rgba(2,6,23,.28), inset 0 1px 0 rgba(255,255,255,.04);
}

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] .text-slate-400 { color: rgba(203,213,225,.72) !important; }
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] .text-slate-500 { color: rgba(203,213,225,.54) !important; }
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] .text-slate-300 { color: rgba(226,232,240,.86) !important; }
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] .text-white { color: #fff !important; }

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] button[class*="rounded-2xl"] {
  border-radius: 16px !important;
  min-height: 46px;
}

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] button[class*="bg-white/10"] {
  background: linear-gradient(180deg, rgba(86,177,255,.95), rgba(51,153,248,.92)) !important;
  border-color: rgba(132,200,255,.46) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(42,145,247,.28);
}

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] button[class*="bg-white/10"] div[class*="bg-white/15"] {
  background: rgba(255,255,255,.20) !important;
  color: #fff !important;
}

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] button[class*="hover:bg-white/5"]:hover {
  background: rgba(255,255,255,.07) !important;
}

body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] .bg-gradient-to-br.from-blue-500.via-cyan-400.to-indigo-500,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] [class*="from-blue-500"][class*="via-cyan-400"][class*="to-indigo-500"] {
  background: linear-gradient(135deg, #4fc2ff 0%, #1fa8ff 55%, #0e7fe6 100%) !important;
}

/* Top toolbar / account chips */
body.timoe-vibiz-admin header,
body.timoe-vibiz-admin main > div > div:first-child {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.70)) !important;
  border: 1px solid rgba(255,255,255,.78) !important;
  box-shadow: var(--vibiz-soft-shadow) !important;
  backdrop-filter: blur(14px);
}

body.timoe-vibiz-admin button[class*="rounded-[20px]"][class*="border"],
body.timoe-vibiz-admin button[class*="rounded-2xl"][class*="border"],
body.timoe-vibiz-admin .rounded-2xl.border {
  border-color: rgba(148,163,184,.16) !important;
}

/* Dashboard hero / cards */
body.timoe-vibiz-admin .tim-premium-dashboard {
  gap: 1rem !important;
}

body.timoe-vibiz-admin .tim-premium-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.6rem !important;
  border: 1px solid rgba(255,255,255,.80) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(64,175,255,.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,251,255,.94) 52%, rgba(236,246,255,.96)) !important;
  box-shadow: var(--vibiz-shadow) !important;
}

body.timoe-vibiz-admin .tim-premium-badge {
  background: rgba(15,23,42,.06) !important;
  color: #64748b !important;
}

body.timoe-vibiz-admin .tim-premium-kpis {
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .9rem !important;
}

body.timoe-vibiz-admin .tim-premium-kpi {
  border-radius: 20px !important;
  padding: 1rem 1rem 1.1rem !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  box-shadow: var(--vibiz-soft-shadow) !important;
}

body.timoe-vibiz-admin .tim-premium-kpi strong,
body.timoe-vibiz-admin .tim-premium-kpi span,
body.timoe-vibiz-admin .tim-premium-kpi em { position: relative; z-index: 1; }

body.timoe-vibiz-admin .tim-premium-kpi.blue {
  background: linear-gradient(135deg, #eef8ff, #dff2ff 66%, #f7fbff) !important;
  color: var(--vibiz-text) !important;
}

body.timoe-vibiz-admin .tim-premium-kpi.emerald,
body.timoe-vibiz-admin .tim-premium-kpi.amber,
body.timoe-vibiz-admin .tim-premium-kpi.violet {
  background: linear-gradient(135deg, #151c2a, #0f1727 65%, #111827) !important;
  border-color: rgba(20,30,47,.92) !important;
}

body.timoe-vibiz-admin .tim-premium-kpi.emerald strong,
body.timoe-vibiz-admin .tim-premium-kpi.amber strong,
body.timoe-vibiz-admin .tim-premium-kpi.violet strong,
body.timoe-vibiz-admin .tim-premium-kpi.emerald span,
body.timoe-vibiz-admin .tim-premium-kpi.amber span,
body.timoe-vibiz-admin .tim-premium-kpi.violet span,
body.timoe-vibiz-admin .tim-premium-kpi.emerald em,
body.timoe-vibiz-admin .tim-premium-kpi.amber em,
body.timoe-vibiz-admin .tim-premium-kpi.violet em {
  color: #f8fafc !important;
}

body.timoe-vibiz-admin .tim-premium-grid-main { grid-template-columns: minmax(0,1.4fr) minmax(320px,.92fr) !important; }
body.timoe-vibiz-admin .tim-premium-grid-end { grid-template-columns: 1.05fr .95fr !important; }

body.timoe-vibiz-admin .tim-premium-card,
body.timoe-vibiz-admin .tim-premium-notice,
body.timoe-vibiz-admin .tim-premium-audit-row,
body.timoe-vibiz-admin .tim-premium-list-row {
  border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,.84) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(252,253,255,.94)) !important;
  box-shadow: var(--vibiz-soft-shadow) !important;
}

body.timoe-vibiz-admin .tim-premium-card-head h3 { font-size: 1.15rem !important; }
body.timoe-vibiz-admin .tim-premium-card-head p { color: #73859b !important; }

/* Chart look */
body.timoe-vibiz-admin .tim-premium-chart {
  background: linear-gradient(180deg, #f9fcff, #ffffff) !important;
  border-radius: 20px;
}

body.timoe-vibiz-admin .tim-premium-grid { stroke: rgba(166,188,212,.28) !important; }
body.timoe-vibiz-admin .tim-premium-axis { stroke: rgba(166,188,212,.40) !important; }
body.timoe-vibiz-admin .tim-premium-axis-label { fill: #70849b !important; }
body.timoe-vibiz-admin .tim-premium-chart-legend i.blue { background: #47b0ff !important; }
body.timoe-vibiz-admin .tim-premium-chart-legend i.green { background: #0f1728 !important; }
body.timoe-vibiz-admin .tim-premium-chart-legend i.amber { background: #78d0ff !important; }
body.timoe-vibiz-admin .tim-premium-chart-legend i.violet { background: #2a8eff !important; }
body.timoe-vibiz-admin .tim-premium-bar { background: #eaf3fb !important; }
body.timoe-vibiz-admin .tim-premium-bar i { background: linear-gradient(90deg, #0f1728, #4bb6ff) !important; }
body.timoe-vibiz-admin .tim-premium-rank { background: #eaf5ff !important; color: #167dd9 !important; }

/* General cards outside dashboard */
body.timoe-vibiz-admin main [class*="rounded-[24px]"],
body.timoe-vibiz-admin main [class*="rounded-[28px]"],
body.timoe-vibiz-admin main [class*="rounded-2xl"],
body.timoe-vibiz-admin main [class*="rounded-3xl"] {
  border-radius: 24px !important;
}

body.timoe-vibiz-admin main [class*="bg-white"],
body.timoe-vibiz-admin main [class*="bg-slate-50"],
body.timoe-vibiz-admin main [class*="bg-gray-50"],
body.timoe-vibiz-admin main div[class*="border"][class*="rounded"] {
  border-color: rgba(148,163,184,.17) !important;
}

body.timoe-vibiz-admin input,
body.timoe-vibiz-admin select,
body.timoe-vibiz-admin textarea {
  background: rgba(255,255,255,.94) !important;
  border-color: rgba(148,163,184,.22) !important;
  border-radius: 14px !important;
}

body.timoe-vibiz-admin button[class*="bg-blue"],
body.timoe-vibiz-admin a[class*="bg-blue"] {
  background-image: linear-gradient(135deg, #53baff, #2b95ff) !important;
  border-color: rgba(68,171,255,.34) !important;
}

body.timoe-vibiz-admin button[class*="bg-slate-900"],
body.timoe-vibiz-admin a[class*="bg-slate-900"] {
  background-image: linear-gradient(135deg, #171f2e, #0f1728) !important;
}

body.timoe-vibiz-admin .tim-premium-notice::before,
body.timoe-vibiz-admin .tim-premium-audit-row::before {
  opacity: .9;
}

@media (max-width: 1320px) {
  body.timoe-vibiz-admin .tim-premium-kpis { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  body.timoe-vibiz-admin .tim-premium-grid-main,
  body.timoe-vibiz-admin .tim-premium-grid-end { grid-template-columns: 1fr !important; }
}

@media (max-width: 980px) {
  body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div { margin: 0; border-radius: 0; }
}

/* TIM-OE 20260502: move sidebar resize handle outside the menu */
body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize {
  right: -13px !important;
  width: 14px !important;
  background: transparent !important;
  z-index: 30 !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover {
  background: rgba(74, 168, 255, 0.08) !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div {
  right: 2px !important;
  opacity: .32 !important;
  transition: opacity .16s ease, transform .16s ease, color .16s ease;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover > div,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover > div {
  opacity: .9 !important;
  color: #4aa8ff !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.sticky,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.sticky {
  overflow: hidden !important;
}


/* TIM-OE 20260502 v3: move sidebar resize handle further outside and restore old subtle color */
body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize {
  right: -28px !important;
  width: 26px !important;
  background: transparent !important;
  z-index: 35 !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover {
  background: transparent !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div {
  right: 10px !important;
  color: rgb(100 116 139 / .55) !important;
  opacity: .55 !important;
  filter: none !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover > div,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover > div {
  color: rgb(100 116 139 / .75) !important;
  opacity: .75 !important;
}

/* TIM-OE 20260502 v4 FINAL: sidebar resizer must not create a transparent strip or sit inside the menu */
body.timoe-vibiz-admin [data-timoe-shell="vibiz"] {
  gap: 0 !important;
}

body.timoe-vibiz-admin [data-timoe-main="vibiz"] {
  margin-left: 0 !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] {
  overflow: visible !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.sticky,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.sticky {
  overflow: hidden !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize {
  right: -9px !important;
  width: 9px !important;
  min-width: 9px !important;
  max-width: 9px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 60 !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover {
  background: transparent !important;
  box-shadow: none !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize > div {
  display: none !important;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize::after,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 82px;
  bottom: 82px;
  width: 1px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .38);
  opacity: .58;
  transition: opacity .16s ease, background .16s ease;
}

body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover::after,
body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize:hover::after {
  opacity: .82;
  background: rgba(100, 116, 139, .55);
}

/* TIM-OE 20260502 v5: real project fix - keep header/content out of logo sidebar and add clean divider */
@media (min-width: 1280px) {
  body.timoe-vibiz-admin [data-timoe-shell="vibiz"] {
    gap: 18px !important;
    align-items: stretch !important;
  }

  body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] {
    position: relative !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    z-index: 45 !important;
    isolation: isolate !important;
  }

  /* The sidebar card had margin-left but kept the full inline width; that made it overflow into main/header. */
  body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.sticky,
  body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.sticky {
    box-sizing: border-box !important;
    width: calc(100% - 14px) !important;
    max-width: calc(100% - 14px) !important;
    margin: 14px 0 14px 14px !important;
    min-height: calc(100vh - 28px) !important;
    overflow: hidden !important;
    z-index: 2 !important;
  }

  body.timoe-vibiz-admin [data-timoe-main="vibiz"] {
    position: relative !important;
    z-index: 5 !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  /* Elegant vertical divider between menu and right content. */
  body.timoe-vibiz-admin [data-timoe-main="vibiz"]::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 18;
    background: linear-gradient(
      180deg,
      rgba(148, 163, 184, 0.08),
      rgba(100, 116, 139, 0.62) 12%,
      rgba(100, 116, 139, 0.62) 88%,
      rgba(148, 163, 184, 0.08)
    );
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.45), -1px 0 0 rgba(15, 23, 42, 0.08);
  }

  /* Keep top header fully inside the right panel; it must not slide into the logo block. */
  body.timoe-vibiz-admin [data-timoe-main="vibiz"] header {
    top: 14px !important;
    z-index: 20 !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 18px !important;
  }

  body.timoe-vibiz-admin [data-timoe-main="vibiz"] header > div {
    margin-left: 0 !important;
    max-width: 100% !important;
  }

  body.timoe-vibiz-admin [data-timoe-main="vibiz"] > div {
    padding-top: 14px !important;
  }

  body.timoe-vibiz-admin [data-timoe-main="vibiz"] > div > div[class*="px-3"] {
    padding-left: 0 !important;
    padding-right: 18px !important;
  }

  /* The resize hit area stays outside the menu, but its old pseudo line is disabled to avoid duplicate lines. */
  body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize,
  body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize {
    right: -18px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 80 !important;
  }

  body.timoe-vibiz-admin aside[data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize::after,
  body.timoe-vibiz-admin [data-timoe-sidebar="vibiz"] > div.absolute.right-0.top-0.h-full.w-2.cursor-col-resize::after {
    display: none !important;
  }
}
