/* --- Figma-Style Topbar (3-Column Layout) --- */
.topbar {
  min-height: 64px;
  background: rgba(13, 18, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
  gap: 16px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-left .logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
  transition: transform 0.2s;
}
.topbar-left .logo:hover {
  transform: scale(1.05);
}
.topbar-left h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.topbar-left .sub-label {
  font-size: 10px;
  color: #06b6d4;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 1px;
}
.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-grow: 1;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.toolbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

/* --- Unified Pill Control Groups --- */
.control-group {
  display: inline-flex;
  background: rgba(17, 23, 41, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  align-items: center;
}
.control-group .tbtn {
  height: 32px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #94a3b8;
  min-height: auto;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.control-group .tbtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.control-group .tbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  align-self: center;
}
.zoom-text {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  padding: 0 4px;
  align-self: center;
  min-width: 36px;
  text-align: center;
}
.snap-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  padding: 0 8px;
}
.snap-label input {
  accent-color: #6366f1;
  width: 12px;
  height: 12px;
  cursor: pointer;
}

/* --- Premium Buttons --- */
.tbtn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-family: inherit;
}
.tbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.tbtn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tbtn-outline:hover {
  border-color: #6366f1;
  color: #ffffff;
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}
.tbtn-primary {
  background: #4f46e5;
  color: #fff;
}
.tbtn-primary:hover {
  background: #3730a3;
  transform: translateY(-1px);
}
.tbtn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.tbtn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.tbtn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.tbtn-danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
.btn-full {
  width: 100%;
}

.create-status {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  min-width: 100px;
  text-align: right;
}

/* ──────────────────────────────────────────────────────────────
   PREMIUM LIGHT MODE OVERRIDES
   ────────────────────────────────────────────────────────────── */
.topbar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
}
.topbar-left h1 {
  color: #0f172a !important;
}

.control-group {
  background: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.control-group .tbtn {
  color: #475569 !important;
}
.control-group .tbtn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.04) !important;
}
.divider {
  background: rgba(0, 0, 0, 0.08) !important;
}
.zoom-text {
  color: #334155 !important;
}
.snap-label {
  color: #64748b !important;
}

.tbtn-outline {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
.tbtn-outline:hover {
  border-color: #4f46e5 !important;
  color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.04) !important;
}

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN OVERRIDES
   ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    min-height: 112px;
    padding: 8px 10px;
    gap: 8px;
  }
  .topbar .logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .topbar h1 {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
  }
  .tbtn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
    flex: 0 0 auto;
  }
}
