/*
 * ==========================================================
 * VIBE UI V2 FOUNDATION
 * ==========================================================
 */

:root{
  --vb-space-1:4px;
  --vb-space-2:8px;
  --vb-space-3:12px;
  --vb-space-4:16px;
  --vb-space-5:20px;
  --vb-space-6:24px;
  --vb-space-7:32px;
  --vb-space-8:40px;

  --vb-radius-xs:8px;
  --vb-radius-sm:11px;
  --vb-radius-md:14px;
  --vb-radius-lg:18px;
  --vb-radius-xl:22px;
  --vb-radius-round:999px;

  /*
   * VIBE_CARD_SPACING_V11
   *
   * Standard inner spacing for every VIBE panel/card.
   * Keep this token shared between Site/Desktop/Mobile.
   */
  --vb-card-padding:18px;

  --vb-bg:#090b10;

  --vb-surface-0:
    rgba(255,255,255,.018);

  --vb-surface-1:
    rgba(255,255,255,.028);

  --vb-surface-2:
    rgba(255,255,255,.045);

  --vb-surface-hover:
    rgba(255,255,255,.06);

  --vb-border:
    rgba(255,255,255,.075);

  --vb-border-hover:
    rgba(255,255,255,.14);

  --vb-border-strong:
    rgba(255,255,255,.20);

  --vb-text:#f4f7fb;
  --vb-text-soft:#cbd2dd;
  --vb-muted:#7f8998;

  --vb-accent:#8b7cff;

  --vb-accent-soft:
    rgba(139,124,255,.13);

  --vb-success:#4ade80;

  --vb-success-soft:
    rgba(74,222,128,.10);

  --vb-warning:#facc15;

  --vb-warning-soft:
    rgba(250,204,21,.10);

  --vb-danger:#fb7185;

  --vb-danger-soft:
    rgba(251,113,133,.10);

  --vb-premium:#f6c768;

  --vb-premium-soft:
    rgba(246,199,104,.11);

  --vb-shadow-sm:
    0 8px 24px
    rgba(0,0,0,.15);

  --vb-shadow-md:
    0 16px 42px
    rgba(0,0,0,.22);

  --vb-shadow-glow:
    0 0 36px
    rgba(139,124,255,.12);

  --vb-motion-fast:140ms;
  --vb-motion-normal:220ms;
  --vb-motion-slow:420ms;

  --vb-ease:
    cubic-bezier(.2,.8,.2,1);

  --vb-ease-spring:
    cubic-bezier(.16,1,.3,1);
}


/* ==========================================================
   PAGE / SECTION
   ========================================================== */

.vb-page{
  display:flex;
  flex-direction:column;
  gap:var(--vb-space-6);
}

.vb-section{
  display:flex;
  flex-direction:column;
  gap:var(--vb-space-4);
}

.vb-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:var(--vb-space-4);
}

.vb-section-title{
  margin:0;
  color:var(--vb-text);
  font-size:20px;
  line-height:1.2;
  font-weight:800;
}

.vb-section-subtitle{
  margin-top:5px;
  color:var(--vb-muted);
  font-size:12px;
  line-height:1.55;
}


/* ==========================================================
   GRID
   ========================================================== */

.vb-grid{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(240px,1fr)
    );

  gap:var(--vb-space-3);
}

.vb-grid--2{
  grid-template-columns:
    repeat(2,minmax(0,1fr));
}

.vb-grid--3{
  grid-template-columns:
    repeat(3,minmax(0,1fr));
}

.vb-grid--4{
  grid-template-columns:
    repeat(4,minmax(0,1fr));
}


/* ==========================================================
   CARD
   ========================================================== */

.vb-card{
  position:relative;
  min-width:0;

  overflow:hidden;

  border:
    1px solid
    var(--vb-border);

  border-radius:
    var(--vb-radius-lg);

  background:
    var(--vb-surface-1);

  box-shadow:
    var(--vb-shadow-sm);

  transition:
    border-color
      var(--vb-motion-normal)
      ease,
    background
      var(--vb-motion-normal)
      ease,
    box-shadow
      var(--vb-motion-normal)
      ease,
    transform
      var(--vb-motion-normal)
      var(--vb-ease);
}

.vb-card--interactive:hover{
  border-color:
    var(--vb-border-hover);

  background:
    var(--vb-surface-2);

  transform:
    translateY(-1px);
}

.vb-card--success{
  border-color:
    rgba(74,222,128,.28);
}

.vb-card--warning{
  border-color:
    rgba(250,204,21,.28);
}

.vb-card--danger{
  border-color:
    rgba(251,113,133,.30);
}

.vb-card--premium{
  border-color:
    rgba(246,199,104,.32);
}

.vb-card-head,
.vb-card-body,
.vb-card-foot{
  padding:
    var(--vb-card-padding);
}

.vb-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:var(--vb-space-3);
}

/*
 * A body-only card keeps full padding.
 *
 * Only remove the duplicated vertical space when
 * the body directly follows a real card header.
 */
.vb-card-body{
  padding-top:
    var(--vb-card-padding);
}

.vb-card-head + .vb-card-body{
  padding-top:0;
}

.vb-card-foot{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:var(--vb-space-2);
  padding-top:0;
}


/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

.vb-eyebrow{
  color:var(--vb-muted);

  font-size:10px;
  line-height:1;

  font-weight:800;

  letter-spacing:.10em;
  text-transform:uppercase;
}

.vb-title{
  margin:5px 0 0;

  color:var(--vb-text);

  font-size:17px;
  line-height:1.25;

  font-weight:800;
}

.vb-muted{
  color:var(--vb-muted);
}


/* ==========================================================
   STATS
   ========================================================== */

.vb-stat{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.vb-stat-label{
  color:var(--vb-muted);

  font-size:10px;

  text-transform:uppercase;
  letter-spacing:.04em;
}

.vb-stat-value{
  color:var(--vb-text);

  font-size:20px;

  font-weight:850;

  font-variant-numeric:
    tabular-nums;

  font-feature-settings:
    "tnum" 1;
}

.vb-stat-value--large{
  font-size:
    clamp(26px,4vw,38px);
}


/* ==========================================================
   ROW
   ========================================================== */

.vb-row{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:var(--vb-space-3);

  min-height:42px;

  padding:
    var(--vb-space-2)
    0;

  border-bottom:
    1px solid
    var(--vb-border);
}

.vb-row:last-child{
  border-bottom:0;
}

.vb-row-main{
  min-width:0;
  flex:1;
}

.vb-row-side{
  flex:0 0 auto;
}


/* ==========================================================
   BUTTON
   ========================================================== */

.vb-button{
  appearance:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  gap:7px;

  min-height:38px;

  padding:
    9px 14px;

  border:
    1px solid
    var(--vb-border);

  border-radius:
    var(--vb-radius-sm);

  background:
    var(--vb-surface-2);

  color:
    var(--vb-text);

  font:inherit;

  font-size:12px;
  font-weight:750;

  cursor:pointer;

  user-select:none;

  transition:
    transform
      var(--vb-motion-fast)
      var(--vb-ease),
    background
      var(--vb-motion-fast)
      ease,
    border-color
      var(--vb-motion-fast)
      ease,
    opacity
      var(--vb-motion-fast)
      ease;
}

.vb-button:hover:not(:disabled){
  transform:
    translateY(-1px);

  border-color:
    var(--vb-border-hover);

  background:
    var(--vb-surface-hover);
}

.vb-button:active:not(:disabled){
  transform:
    translateY(0)
    scale(.985);
}

.vb-button:disabled{
  cursor:default;
  opacity:.45;
}

.vb-button--primary{
  border-color:
    rgba(139,124,255,.38);

  background:
    linear-gradient(
      135deg,
      rgba(139,124,255,.22),
      rgba(139,124,255,.10)
    );
}

.vb-button--success{
  border-color:
    rgba(74,222,128,.30);

  background:
    var(--vb-success-soft);
}

.vb-button--danger{
  border-color:
    rgba(251,113,133,.32);

  background:
    var(--vb-danger-soft);
}

.vb-button--ghost{
  background:transparent;
}


/* ==========================================================
   BADGE
   ========================================================== */

.vb-badge{
  display:inline-flex;
  align-items:center;

  min-height:23px;

  padding:
    4px 8px;

  border:
    1px solid
    var(--vb-border);

  border-radius:
    var(--vb-radius-round);

  background:
    var(--vb-surface-2);

  color:
    var(--vb-text-soft);

  font-size:9px;
  font-weight:850;

  letter-spacing:.04em;

  white-space:nowrap;
}

.vb-badge--success{
  border-color:
    rgba(74,222,128,.27);

  background:
    var(--vb-success-soft);

  color:#86efac;
}

.vb-badge--warning{
  border-color:
    rgba(250,204,21,.27);

  background:
    var(--vb-warning-soft);

  color:#fde68a;
}

.vb-badge--danger{
  border-color:
    rgba(251,113,133,.28);

  background:
    var(--vb-danger-soft);

  color:#fda4af;
}

.vb-badge--premium{
  border-color:
    rgba(246,199,104,.32);

  background:
    var(--vb-premium-soft);

  color:#f8d68a;
}


/* ==========================================================
   INPUT
   ========================================================== */

.vb-input{
  box-sizing:border-box;

  width:100%;

  min-height:40px;

  padding:
    9px 11px;

  border:
    1px solid
    var(--vb-border);

  border-radius:
    var(--vb-radius-sm);

  outline:none;

  background:
    rgba(7,9,13,.65);

  color:
    var(--vb-text);

  font:inherit;

  transition:
    border-color
      var(--vb-motion-fast)
      ease,
    box-shadow
      var(--vb-motion-fast)
      ease;
}

.vb-input:focus{
  border-color:
    rgba(139,124,255,.55);

  box-shadow:
    0 0 0 3px
    rgba(139,124,255,.08);
}


/* ==========================================================
   PROGRESS
   ========================================================== */

.vb-progress{
  position:relative;

  height:7px;

  overflow:hidden;

  border-radius:
    var(--vb-radius-round);

  background:
    rgba(255,255,255,.055);
}

.vb-progress-fill{
  position:absolute;

  inset:
    0 auto 0 0;

  width:0%;

  border-radius:inherit;

  background:
    linear-gradient(
      90deg,
      #7567ff,
      #a99fff
    );

  transition:
    width
      var(--vb-motion-normal)
      linear;
}

.vb-progress--success
.vb-progress-fill{
  background:
    linear-gradient(
      90deg,
      #22c55e,
      #86efac
    );
}


/* ==========================================================
   TIMER
   ========================================================== */

.vb-timer,
[data-vb-timer]{
  font-variant-numeric:
    tabular-nums;

  font-feature-settings:
    "tnum" 1;

  white-space:nowrap;
}


/* ==========================================================
   EMPTY / LOADING / ERROR
   ========================================================== */

.vb-empty,
.vb-loading,
.vb-error{
  display:grid;
  place-items:center;

  min-height:110px;

  padding:
    var(--vb-space-5);

  border:
    1px dashed
    var(--vb-border);

  border-radius:
    var(--vb-radius-md);

  color:
    var(--vb-muted);

  text-align:center;
}

.vb-error{
  border-color:
    rgba(251,113,133,.26);

  color:#fda4af;
}


/* ==========================================================
   SKELETON
   ========================================================== */

.vb-skeleton{
  position:relative;
  overflow:hidden;

  background:
    rgba(255,255,255,.05);
}

.vb-skeleton::after{
  content:"";

  position:absolute;
  inset:0;

  transform:
    translateX(-100%);

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.05),
      transparent
    );

  animation:
    vbSkeleton
    1.4s
    infinite;
}

@keyframes vbSkeleton{
  to{
    transform:
      translateX(100%);
  }
}


/* ==========================================================
   MOTION
   ========================================================== */

.vb-enter{
  animation:
    vbEnter
    var(--vb-motion-slow)
    var(--vb-ease-spring);
}

@keyframes vbEnter{
  from{
    opacity:0;

    transform:
      translateY(5px)
      scale(.995);
  }

  to{
    opacity:1;
    transform:none;
  }
}

.vb-value-pop{
  animation:
    vbValuePop
    var(--vb-motion-slow)
    var(--vb-ease-spring);
}

@keyframes vbValuePop{
  0%{
    opacity:.55;

    transform:
      translateY(4px)
      scale(.96);
  }

  45%{
    opacity:1;

    transform:
      translateY(-1px)
      scale(1.06);
  }

  100%{
    transform:none;
  }
}

.vb-success-pulse{
  animation:
    vbSuccessPulse
    850ms
    var(--vb-ease-spring);
}

@keyframes vbSuccessPulse{
  0%{
    box-shadow:
      0 0 0
      rgba(74,222,128,0);
  }

  25%{
    border-color:
      rgba(74,222,128,.55);

    box-shadow:
      0 0 34px
      rgba(34,197,94,.18);
  }

  100%{
    box-shadow:
      0 0 0
      rgba(74,222,128,0);
  }
}


/* ==========================================================
   LEGACY COMPATIBILITY
   ========================================================== */

.vibe-ui-v2 .card{
  border-radius:
    var(--vb-radius-lg);
}

.vibe-ui-v2 .btn{
  border-radius:
    var(--vb-radius-sm);

  transition:
    transform
      var(--vb-motion-fast)
      var(--vb-ease),
    opacity
      var(--vb-motion-fast)
      ease,
    background
      var(--vb-motion-fast)
      ease,
    border-color
      var(--vb-motion-fast)
      ease;
}

.vibe-ui-v2 .btn:hover:not(:disabled){
  transform:
    translateY(-1px);
}

.vibe-ui-v2 .btn:active:not(:disabled){
  transform:
    scale(.985);
}

.vibe-ui-v2 .badge{
  border-radius:
    var(--vb-radius-round);
}

.vibe-ui-v2 input,
.vibe-ui-v2 select,
.vibe-ui-v2 textarea{
  transition:
    border-color
      var(--vb-motion-fast)
      ease,
    box-shadow
      var(--vb-motion-fast)
      ease;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media(max-width:900px){
  .vb-grid--4,
  .vb-grid--3{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .vb-grid,
  .vb-grid--2,
  .vb-grid--3,
  .vb-grid--4{
    grid-template-columns:1fr;
  }

  .vb-section-head{
    align-items:stretch;
    flex-direction:column;
  }
}


/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

@media(
  prefers-reduced-motion:
  reduce
){
  .vb-enter,
  .vb-value-pop,
  .vb-success-pulse,
  .vb-skeleton::after{
    animation:none !important;
  }
}


/*
 * ==========================================================
 * VIBE DESIGN FOUNDATION 2.0
 * ==========================================================
 */

/* VIBE_DESIGN_FOUNDATION_V20 */

:root{

  --vb-font-micro:11px;
  --vb-font-xs:12px;
  --vb-font-sm:13px;
  --vb-font-md:14px;
  --vb-font-lg:18px;
  --vb-font-xl:22px;

  --vb-control-height:38px;

  --vb-line-compact:1.35;
  --vb-line-body:1.55;
}


body{
  font-size:
    var(--vb-font-md);

  line-height:
    var(--vb-line-body);
}


.vb-section-title{
  font-size:
    var(--vb-font-xl);

  line-height:1.18;
}


.vb-section-subtitle,
.vb-muted{
  font-size:
    var(--vb-font-sm);

  line-height:
    var(--vb-line-body);
}


.vb-title{
  font-size:
    var(--vb-font-lg);

  line-height:1.25;
}


.vb-eyebrow,
.vb-label{
  font-size:
    var(--vb-font-micro);

  line-height:
    var(--vb-line-compact);
}


.vb-button{
  min-height:
    var(--vb-control-height);

  font-size:
    var(--vb-font-sm);
}


.vb-input,
.vb-select,
.vb-textarea{
  min-height:
    var(--vb-control-height);

  font-size:
    var(--vb-font-sm);

  line-height:
    var(--vb-line-compact);
}


.vb-badge{
  font-size:
    var(--vb-font-micro);
}


.vb-card{
  font-size:
    var(--vb-font-md);
}


.vb-card-body{
  line-height:
    var(--vb-line-body);
}


table,
.vb-table,
.vb-row{
  font-size:
    var(--vb-font-sm);
}

/* VIBE_GLOBAL_DARK_SELECT_V1 */
.vb-select {
  color-scheme: dark;
}

.vb-select option,
.vb-select optgroup {
  background-color: #0d1017;
  color: #f4f6fb;
}

