/* glass-theme.css – Javoli Backoffice v2.1 */

/* ─── Glassmorphism Card ───────────────────────────────────── */
.glass-card {
  background: linear-gradient(135deg,
    rgba(26,34,54,0.85) 0%,
    rgba(17,24,39,0.9)  100%);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--border-radius-md);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.05);
  padding: 24px 28px;
  margin-bottom: 24px;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.glass-card:hover {
  border-color: rgba(255,255,255,0.11);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.glass-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg,
    rgba(10,15,30,0.97) 0%,
    rgba(8,12,24,0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar top glow */
.glass-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(99,102,241,0.4), transparent);
}

/* ─── Navbar ───────────────────────────────────────────────── */
.glass-navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--navbar-height);
  background: rgba(10,15,30,0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
}

/* Bottom border glow */
.glass-navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(99,102,241,0.2) 50%,
    transparent 100%);
}

/* ─── Sidebar Menu Items ───────────────────────────────────── */
.glass-menu-item {
  display: flex;
  align-items: center;
  padding: 11px 22px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  border-radius: 0;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.glass-menu-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.glass-menu-item.active {
  color: var(--text-primary);
  border-left-color: var(--accent-primary);
  background: linear-gradient(90deg,
    rgba(99,102,241,0.12) 0%,
    transparent 100%);
}

/* Hover left highlight */
.glass-menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent-primary);
  transition: height var(--transition-fast);
  border-radius: 0 3px 3px 0;
}
.glass-menu-item:hover:not(.active)::before {
  height: 60%;
}

.glass-menu-icon {
  font-size: 16px;
  margin-right: 14px;
  width: 22px;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
}

/* ─── Submenu ──────────────────────────────────────────────── */
.glass-submenu {
  background: rgba(0,0,0,0.2);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  display: none;
  border-left: 1px solid rgba(255,255,255,0.05);
  margin-left: 22px;
}
.glass-submenu.open { display: block; }

.glass-submenu-item {
  display: block;
  padding: 9px 18px 9px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
}
.glass-submenu-item:hover {
  color: var(--text-primary);
  border-left-color: rgba(99,102,241,0.4);
  background: rgba(255,255,255,0.02);
}

/* ─── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: inherit;
  opacity: 0.3;
  filter: blur(8px);
}

.stat-card-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.stat-card-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.stat-card-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: rgba(255,255,255,0.06);
}

/* ─── Logo Area ────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo img {
  max-height: 36px;
  width: auto;
}

/* ─── Sidebar Section Label ────────────────────────────────── */
.sidebar-section-label {
  padding: 16px 22px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  user-select: none;
}

/* ─── Sidebar Divider ──────────────────────────────────────── */
.sidebar-divider {
  margin: 10px 22px;
  height: 1px;
  background: rgba(255,255,255,0.05);
}

/* ─── Run Button ───────────────────────────────────────────── */
.run-btn {
  color: var(--accent-primary);
  font-size: 20px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}
.run-btn:hover {
  color: #fff;
  background: var(--accent-glow);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ─── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Focus Ring ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── User Profile Badge ───────────────────────────────────── */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* ─── Sidebar chevron animation ────────────────────────────── */
.submenu-toggle .fa-chevron-down {
  transition: transform var(--transition-fast);
  margin-left: auto;
  font-size: 11px;
  opacity: 0.6;
}
.submenu-toggle.open .fa-chevron-down {
  transform: rotate(180deg);
}
